From 4b0b7342de31de7e2606f858a7c8eedf0d676473 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 13 Feb 2023 12:22:33 +0000 Subject: [PATCH 01/31] WIP EncodeAsType and DecodeAsType --- Cargo.lock | 297 +++++++++++++++++++------------ cli/Cargo.toml | 2 +- cli/src/commands/codegen.rs | 38 ++-- codegen/src/types/derives.rs | 57 ++++-- subxt/Cargo.toml | 5 +- subxt/src/events/events_type.rs | 2 +- subxt/src/lib.rs | 2 + subxt/src/utils/account_id.rs | 2 +- subxt/src/utils/bits.rs | 149 +++++++++------- subxt/src/utils/multi_address.rs | 2 +- 10 files changed, 338 insertions(+), 218 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2ede39707c..90d3e75ac2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,9 +82,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "array-bytes" @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1" +checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" dependencies = [ "proc-macro2", "quote", @@ -187,6 +187,15 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "basic-toml" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +dependencies = [ + "serde", +] + [[package]] name = "beef" version = "0.5.2" @@ -297,9 +306,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cast" @@ -309,9 +318,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -372,9 +381,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.3" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d93d855ce6a0aa87b8473ef9169482f40abaa2e9e0993024c35c902cbd5920" +checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" dependencies = [ "bitflags", "clap_derive", @@ -667,9 +676,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" +checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9" dependencies = [ "cc", "cxxbridge-flags", @@ -679,9 +688,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" +checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d" dependencies = [ "cc", "codespan-reporting", @@ -694,15 +703,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" +checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a" [[package]] name = "cxxbridge-macro" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" +checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2" dependencies = [ "proc-macro2", "quote", @@ -711,9 +720,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" dependencies = [ "darling_core", "darling_macro", @@ -721,9 +730,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" dependencies = [ "fnv", "ident_case", @@ -735,9 +744,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" dependencies = [ "darling_core", "quote", @@ -871,9 +880,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "environmental" @@ -977,9 +986,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" dependencies = [ "futures-channel", "futures-core", @@ -992,9 +1001,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" dependencies = [ "futures-core", "futures-sink", @@ -1002,15 +1011,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" dependencies = [ "futures-core", "futures-task", @@ -1020,9 +1029,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" [[package]] name = "futures-lite" @@ -1041,9 +1050,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ "proc-macro2", "quote", @@ -1052,15 +1061,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" [[package]] name = "futures-timer" @@ -1074,9 +1083,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" dependencies = [ "futures-channel", "futures-core", @@ -1257,9 +1266,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1279,6 +1288,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -1361,9 +1376,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" dependencies = [ "bytes", "futures-channel", @@ -1526,24 +1541,24 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" dependencies = [ "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes 1.0.4", - "rustix 0.36.7", - "windows-sys 0.42.0", + "hermit-abi 0.3.1", + "io-lifetimes 1.0.5", + "rustix 0.36.8", + "windows-sys 0.45.0", ] [[package]] @@ -1563,9 +1578,9 @@ checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -2046,9 +2061,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parity-scale-codec" -version = "3.2.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ab01d0f889e957861bc65888d5ccbe82c158d0270136ba46820d43837cdf72" +checksum = "c3840933452adf7b3b9145e27086a5a3376c619dca1a21b1e5a5af0d54979bed" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -2095,15 +2110,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2257,9 +2272,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] @@ -2485,16 +2500,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.7" +version = "0.36.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" +checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ "bitflags", "errno", - "io-lifetimes 1.0.4", + "io-lifetimes 1.0.5", "libc", "linux-raw-sys 0.1.4", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2565,15 +2580,53 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#5b5947bab1227fbcc0466d0f833a7a8707caa62a" +dependencies = [ + "parity-scale-codec", + "scale-bits", + "scale-decode-derive", + "scale-info", + "thiserror", +] + +[[package]] +name = "scale-decode-derive" +version = "0.4.0" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#5b5947bab1227fbcc0466d0f833a7a8707caa62a" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "scale-encode" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" +checksum = "f90d901260b7aece1614123e3cb563205391892e0288be5b02a6f23e9e4819c2" dependencies = [ "parity-scale-codec", "scale-bits", + "scale-encode-derive", "scale-info", "thiserror", ] +[[package]] +name = "scale-encode-derive" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71f4ea62e38e266ac1ac49c0541c0b0acdc77982946362de07fef740e7e56ec5" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "scale-info" version = "2.3.1" @@ -2603,8 +2656,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-scale-decode-as-type#05c472b48ffcabfed597c221d2b72121a0629800" dependencies = [ "either", "frame-metadata", @@ -2695,9 +2747,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -2744,9 +2796,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "itoa", "ryu", @@ -3347,6 +3399,7 @@ dependencies = [ "primitive-types", "scale-bits", "scale-decode", + "scale-encode", "scale-info", "scale-value", "serde", @@ -3367,7 +3420,7 @@ dependencies = [ name = "subxt-cli" version = "0.26.0" dependencies = [ - "clap 4.1.3", + "clap 4.1.4", "color-eyre", "frame-metadata", "hex", @@ -3523,10 +3576,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "50f297120ff9d4efe680df143d5631bba9c75fa371992b7fcb33eb3453cb0a07" dependencies = [ + "cfg-if", "once_cell", ] @@ -3570,15 +3624,15 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.2" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ "autocfg", "bytes", @@ -3616,9 +3670,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "bc6a3b08b64e6dfad376fa2432c7b1f01522e37a623c3050bc95db2d3ff21583" dependencies = [ "bytes", "futures-core", @@ -3629,15 +3683,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml_datetime" version = "0.5.1" @@ -3646,9 +3691,9 @@ checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" [[package]] name = "toml_edit" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729bfd096e40da9c001f778f5cdecbd2957929a24e10e5883d9392220a751581" +checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ "indexmap", "nom8", @@ -3791,17 +3836,17 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.76" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6" +checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" dependencies = [ + "basic-toml", "glob 0.3.1", "once_cell", "serde", "serde_derive", "serde_json", "termcolor", - "toml", ] [[package]] @@ -3954,9 +3999,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3964,9 +4009,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -3979,9 +4024,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -3991,9 +4036,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4001,9 +4046,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -4014,9 +4059,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasmi" @@ -4184,9 +4229,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4281,6 +4326,30 @@ dependencies = [ "windows_x86_64_msvc 0.42.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e2fcea8633..f232b9efee 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -21,7 +21,7 @@ subxt-codegen = { version = "0.26.0", path = "../codegen" } # perform node compatibility subxt-metadata = { version = "0.26.0", path = "../metadata" } # parse command line args -clap = { version = "4.0.8", features = ["derive", "cargo"] } +clap = { version = "4.0.8", features = ["derive", "cargo", "env"] } # colourful error reports color-eyre = "0.6.1" # serialize the metadata diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index 127b370aab..a3890a2862 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -23,11 +23,8 @@ use subxt_codegen::{ #[derive(Debug, ClapParser)] pub struct Opts { /// The url of the substrate node to query for metadata for codegen. - #[clap(name = "url", long, value_parser)] - url: Option, - /// The path to the encoded metadata file. - #[clap(short, long, value_parser)] - file: Option, + #[clap(flatten)] + metadata_opts: MetadataOpts, /// Additional derives #[clap(long = "derive")] derives: Vec, @@ -42,6 +39,17 @@ pub struct Opts { crate_path: Option, } +#[derive(Debug, Clone, clap::Args)] +pub struct MetadataOpts { + /// The url of the substrate node to query for metadata. + #[clap(name = "url", long, value_parser, env = "SUBXT_METADATA_URL", conflicts_with = "file")] + url: Option, + /// The path to the encoded metadata file. + #[clap(short, long, value_parser, env = "SUBXT_METADATA_PATH", conflicts_with = "url")] + file: Option, +} + + fn derive_for_type_parser(src: &str) -> Result<(String, String), String> { let (ty, derive) = src .split_once('=') @@ -51,25 +59,7 @@ fn derive_for_type_parser(src: &str) -> Result<(String, String), String> { } pub async fn run(opts: Opts) -> color_eyre::Result<()> { - let bytes = if let Some(file) = opts.file.as_ref() { - if opts.url.is_some() { - eyre::bail!("specify one of `--url` or `--file` but not both") - }; - - let mut file = fs::File::open(file)?; - let mut bytes = Vec::new(); - file.read_to_end(&mut bytes)?; - bytes - } else { - let url = opts.url.unwrap_or_else(|| { - "http://localhost:9933" - .parse::() - .expect("default url is valid") - }); - subxt_codegen::utils::fetch_metadata_bytes(&url).await? - }; - - codegen(&bytes, opts.derives, opts.derives_for_type, opts.crate_path)?; + print!("{opts:?}"); Ok(()) } diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs index 0bfc6d9e17..bd6475ec33 100644 --- a/codegen/src/types/derives.rs +++ b/codegen/src/types/derives.rs @@ -5,7 +5,6 @@ use crate::CratePath; use syn::{ parse_quote, - punctuated::Punctuated, Path, }; @@ -21,7 +20,7 @@ pub struct DerivesRegistry { } impl DerivesRegistry { - /// Creates a new `DeviceRegistry` with the supplied `crate_path`. + /// Creates a new `DerivesRegistry` with the supplied `crate_path`. /// /// The `crate_path` denotes the `subxt` crate access path in the /// generated code. @@ -61,23 +60,24 @@ impl DerivesRegistry { /// - Any user-defined derives for all types via `generated_type_derives` /// - Any user-defined derives for this specific type pub fn resolve(&self, ty: &syn::TypePath) -> Derives { - let mut defaults = self.default_derives.derives.clone(); + let mut resolved_derives = self.default_derives.clone(); if let Some(specific) = self.specific_type_derives.get(ty) { - defaults.extend(specific.derives.iter().cloned()); + resolved_derives.extend_from(specific.clone()); } - Derives { derives: defaults } + resolved_derives } } #[derive(Debug, Clone)] pub struct Derives { derives: HashSet, + attributes: HashSet } impl FromIterator for Derives { fn from_iter>(iter: T) -> Self { let derives = iter.into_iter().collect(); - Self { derives } + Self { derives, attributes: HashSet::new() } } } @@ -86,26 +86,46 @@ impl Derives { /// to the set of default derives that reside in `subxt`. pub fn new(crate_path: &CratePath) -> Self { let mut derives = HashSet::new(); + let mut attributes = HashSet::new(); + + derives.insert(syn::parse_quote!(#crate_path::ext::scale_encode::EncodeAsType)); + let encode_crate_path = quote::quote!{ #crate_path::ext::scale_encode }.to_string(); + attributes.insert(syn::parse_quote!(#[encode_as_type(crate_path = #encode_crate_path)])); + derives.insert(syn::parse_quote!(#crate_path::ext::scale_decode::DecodeAsType)); + let decode_crate_path = quote::quote!{ #crate_path::ext::scale_decode }.to_string(); + attributes.insert(syn::parse_quote!(#[decode_as_type(crate_path = #decode_crate_path)])); + derives.insert(syn::parse_quote!(#crate_path::ext::codec::Encode)); derives.insert(syn::parse_quote!(#crate_path::ext::codec::Decode)); derives.insert(syn::parse_quote!(Debug)); - Self { derives } + + Self { derives, attributes } + } + + /// Extend this set of `Derives` from another. + pub fn extend_from(&mut self, other: Derives) { + self.derives.extend(other.derives.into_iter()); + self.attributes.extend(other.attributes.into_iter()); } /// Add `#crate_path::ext::codec::CompactAs` to the derives. pub fn insert_codec_compact_as(&mut self, crate_path: &CratePath) { - self.insert(parse_quote!(#crate_path::ext::codec::CompactAs)); + self.insert_derive(parse_quote!(#crate_path::ext::codec::CompactAs)); } pub fn append(&mut self, derives: impl Iterator) { for derive in derives { - self.insert(derive) + self.insert_derive(derive) } } - pub fn insert(&mut self, derive: syn::Path) { + pub fn insert_derive(&mut self, derive: syn::Path) { self.derives.insert(derive); } + + pub fn insert_attribute(&mut self, attribute: syn::Attribute) { + self.attributes.insert(attribute); + } } impl quote::ToTokens for Derives { @@ -117,10 +137,21 @@ impl quote::ToTokens for Derives { .to_string() .cmp("e::quote!(#b).to_string()) }); - let derives: Punctuated = - sorted.iter().cloned().collect(); + + tokens.extend(quote::quote! { + #[derive(#( #sorted ),*)] + }) + } + if !self.attributes.is_empty() { + let mut sorted = self.attributes.iter().cloned().collect::>(); + sorted.sort_by(|a, b| { + quote::quote!(#a) + .to_string() + .cmp("e::quote!(#b).to_string()) + }); + tokens.extend(quote::quote! { - #[derive(#derives)] + #( #sorted )* }) } } diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 5c9321cad5..82edf77280 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -36,9 +36,10 @@ jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } scale-info = "2.0.0" -scale-value = "0.6.0" +scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-scale-decode-as-type" } scale-bits = "0.3" -scale-decode = "0.4.0" +scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } +scale-encode = "0.0.4" futures = { version = "0.3.13", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 7efc7d93d4..f330516b10 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -242,7 +242,7 @@ impl EventDetails { // Skip over the bytes belonging to this event. for field_metadata in event_metadata.fields() { // Skip over the bytes for this field: - scale_decode::decode( + scale_decode::visitor::decode_with_visitor( input, field_metadata.type_id(), &metadata.runtime_metadata().types, diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 4a37a59751..528a400705 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -182,4 +182,6 @@ pub mod ext { pub use frame_metadata; pub use scale_bits; pub use scale_value; + pub use scale_encode; + pub use scale_decode; } diff --git a/subxt/src/utils/account_id.rs b/subxt/src/utils/account_id.rs index 537460a8b5..885a7e0567 100644 --- a/subxt/src/utils/account_id.rs +++ b/subxt/src/utils/account_id.rs @@ -18,7 +18,7 @@ use serde::{ /// A 32-byte cryptographic identifier. This is a simplified version of Substrate's /// `sp_core::crypto::AccountId32`. To obtain more functionality, convert this into /// that type. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] pub struct AccountId32(pub [u8; 32]); impl AsRef<[u8]> for AccountId32 { diff --git a/subxt/src/utils/bits.rs b/subxt/src/utils/bits.rs index 409597fad9..f11531113e 100644 --- a/subxt/src/utils/bits.rs +++ b/subxt/src/utils/bits.rs @@ -16,55 +16,53 @@ use scale_bits::{ }, Bits, }; +use scale_decode::IntoVisitor; use std::marker::PhantomData; -macro_rules! store { - ($ident: ident; $(($ty: ident, $wrapped: ty)),*) => { - /// Associates `bitvec::store::BitStore` trait with corresponding, type-erased `scale_bits::StoreFormat` enum. - /// - /// Used to decode bit sequences by providing `scale_bits::StoreFormat` using - /// `bitvec`-like type type parameters. - pub trait $ident { - /// Corresponding `scale_bits::StoreFormat` value. - const FORMAT: StoreFormat; - /// Number of bits that the backing store types holds. - const BITS: u32; - } - - $( - impl $ident for $wrapped { - const FORMAT: StoreFormat = StoreFormat::$ty; - const BITS: u32 = <$wrapped>::BITS; - } - )* - }; - } - -macro_rules! order { - ($ident: ident; $($ty: ident),*) => { - /// Associates `bitvec::order::BitOrder` trait with corresponding, type-erased `scale_bits::OrderFormat` enum. - /// - /// Used to decode bit sequences in runtime by providing `scale_bits::OrderFormat` using - /// `bitvec`-like type type parameters. - pub trait $ident { - /// Corresponding `scale_bits::OrderFormat` value. - const FORMAT: OrderFormat; - } - - $( - #[doc = concat!("Type-level value that corresponds to `scale_bits::OrderFormat::", stringify!($ty), "` at run-time")] - #[doc = concat!(" and `bitvec::order::BitOrder::", stringify!($ty), "` at the type level.")] - #[derive(Clone, Debug, PartialEq, Eq)] - pub enum $ty {} - impl $ident for $ty { - const FORMAT: OrderFormat = OrderFormat::$ty; - } - )* - }; - } - -store!(BitStore; (U8, u8), (U16, u16), (U32, u32), (U64, u64)); -order!(BitOrder; Lsb0, Msb0); +/// Associates `bitvec::store::BitStore` trait with corresponding, type-erased `scale_bits::StoreFormat` enum. +/// +/// Used to decode bit sequences by providing `scale_bits::StoreFormat` using +/// `bitvec`-like type type parameters. +pub trait BitStore { + /// Corresponding `scale_bits::StoreFormat` value. + const FORMAT: StoreFormat; + /// Number of bits that the backing store types holds. + const BITS: u32; +} +macro_rules! impl_store { + ($ty:ident, $wrapped:ty) => { + impl BitStore for $wrapped { + const FORMAT: StoreFormat = StoreFormat::$ty; + const BITS: u32 = <$wrapped>::BITS; + } + }; +} +impl_store!(U8, u8); +impl_store!(U16, u16); +impl_store!(U32, u32); +impl_store!(U64, u64); + +/// Associates `bitvec::order::BitOrder` trait with corresponding, type-erased `scale_bits::OrderFormat` enum. +/// +/// Used to decode bit sequences in runtime by providing `scale_bits::OrderFormat` using +/// `bitvec`-like type type parameters. +pub trait BitOrder { + /// Corresponding `scale_bits::OrderFormat` value. + const FORMAT: OrderFormat; +} +macro_rules! impl_order { + ($ty:ident) => { + #[doc = concat!("Type-level value that corresponds to `scale_bits::OrderFormat::", stringify!($ty), "` at run-time")] + #[doc = concat!(" and `bitvec::order::BitOrder::", stringify!($ty), "` at the type level.")] + #[derive(Clone, Debug, PartialEq, Eq)] + pub enum $ty {} + impl BitOrder for $ty { + const FORMAT: OrderFormat = OrderFormat::$ty; + } + }; +} +impl_order!(Lsb0); +impl_order!(Msb0); /// Constructs a run-time format parameters based on the corresponding type-level parameters. fn bit_format() -> Format { @@ -77,29 +75,28 @@ fn bit_format() -> Format { /// `scale_bits::Bits` generic over the bit store (`u8`/`u16`/`u32`/`u64`) and bit order (LSB, MSB) /// used for SCALE encoding/decoding. Uses `scale_bits::Bits`-default `u8` and LSB format underneath. #[derive(Debug, Clone, PartialEq, Eq)] -pub struct DecodedBits( - Bits, - PhantomData, - PhantomData, -); +pub struct DecodedBits { + bits: Bits, + _marker: PhantomData<(Store, Order)>, +} -impl DecodedBits { +impl DecodedBits { /// Extracts the underlying `scale_bits::Bits` value. pub fn into_bits(self) -> Bits { - self.0 + self.bits } /// References the underlying `scale_bits::Bits` value. pub fn as_bits(&self) -> &Bits { - &self.0 + &self.bits } } -impl core::iter::FromIterator +impl core::iter::FromIterator for DecodedBits { fn from_iter>(iter: T) -> Self { - DecodedBits(Bits::from_iter(iter), PhantomData, PhantomData) + DecodedBits { bits: Bits::from_iter(iter), _marker: PhantomData } } } @@ -132,21 +129,51 @@ impl codec::Decode for DecodedBits, _>>()?; let bits = Bits::from_iter(bits); - Ok(DecodedBits(bits, PhantomData, PhantomData)) + Ok(DecodedBits { bits, _marker: PhantomData }) } } impl codec::Encode for DecodedBits { fn size_hint(&self) -> usize { - self.0.size_hint() + self.bits.size_hint() } fn encoded_size(&self) -> usize { - self.0.encoded_size() + self.bits.encoded_size() } fn encode(&self) -> Vec { - scale_bits::encode_using_format(self.0.iter(), bit_format::()) + scale_bits::encode_using_format(self.bits.iter(), bit_format::()) + } +} + +#[doc(hidden)] +pub struct DecodedBitsVisitor(std::marker::PhantomData<(S, O)>); +impl scale_decode::Visitor for DecodedBitsVisitor { + type Value<'scale, 'info> = DecodedBits; + type Error = scale_decode::Error; + + fn unchecked_decode_as_type<'scale, 'info>( + self, + input: &mut &'scale [u8], + type_id: scale_decode::visitor::TypeId, + types: &'info scale_info::PortableRegistry, + ) -> scale_decode::visitor::DecodeAsTypeResult, Self::Error>> { + let res = scale_decode::visitor::decode_with_visitor(input, type_id.0, types, Bits::into_visitor()) + .map(|bits| DecodedBits { bits, _marker: PhantomData }); + scale_decode::visitor::DecodeAsTypeResult::Decoded(res) + } +} +impl scale_decode::IntoVisitor for DecodedBits { + type Visitor = DecodedBitsVisitor; + fn into_visitor() -> Self::Visitor { + DecodedBitsVisitor(PhantomData) + } +} + +impl scale_encode::EncodeAsType for DecodedBits { + fn encode_as_type_to(&self, type_id: u32, types: &scale_info::PortableRegistry, out: &mut Vec) -> Result<(), scale_encode::Error> { + self.bits.encode_as_type_to(type_id, types, out) } } diff --git a/subxt/src/utils/multi_address.rs b/subxt/src/utils/multi_address.rs index c6308a8e92..861737aa1c 100644 --- a/subxt/src/utils/multi_address.rs +++ b/subxt/src/utils/multi_address.rs @@ -14,7 +14,7 @@ use codec::{ /// A multi-format address wrapper for on-chain accounts. This is a simplified version of Substrate's /// `sp_runtime::MultiAddress`. To obtain more functionality, convert this into that type (this conversion /// functionality is provided via `From` impls if the `substrate-compat` feature is enabled). -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] pub enum MultiAddress { /// It's an account ID (pubkey). Id(AccountId), From 74628ec4742cdf5328369c8638bf20544c57f345 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 14 Feb 2023 11:29:23 +0000 Subject: [PATCH 02/31] remove silly cli experiment code --- Cargo.lock | 9 +++++---- cli/Cargo.toml | 2 +- cli/src/commands/codegen.rs | 38 +++++++++++++++++++++++-------------- subxt/Cargo.toml | 2 +- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9e8108df6..19781dbbaf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2632,11 +2632,12 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.4" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90d901260b7aece1614123e3cb563205391892e0288be5b02a6f23e9e4819c2" +checksum = "15839fdbaebbf53f6d65f66499e4a9d0dfa825aaf8b4de11918ec8419c65f6d5" dependencies = [ "parity-scale-codec", + "primitive-types", "scale-bits", "scale-encode-derive", "scale-info", @@ -2645,9 +2646,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.4" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71f4ea62e38e266ac1ac49c0541c0b0acdc77982946362de07fef740e7e56ec5" +checksum = "f257f7a9366ca5f0431e6e4b1d415a7befb56b41ab8eb97267fed8ddd852bf9d" dependencies = [ "darling", "proc-macro-crate", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 308d56998a..5cef3111ae 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -21,7 +21,7 @@ subxt-codegen = { version = "0.27.0", path = "../codegen" } # perform node compatibility subxt-metadata = { version = "0.27.0", path = "../metadata" } # parse command line args -clap = { version = "4.1.4", features = ["derive", "cargo", "env"] } +clap = { version = "4.1.4", features = ["derive", "cargo"] } # colourful error reports color-eyre = "0.6.1" # serialize the metadata diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index a3890a2862..127b370aab 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -23,8 +23,11 @@ use subxt_codegen::{ #[derive(Debug, ClapParser)] pub struct Opts { /// The url of the substrate node to query for metadata for codegen. - #[clap(flatten)] - metadata_opts: MetadataOpts, + #[clap(name = "url", long, value_parser)] + url: Option, + /// The path to the encoded metadata file. + #[clap(short, long, value_parser)] + file: Option, /// Additional derives #[clap(long = "derive")] derives: Vec, @@ -39,17 +42,6 @@ pub struct Opts { crate_path: Option, } -#[derive(Debug, Clone, clap::Args)] -pub struct MetadataOpts { - /// The url of the substrate node to query for metadata. - #[clap(name = "url", long, value_parser, env = "SUBXT_METADATA_URL", conflicts_with = "file")] - url: Option, - /// The path to the encoded metadata file. - #[clap(short, long, value_parser, env = "SUBXT_METADATA_PATH", conflicts_with = "url")] - file: Option, -} - - fn derive_for_type_parser(src: &str) -> Result<(String, String), String> { let (ty, derive) = src .split_once('=') @@ -59,7 +51,25 @@ fn derive_for_type_parser(src: &str) -> Result<(String, String), String> { } pub async fn run(opts: Opts) -> color_eyre::Result<()> { - print!("{opts:?}"); + let bytes = if let Some(file) = opts.file.as_ref() { + if opts.url.is_some() { + eyre::bail!("specify one of `--url` or `--file` but not both") + }; + + let mut file = fs::File::open(file)?; + let mut bytes = Vec::new(); + file.read_to_end(&mut bytes)?; + bytes + } else { + let url = opts.url.unwrap_or_else(|| { + "http://localhost:9933" + .parse::() + .expect("default url is valid") + }); + subxt_codegen::utils::fetch_metadata_bytes(&url).await? + }; + + codegen(&bytes, opts.derives, opts.derives_for_type, opts.crate_path)?; Ok(()) } diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index ecd8c81d74..bf4b2c6de2 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -39,7 +39,7 @@ scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-scale-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.4" +scale-encode = "0.0.7" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } From 0c90a8022558b0bd679f9978c699a4db6741db85 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 14 Feb 2023 14:30:20 +0000 Subject: [PATCH 03/31] Get things finally compiling with EncodeAsType and DecodeAsType --- Cargo.lock | 24 +++++----- codegen/src/types/derives.rs | 26 ++++++++--- subxt/Cargo.toml | 4 +- subxt/src/lib.rs | 4 +- subxt/src/utils/account_id.rs | 13 +++++- subxt/src/utils/bits.rs | 46 ++++++++++++++----- subxt/src/utils/multi_address.rs | 13 +++++- testing/integration-tests/Cargo.toml | 1 - .../integration-tests/src/frame/staking.rs | 11 +++-- testing/test-runtime/build.rs | 4 -- 10 files changed, 100 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19781dbbaf..dd375987c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -965,9 +965,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -1570,7 +1570,6 @@ dependencies = [ "scale-info", "sp-core", "sp-keyring", - "sp-runtime", "subxt", "subxt-codegen", "syn", @@ -1921,14 +1920,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2609,9 +2608,10 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#5b5947bab1227fbcc0466d0f833a7a8707caa62a" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3e0d88f3539344f46c15bfbe23b9c3cb8fe9bdbd" dependencies = [ "parity-scale-codec", + "primitive-types", "scale-bits", "scale-decode-derive", "scale-info", @@ -2621,7 +2621,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#5b5947bab1227fbcc0466d0f833a7a8707caa62a" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3e0d88f3539344f46c15bfbe23b9c3cb8fe9bdbd" dependencies = [ "darling", "proc-macro-crate", @@ -2632,9 +2632,9 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.7" +version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15839fdbaebbf53f6d65f66499e4a9d0dfa825aaf8b4de11918ec8419c65f6d5" +checksum = "b95677054fca3564fb08de43f1208128c986a2abe3e186262385a715aed8ae66" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2646,9 +2646,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.7" +version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f257f7a9366ca5f0431e6e4b1d415a7befb56b41ab8eb97267fed8ddd852bf9d" +checksum = "a0c18acd44b9da8bbeec4dbbdc798e9f28990dc1445f1a5ba3de048c0e44a797" dependencies = [ "darling", "proc-macro-crate", diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs index bd6475ec33..1513fb7e6b 100644 --- a/codegen/src/types/derives.rs +++ b/codegen/src/types/derives.rs @@ -71,13 +71,16 @@ impl DerivesRegistry { #[derive(Debug, Clone)] pub struct Derives { derives: HashSet, - attributes: HashSet + attributes: HashSet, } impl FromIterator for Derives { fn from_iter>(iter: T) -> Self { let derives = iter.into_iter().collect(); - Self { derives, attributes: HashSet::new() } + Self { + derives, + attributes: HashSet::new(), + } } } @@ -89,17 +92,26 @@ impl Derives { let mut attributes = HashSet::new(); derives.insert(syn::parse_quote!(#crate_path::ext::scale_encode::EncodeAsType)); - let encode_crate_path = quote::quote!{ #crate_path::ext::scale_encode }.to_string(); - attributes.insert(syn::parse_quote!(#[encode_as_type(crate_path = #encode_crate_path)])); + let encode_crate_path = + quote::quote! { #crate_path::ext::scale_encode }.to_string(); + attributes.insert( + syn::parse_quote!(#[encode_as_type(crate_path = #encode_crate_path)]), + ); derives.insert(syn::parse_quote!(#crate_path::ext::scale_decode::DecodeAsType)); - let decode_crate_path = quote::quote!{ #crate_path::ext::scale_decode }.to_string(); - attributes.insert(syn::parse_quote!(#[decode_as_type(crate_path = #decode_crate_path)])); + let decode_crate_path = + quote::quote! { #crate_path::ext::scale_decode }.to_string(); + attributes.insert( + syn::parse_quote!(#[decode_as_type(crate_path = #decode_crate_path)]), + ); derives.insert(syn::parse_quote!(#crate_path::ext::codec::Encode)); derives.insert(syn::parse_quote!(#crate_path::ext::codec::Decode)); derives.insert(syn::parse_quote!(Debug)); - Self { derives, attributes } + Self { + derives, + attributes, + } } /// Extend this set of `Derives` from another. diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index bf4b2c6de2..3eaa69bc5f 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -39,7 +39,7 @@ scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-scale-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.7" +scale-encode = "0.0.11" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } @@ -56,7 +56,7 @@ subxt-metadata = { version = "0.27.0", path = "../metadata" } # Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256: impl-serde = { version = "0.4.0" } -primitive-types = { version = "0.12.0", default-features = false, features = ["codec", "scale-info", "serde"] } +primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "serde"] } sp-core-hashing = "6.0.0" # For ss58 encoding AccountId32 to serialize them properly: diff --git a/subxt/src/lib.rs b/subxt/src/lib.rs index 528a400705..1c66ba14db 100644 --- a/subxt/src/lib.rs +++ b/subxt/src/lib.rs @@ -181,7 +181,7 @@ pub mod ext { pub use codec; pub use frame_metadata; pub use scale_bits; - pub use scale_value; - pub use scale_encode; pub use scale_decode; + pub use scale_encode; + pub use scale_value; } diff --git a/subxt/src/utils/account_id.rs b/subxt/src/utils/account_id.rs index 885a7e0567..2d8423937d 100644 --- a/subxt/src/utils/account_id.rs +++ b/subxt/src/utils/account_id.rs @@ -18,7 +18,18 @@ use serde::{ /// A 32-byte cryptographic identifier. This is a simplified version of Substrate's /// `sp_core::crypto::AccountId32`. To obtain more functionality, convert this into /// that type. -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] +#[derive( + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + Debug, + scale_encode::EncodeAsType, + scale_decode::DecodeAsType, +)] pub struct AccountId32(pub [u8; 32]); impl AsRef<[u8]> for AccountId32 { diff --git a/subxt/src/utils/bits.rs b/subxt/src/utils/bits.rs index f11531113e..60e63c56fd 100644 --- a/subxt/src/utils/bits.rs +++ b/subxt/src/utils/bits.rs @@ -92,11 +92,12 @@ impl DecodedBits { } } -impl core::iter::FromIterator - for DecodedBits -{ +impl core::iter::FromIterator for DecodedBits { fn from_iter>(iter: T) -> Self { - DecodedBits { bits: Bits::from_iter(iter), _marker: PhantomData } + DecodedBits { + bits: Bits::from_iter(iter), + _marker: PhantomData, + } } } @@ -129,7 +130,10 @@ impl codec::Decode for DecodedBits, _>>()?; let bits = Bits::from_iter(bits); - Ok(DecodedBits { bits, _marker: PhantomData }) + Ok(DecodedBits { + bits, + _marker: PhantomData, + }) } } @@ -149,7 +153,7 @@ impl codec::Encode for DecodedBits(std::marker::PhantomData<(S, O)>); -impl scale_decode::Visitor for DecodedBitsVisitor { +impl scale_decode::Visitor for DecodedBitsVisitor { type Value<'scale, 'info> = DecodedBits; type Error = scale_decode::Error; @@ -158,21 +162,39 @@ impl scale_decode::Visitor for DecodedBitsVisitor { input: &mut &'scale [u8], type_id: scale_decode::visitor::TypeId, types: &'info scale_info::PortableRegistry, - ) -> scale_decode::visitor::DecodeAsTypeResult, Self::Error>> { - let res = scale_decode::visitor::decode_with_visitor(input, type_id.0, types, Bits::into_visitor()) - .map(|bits| DecodedBits { bits, _marker: PhantomData }); + ) -> scale_decode::visitor::DecodeAsTypeResult< + Self, + Result, Self::Error>, + > { + let res = scale_decode::visitor::decode_with_visitor( + input, + type_id.0, + types, + Bits::into_visitor(), + ) + .map(|bits| { + DecodedBits { + bits, + _marker: PhantomData, + } + }); scale_decode::visitor::DecodeAsTypeResult::Decoded(res) } } -impl scale_decode::IntoVisitor for DecodedBits { +impl scale_decode::IntoVisitor for DecodedBits { type Visitor = DecodedBitsVisitor; fn into_visitor() -> Self::Visitor { DecodedBitsVisitor(PhantomData) } } -impl scale_encode::EncodeAsType for DecodedBits { - fn encode_as_type_to(&self, type_id: u32, types: &scale_info::PortableRegistry, out: &mut Vec) -> Result<(), scale_encode::Error> { +impl scale_encode::EncodeAsType for DecodedBits { + fn encode_as_type_to( + &self, + type_id: u32, + types: &scale_info::PortableRegistry, + out: &mut Vec, + ) -> Result<(), scale_encode::Error> { self.bits.encode_as_type_to(type_id, types, out) } } diff --git a/subxt/src/utils/multi_address.rs b/subxt/src/utils/multi_address.rs index 861737aa1c..c1975b2e85 100644 --- a/subxt/src/utils/multi_address.rs +++ b/subxt/src/utils/multi_address.rs @@ -14,7 +14,18 @@ use codec::{ /// A multi-format address wrapper for on-chain accounts. This is a simplified version of Substrate's /// `sp_runtime::MultiAddress`. To obtain more functionality, convert this into that type (this conversion /// functionality is provided via `From` impls if the `substrate-compat` feature is enabled). -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] +#[derive( + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + Debug, + scale_encode::EncodeAsType, + scale_decode::DecodeAsType, +)] pub enum MultiAddress { /// It's an account ID (pubkey). Id(AccountId), diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 4feb235131..031221b865 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -25,7 +25,6 @@ regex = "1.5.0" scale-info = { version = "2.0.0", features = ["bit-vec"] } sp-core = { version = "16.0.0", default-features = false } sp-keyring = "18.0.0" -sp-runtime = "18.0.0" syn = "1.0.0" subxt = { version = "0.27.0", path = "../../subxt" } subxt-codegen = { version = "0.27.0", path = "../../codegen" } diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index 7345ab25f9..a85857213c 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -5,9 +5,12 @@ use crate::{ node_runtime::{ self, - runtime_types::pallet_staking::{ - RewardDestination, - ValidatorPrefs, + runtime_types::{ + pallet_staking::{ + RewardDestination, + ValidatorPrefs, + }, + sp_arithmetic::per_things::Perbill, }, staking, }, @@ -33,7 +36,7 @@ fn get_from_seed(seed: &str) -> sr25519::Pair { fn default_validator_prefs() -> ValidatorPrefs { ValidatorPrefs { - commission: sp_runtime::Perbill::default(), + commission: Perbill(0), blocked: false, } } diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 5084936e93..f5048b02e1 100644 --- a/testing/test-runtime/build.rs +++ b/testing/test-runtime/build.rs @@ -90,10 +90,6 @@ async fn run() { #[subxt::subxt( runtime_metadata_path = "{}", derive_for_all_types = "Eq, PartialEq", - substitute_type( - type = "sp_arithmetic::per_things::Perbill", - with = "::sp_runtime::Perbill" - ) )] pub mod node_runtime {{}} "#, From ee69471d631fd0a9b3e5f30bb2fb59f35f55b1aa Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 14 Feb 2023 18:02:45 +0000 Subject: [PATCH 04/31] update codegen test and WrapperKeepOpaque proper impl (in case it shows up in codegen) --- subxt/src/config/substrate.rs | 6 +- subxt/src/utils/mod.rs | 54 +- subxt/src/utils/wrapper_opaque.rs | 211 + .../integration-tests/src/codegen/polkadot.rs | 5717 +++++++++++++---- 4 files changed, 4712 insertions(+), 1276 deletions(-) create mode 100644 subxt/src/utils/wrapper_opaque.rs diff --git a/subxt/src/config/substrate.rs b/subxt/src/config/substrate.rs index b51046b56d..4ccbff1d52 100644 --- a/subxt/src/config/substrate.rs +++ b/subxt/src/config/substrate.rs @@ -23,9 +23,9 @@ use serde::{ }; pub use crate::utils::{ - account_id::AccountId32, - multi_address::MultiAddress, - multi_signature::MultiSignature, + AccountId32, + MultiAddress, + MultiSignature, }; pub use primitive_types::{ H256, diff --git a/subxt/src/utils/mod.rs b/subxt/src/utils/mod.rs index b544eb8b7f..ef2a605c22 100644 --- a/subxt/src/utils/mod.rs +++ b/subxt/src/utils/mod.rs @@ -4,14 +4,14 @@ //! Miscellaneous utility helpers. -pub mod account_id; +mod account_id; +mod multi_address; +mod multi_signature; +mod wrapper_opaque; pub mod bits; -pub mod multi_address; -pub mod multi_signature; use codec::{ Decode, - DecodeAll, Encode, }; use derivative::Derivative; @@ -19,6 +19,7 @@ use derivative::Derivative; pub use account_id::AccountId32; pub use multi_address::MultiAddress; pub use multi_signature::MultiSignature; +pub use wrapper_opaque::WrapperKeepOpaque; // Used in codegen #[doc(hidden)] @@ -39,51 +40,6 @@ impl codec::Encode for Encoded { } } -/// A wrapper for any type `T` which implement encode/decode in a way compatible with `Vec`. -/// -/// [`WrapperKeepOpaque`] stores the type only in its opaque format, aka as a `Vec`. To -/// access the real type `T` [`Self::try_decode`] needs to be used. -#[derive(Derivative, Encode, Decode)] -#[derivative( - Debug(bound = ""), - Clone(bound = ""), - PartialEq(bound = ""), - Eq(bound = ""), - Default(bound = ""), - Hash(bound = "") -)] -pub struct WrapperKeepOpaque { - data: Vec, - _phantom: PhantomDataSendSync, -} - -impl WrapperKeepOpaque { - /// Try to decode the wrapped type from the inner `data`. - /// - /// Returns `None` if the decoding failed. - pub fn try_decode(&self) -> Option { - T::decode_all(&mut &self.data[..]).ok() - } - - /// Returns the length of the encoded `T`. - pub fn encoded_len(&self) -> usize { - self.data.len() - } - - /// Returns the encoded data. - pub fn encoded(&self) -> &[u8] { - &self.data - } - - /// Create from the given encoded `data`. - pub fn from_encoded(data: Vec) -> Self { - Self { - data, - _phantom: PhantomDataSendSync::new(), - } - } -} - /// A version of [`std::marker::PhantomData`] that is also Send and Sync (which is fine /// because regardless of the generic param, it is always possible to Send + Sync this /// 0 size type). diff --git a/subxt/src/utils/wrapper_opaque.rs b/subxt/src/utils/wrapper_opaque.rs new file mode 100644 index 0000000000..9184aa2408 --- /dev/null +++ b/subxt/src/utils/wrapper_opaque.rs @@ -0,0 +1,211 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +use super::PhantomDataSendSync; +use codec::{ + Compact, + Decode, + DecodeAll, + Encode, +}; +use scale_encode::EncodeAsType; +use scale_decode::{ Visitor, IntoVisitor }; +use derivative::Derivative; + +/// A wrapper for any type `T` which implement encode/decode in a way compatible with `Vec`. +/// [`WrapperKeepOpaque`] stores the type only in its opaque format, aka as a `Vec`. To +/// access the real type `T` [`Self::try_decode`] needs to be used. +// Dev notes: +// +// - This is adapted from [here](https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/misc.rs). +// - The encoded bytes will be a compact encoded length followed by that number of bytes. +// - However, the TypeInfo describes the type as a composite with first a compact encoded length and next the type itself. +// [`Encode`] and [`Decode`] impls will "just work" to take this into a `Vec`, but we need a custom [`EncodeAsType`] +// and [`Visitor`] implementation to encode and decode based on TypeInfo. +#[derive(Derivative, Encode, Decode)] +#[derivative( + Debug(bound = ""), + Clone(bound = ""), + PartialEq(bound = ""), + Eq(bound = ""), + Default(bound = ""), + Hash(bound = "") +)] +pub struct WrapperKeepOpaque { + data: Vec, + _phantom: PhantomDataSendSync, +} + +impl WrapperKeepOpaque { + /// Try to decode the wrapped type from the inner `data`. + /// + /// Returns `None` if the decoding failed. + pub fn try_decode(&self) -> Option where T: Decode { + T::decode_all(&mut &self.data[..]).ok() + } + + /// Returns the length of the encoded `T`. + pub fn encoded_len(&self) -> usize { + self.data.len() + } + + /// Returns the encoded data. + pub fn encoded(&self) -> &[u8] { + &self.data + } + + /// Create from the given encoded `data`. + pub fn from_encoded(data: Vec) -> Self { + Self { + data, + _phantom: PhantomDataSendSync::new(), + } + } + + /// Create from some raw value by encoding it. + pub fn from_value(value: T) -> Self where T: Encode { + Self { + data: value.encode(), + _phantom: PhantomDataSendSync::new() + } + } +} + +impl EncodeAsType for WrapperKeepOpaque { + fn encode_as_type_to( + &self, + type_id: u32, + types: &scale_info::PortableRegistry, + out: &mut Vec, + ) -> Result<(), scale_encode::Error> { + use scale_encode::error::{ Error, ErrorKind, Kind }; + + let Some(ty) = types.resolve(type_id) else { + return Err(Error::new(ErrorKind::TypeNotFound(type_id))) + }; + + // Do a basic check that the target shape lines up. + let scale_info::TypeDef::Composite(_) = ty.type_def() else { + return Err(Error::new(ErrorKind::WrongShape { actual: Kind::Struct, expected: type_id })) + }; + + // Check that the name also lines up. + if ty.path().ident().as_deref() != Some("WrapperKeepOpaque") { + return Err(Error::new(ErrorKind::WrongShape { actual: Kind::Struct, expected: type_id })) + } + + // Just blat the bytes out.. + self.data.encode_to(out); + Ok(()) + } +} + +pub struct WrapperKeepOpaqueVisitor(std::marker::PhantomData); +impl Visitor for WrapperKeepOpaqueVisitor { + type Value<'scale, 'info> = WrapperKeepOpaque; + type Error = scale_decode::Error; + + fn visit_composite<'scale, 'info>( + self, + value: &mut scale_decode::visitor::types::Composite<'scale, 'info>, + type_id: scale_decode::visitor::TypeId, + ) -> Result, Self::Error> { + use scale_decode::error::{ Error, ErrorKind }; + + if value.path().ident().as_deref() != Some("WrapperKeepOpaque") { + return Err(Error::new(ErrorKind::Custom("Type to decode is not 'WrapperTypeKeepOpaque'".into()))) + } + if value.remaining() != 2 { + return Err(Error::new(ErrorKind::WrongLength { actual: type_id.0, actual_len: value.remaining(), expected_len: 2 })) + } + + // The field to decode is a compact len followed by bytes. Decode the length, then grab the bytes. + let Compact(len) = value.decode_item(Compact::::into_visitor()).expect("length checked")?; + let field = value.next().expect("length checked")?; + + // Sanity check that the compact length we decoded lines up with the number of bytes encoded inthe next field. + if field.bytes().len() != len as usize { + return Err(Error::new(ErrorKind::Custom("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len".into()))) + } + + Ok(WrapperKeepOpaque { + data: field.bytes().to_vec(), + _phantom: PhantomDataSendSync::new() + }) + } +} + +impl IntoVisitor for WrapperKeepOpaque { + type Visitor = WrapperKeepOpaqueVisitor; + fn into_visitor() -> Self::Visitor { + WrapperKeepOpaqueVisitor(std::marker::PhantomData) + } +} + +#[cfg(test)] +mod test { + use scale_decode::DecodeAsType; + + use super::*; + + // Copied from https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/misc.rs + // and used for tests to check that we can work with the expected TypeInfo without needing to import + // the frame_support crate, which has quite a lot of dependencies. + impl scale_info::TypeInfo for WrapperKeepOpaque { + type Identity = Self; + fn type_info() -> scale_info::Type { + use scale_info::{ Path, Type, build::Fields, TypeParameter, meta_type }; + + Type::builder() + .path(Path::new("WrapperKeepOpaque", module_path!())) + .type_params(vec![TypeParameter::new("T", Some(meta_type::()))]) + .composite( + Fields::unnamed() + .field(|f| f.compact::()) + .field(|f| f.ty::().type_name("T")), + ) + } + } + + /// Given a type definition, return type ID and registry representing it. + fn make_type() -> (u32, scale_info::PortableRegistry) { + let m = scale_info::MetaType::new::(); + let mut types = scale_info::Registry::new(); + let id = types.register_type(&m); + let portable_registry: scale_info::PortableRegistry = types.into(); + (id.id(), portable_registry) + } + + fn roundtrips_like_scale_codec(t: T) + where + T: EncodeAsType + DecodeAsType + Encode + Decode + PartialEq + std::fmt::Debug + scale_info::TypeInfo + 'static + { + let (type_id, types) = make_type::(); + + let scale_codec_encoded = t.encode(); + let encode_as_type_encoded = t.encode_as_type(type_id, &types).unwrap(); + + assert_eq!(scale_codec_encoded, encode_as_type_encoded, "encoded bytes should match"); + + let decode_as_type_bytes = &mut &*scale_codec_encoded; + let decoded_as_type = T::decode_as_type(decode_as_type_bytes, type_id, &types) + .expect("decode-as-type decodes"); + + let decode_scale_codec_bytes = &mut &*scale_codec_encoded; + let decoded_scale_codec = T::decode(decode_scale_codec_bytes) + .expect("scale-codec decodes"); + + assert!(decode_as_type_bytes.is_empty(), "no bytes should remain in decode-as-type impl"); + assert!(decode_scale_codec_bytes.is_empty(), "no bytes should remain in codec-decode impl"); + + assert_eq!(decoded_as_type, decoded_scale_codec, "decoded values should match"); + } + + #[test] + fn wrapper_keep_opaque_roundtrips_ok() { + roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(123u64)); + roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(true)); + roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(vec![1u8,2,3,4])); + } +} \ No newline at end of file diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 732faf74d6..303a346189 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -1,4 +1,5 @@ #[allow(dead_code, unused_imports, non_camel_case_types)] +#[allow(clippy::all)] pub mod api { use super::api as root_mod; pub static PALLETS: [&str; 53usize] = [ @@ -57,8 +58,14 @@ pub mod api { "XcmPallet", ]; #[derive( - :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Debug, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Event { #[codec(index = 0)] System(system::Event), @@ -152,16 +159,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FillBlock { pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, } @@ -169,32 +184,48 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHeapPages { pub pages: ::core::primitive::u64, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetCode { pub code: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetCodeWithoutChecks { pub code: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -204,16 +235,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KillStorage { pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -221,8 +260,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, } @@ -420,8 +463,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An extrinsic completed successfully."] pub struct ExtrinsicSuccess { pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, @@ -433,8 +480,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An extrinsic failed."] pub struct ExtrinsicFailed { pub dispatch_error: runtime_types::sp_runtime::DispatchError, @@ -447,8 +498,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "`:code` was updated."] pub struct CodeUpdated; impl ::subxt::events::StaticEvent for CodeUpdated { @@ -458,11 +513,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new account was created."] pub struct NewAccount { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for NewAccount { const PALLET: &'static str = "System"; @@ -471,11 +530,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account was reaped."] pub struct KilledAccount { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for KilledAccount { const PALLET: &'static str = "System"; @@ -484,11 +547,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "On on-chain remark happened."] pub struct Remarked { - pub sender: ::subxt::utils::account_id::AccountId32, + pub sender: ::subxt::utils::AccountId32, pub hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Remarked { @@ -503,7 +570,7 @@ pub mod api { #[doc = " The full account information for a particular account ID."] pub fn account( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::frame_system::AccountInfo< @@ -1134,8 +1201,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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<( @@ -1148,8 +1219,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -1157,8 +1232,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -1172,16 +1251,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CancelNamed { pub id: [::core::primitive::u8; 32usize], } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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<( @@ -1194,8 +1281,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -1376,8 +1467,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Scheduled some task."] pub struct Scheduled { pub when: ::core::primitive::u32, @@ -1390,8 +1485,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Canceled some task."] pub struct Canceled { pub when: ::core::primitive::u32, @@ -1404,8 +1503,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Dispatched some task."] pub struct Dispatched { pub task: (::core::primitive::u32, ::core::primitive::u32), @@ -1420,8 +1523,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The 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), @@ -1434,8 +1541,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The 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), @@ -1448,8 +1559,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given task can never be executed since it is overweight."] pub struct PermanentlyOverweight { pub task: (::core::primitive::u32, ::core::primitive::u32), @@ -1484,7 +1599,7 @@ pub mod api { ], ) } - #[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 :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: account_id :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + #[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 :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Agenda", @@ -1500,7 +1615,7 @@ pub mod api { ], ) } - #[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 :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: account_id :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ + #[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 :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "Scheduler", "Agenda", @@ -1627,32 +1742,48 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct NotePreimage { pub bytes: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnnotePreimage { pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RequestPreimage { pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, } @@ -1748,8 +1879,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A preimage has been noted."] pub struct Noted { pub hash: ::subxt::utils::H256, @@ -1761,8 +1896,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A preimage has been requested."] pub struct Requested { pub hash: ::subxt::utils::H256, @@ -1774,8 +1913,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A preimage has ben cleared."] pub struct Cleared { pub hash: ::subxt::utils::H256, @@ -1796,7 +1939,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -1825,7 +1968,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_preimage::RequestStatus< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -1912,8 +2055,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -1929,8 +2076,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -1946,8 +2097,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -2548,8 +2703,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -2677,42 +2836,52 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Claim { pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Free { pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub index: ::core::primitive::u32, pub freeze: ::core::primitive::bool, } @@ -2720,8 +2889,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Freeze { pub index: ::core::primitive::u32, } @@ -2783,10 +2956,7 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -2858,10 +3028,7 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, freeze: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { @@ -2920,11 +3087,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A account index was assigned."] pub struct IndexAssigned { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for IndexAssigned { @@ -2935,8 +3106,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A account index has been freed up (unassigned)."] pub struct IndexFreed { pub index: ::core::primitive::u32, @@ -2948,12 +3123,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A account index has been frozen to its current account ID."] pub struct IndexFrozen { pub index: ::core::primitive::u32, - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for IndexFrozen { const PALLET: &'static str = "Indices"; @@ -2970,7 +3149,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::bool, )>, @@ -2998,7 +3177,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::bool, )>, @@ -3055,26 +3234,28 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Transfer { - pub dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub new_free: ::core::primitive::u128, #[codec(compact)] @@ -3083,55 +3264,56 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub keep_alive: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub amount: ::core::primitive::u128, } pub struct TransactionApi; @@ -3163,10 +3345,7 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3191,10 +3370,7 @@ pub mod api { #[doc = "The dispatch origin for this call is `root`."] pub fn set_balance( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { @@ -3222,14 +3398,8 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - source: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3256,10 +3426,7 @@ pub mod api { #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3293,10 +3460,7 @@ pub mod api { #[doc = " #"] pub fn transfer_all( &self, - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, keep_alive: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3316,10 +3480,7 @@ pub mod api { #[doc = "Can only be called by ROOT."] pub fn force_unreserve( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3343,11 +3504,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account was created with some free balance."] pub struct Endowed { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub free_balance: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Endowed { @@ -3357,12 +3522,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] #[doc = "resulting in an outright loss."] pub struct DustLost { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for DustLost { @@ -3372,12 +3541,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Transfer succeeded."] pub struct Transfer { - pub from: ::subxt::utils::account_id::AccountId32, - pub to: ::subxt::utils::account_id::AccountId32, + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Transfer { @@ -3387,11 +3560,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A balance was set by root."] pub struct BalanceSet { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub free: ::core::primitive::u128, pub reserved: ::core::primitive::u128, } @@ -3402,11 +3579,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some balance was reserved (moved from free to reserved)."] pub struct Reserved { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Reserved { @@ -3416,11 +3597,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some balance was unreserved (moved from reserved to free)."] pub struct Unreserved { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unreserved { @@ -3430,13 +3615,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some 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::account_id::AccountId32, - pub to: ::subxt::utils::account_id::AccountId32, + 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, @@ -3448,11 +3637,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some amount was deposited (e.g. for transaction fees)."] pub struct Deposit { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Deposit { @@ -3462,11 +3655,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] pub struct Withdraw { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Withdraw { @@ -3476,11 +3673,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] pub struct Slashed { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -3539,7 +3740,7 @@ pub mod api { #[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::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_balances::AccountData< @@ -3617,7 +3818,7 @@ pub mod api { #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< @@ -3676,7 +3877,7 @@ pub mod api { #[doc = " Named reserves on some account balances."] pub fn reserves( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -3829,12 +4030,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub actual_fee: ::core::primitive::u128, pub tip: ::core::primitive::u128, } @@ -3948,8 +4153,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetUncles { pub new_uncles: ::std::vec::Vec< runtime_types::sp_runtime::generic::header::Header< @@ -3997,7 +4206,7 @@ pub mod api { runtime_types::pallet_authorship::UncleEntryItem< ::core::primitive::u32, ::subxt::utils::H256, - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, >, @@ -4021,9 +4230,7 @@ pub mod api { pub fn author( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), (), @@ -4100,24 +4307,30 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub controller: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BondExtra { #[codec(compact)] pub max_additional: ::core::primitive::u128, @@ -4125,8 +4338,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -4135,64 +4352,87 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct WithdrawUnbonded { pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Validate { pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Chill; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, >, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetController { - pub controller: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub controller: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -4200,8 +4440,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -4209,52 +4453,79 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ScaleValidatorCount { pub factor: runtime_types::sp_arithmetic::per_things::Percent, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceNoEras; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceNewEra; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceNewEraAlways; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -4262,17 +4533,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub validator_stash: ::subxt::utils::AccountId32, pub era: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -4280,30 +4559,39 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetStakingConfigs { pub min_nominator_bond: runtime_types::pallet_staking::pallet::pallet::ConfigOp< @@ -4333,18 +4621,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub controller: ::subxt::utils::AccountId32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub validator_stash: ::subxt::utils::AccountId32, } pub struct TransactionApi; impl TransactionApi { @@ -4367,13 +4663,13 @@ pub mod api { #[doc = "# "] pub fn bond( &self, - controller: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4524,10 +4820,7 @@ pub mod api { pub fn nominate( &self, targets: ::std::vec::Vec< - ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4585,7 +4878,7 @@ pub mod api { pub fn set_payee( &self, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4618,8 +4911,8 @@ pub mod api { #[doc = "# "] pub fn set_controller( &self, - controller: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -4770,9 +5063,7 @@ pub mod api { #[doc = "The dispatch origin must be Root."] pub fn set_invulnerables( &self, - invulnerables: ::std::vec::Vec< - ::subxt::utils::account_id::AccountId32, - >, + invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Staking", @@ -4791,7 +5082,7 @@ pub mod api { #[doc = "The dispatch origin must be Root."] pub fn force_unstake( &self, - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4878,7 +5169,7 @@ pub mod api { #[doc = "# "] pub fn payout_stakers( &self, - validator_stash: ::subxt::utils::account_id::AccountId32, + validator_stash: ::subxt::utils::AccountId32, era: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4935,7 +5226,7 @@ pub mod api { #[doc = "Refunds the transaction fees upon successful execution."] pub fn reap_stash( &self, - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -4967,10 +5258,7 @@ pub mod api { pub fn kick( &self, who: ::std::vec::Vec< - ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -5058,7 +5346,7 @@ pub mod api { #[doc = "who do not satisfy these requirements."] pub fn chill_other( &self, - controller: ::subxt::utils::account_id::AccountId32, + controller: ::subxt::utils::AccountId32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Staking", @@ -5077,7 +5365,7 @@ pub mod api { #[doc = "can call this."] pub fn force_apply_min_commission( &self, - validator_stash: ::subxt::utils::account_id::AccountId32, + validator_stash: ::subxt::utils::AccountId32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -5101,8 +5389,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The 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 { @@ -5117,11 +5409,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The nominator has been rewarded by this amount."] pub struct Rewarded { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Rewarded { @@ -5131,11 +5427,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] pub struct Slashed { - pub staker: ::subxt::utils::account_id::AccountId32, + pub staker: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -5146,8 +5446,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An old slashing report from a prior era was discarded because it could"] #[doc = "not be processed."] pub struct OldSlashingReportDiscarded { @@ -5160,8 +5464,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new set of stakers was elected."] pub struct StakersElected; impl ::subxt::events::StaticEvent for StakersElected { @@ -5171,14 +5479,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has 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::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Bonded { @@ -5188,11 +5500,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has unbonded this amount."] pub struct Unbonded { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unbonded { @@ -5202,12 +5518,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue."] pub struct Withdrawn { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Withdrawn { @@ -5217,12 +5537,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A nominator has been kicked from a validator."] pub struct Kicked { - pub nominator: ::subxt::utils::account_id::AccountId32, - pub stash: ::subxt::utils::account_id::AccountId32, + pub nominator: ::subxt::utils::AccountId32, + pub stash: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Kicked { const PALLET: &'static str = "Staking"; @@ -5231,8 +5555,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The election failed. No new era is planned."] pub struct StakingElectionFailed; impl ::subxt::events::StaticEvent for StakingElectionFailed { @@ -5242,11 +5570,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has stopped participating as either a validator or nominator."] pub struct Chilled { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Chilled { const PALLET: &'static str = "Staking"; @@ -5255,12 +5587,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The stakers' rewards are getting paid."] pub struct PayoutStarted { pub era_index: ::core::primitive::u32, - pub validator_stash: ::subxt::utils::account_id::AccountId32, + pub validator_stash: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for PayoutStarted { const PALLET: &'static str = "Staking"; @@ -5269,11 +5605,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A validator has set their preferences."] pub struct ValidatorPrefsSet { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } impl ::subxt::events::StaticEvent for ValidatorPrefsSet { @@ -5334,7 +5674,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -5355,11 +5695,9 @@ pub mod api { #[doc = " Map from all locked \"stash\" accounts to the controller account."] pub fn bonded( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -5383,9 +5721,7 @@ pub mod api { pub fn bonded_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, (), (), ::subxt::storage::address::Yes, @@ -5472,7 +5808,7 @@ pub mod api { #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] pub fn ledger( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::StakingLedger, @@ -5522,11 +5858,11 @@ pub mod api { #[doc = " Where the reward payment should be made. Keyed by stash."] pub fn payee( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -5554,7 +5890,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, (), @@ -5576,7 +5912,7 @@ pub mod api { #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] pub fn validators( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::ValidatorPrefs, @@ -5685,7 +6021,7 @@ pub mod api { #[doc = " [`Call::chill_other`] dispatchable by anyone."] pub fn nominators( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Nominations, @@ -5902,11 +6238,11 @@ pub mod api { pub fn eras_stakers( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -5946,7 +6282,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -5980,11 +6316,11 @@ pub mod api { pub fn eras_stakers_clipped( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -6029,7 +6365,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -6057,7 +6393,7 @@ pub mod api { pub fn eras_validator_prefs( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::ValidatorPrefs, @@ -6172,7 +6508,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::EraRewardPoints< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -6201,7 +6537,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::EraRewardPoints< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, (), @@ -6346,7 +6682,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -6377,7 +6713,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -6429,7 +6765,7 @@ pub mod api { pub fn validator_slash_in_era( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_arithmetic::per_things::Perbill, @@ -6489,7 +6825,7 @@ pub mod api { pub fn nominator_slash_in_era( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, ::subxt::storage::address::Yes, @@ -6541,7 +6877,7 @@ pub mod api { #[doc = " Slashing spans for stash accounts."] pub fn slashing_spans( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_staking::slashing::SlashingSpans, @@ -6592,7 +6928,7 @@ pub mod api { #[doc = " as well as how much reward has been paid out."] pub fn span_slash( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< @@ -6925,8 +7261,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "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\\]."] @@ -6950,11 +7290,11 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, ), @@ -6985,11 +7325,11 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_staking::offence::OffenceDetails< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, ), @@ -7146,8 +7486,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetKeys { pub keys: runtime_types::polkadot_runtime::SessionKeys, pub proof: ::std::vec::Vec<::core::primitive::u8>, @@ -7155,8 +7499,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PurgeKeys; pub struct TransactionApi; impl TransactionApi { @@ -7230,8 +7578,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "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 { @@ -7251,7 +7603,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -7319,7 +7671,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::polkadot_runtime::SessionKeys, )>, >, @@ -7369,7 +7721,7 @@ pub mod api { #[doc = " The next session keys for a validator."] pub fn next_keys( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime::SessionKeys, @@ -7422,9 +7774,7 @@ pub mod api { _0: impl ::std::borrow::Borrow, _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -7448,9 +7798,7 @@ pub mod api { pub fn key_owner_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, (), (), ::subxt::storage::address::Yes, @@ -7481,8 +7829,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -7495,8 +7847,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -7509,8 +7865,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -7616,8 +7976,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "New authority set has been applied."] pub struct NewAuthorities { pub authority_set: ::std::vec::Vec<( @@ -7632,8 +7996,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Current authority set has been paused."] pub struct Paused; impl ::subxt::events::StaticEvent for Paused { @@ -7643,8 +8011,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Current authority set has been resumed."] pub struct Resumed; impl ::subxt::events::StaticEvent for Resumed { @@ -7862,8 +8234,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -7912,8 +8288,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new heartbeat was received from `AuthorityId`."] pub struct HeartbeatReceived { pub authority_id: @@ -7926,8 +8306,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "At the end of the session, no offence was committed."] pub struct AllGood; impl ::subxt::events::StaticEvent for AllGood { @@ -7937,14 +8321,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "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::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, )>, @@ -8082,7 +8470,7 @@ pub mod api { pub fn authored_blocks( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, @@ -8176,8 +8564,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Propose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, @@ -8188,8 +8580,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -8197,8 +8593,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vote { #[codec(compact)] pub ref_index: ::core::primitive::u32, @@ -8210,16 +8610,24 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EmergencyCancel { pub ref_index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalPropose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, @@ -8228,8 +8636,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeMajority { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, @@ -8238,8 +8650,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeDefault { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, @@ -8248,8 +8664,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FastTrack { pub proposal_hash: ::subxt::utils::H256, pub voting_period: ::core::primitive::u32, @@ -8258,16 +8678,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VetoExternal { pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -8275,65 +8703,84 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Undelegate; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClearPublicProposals; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveVote { pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -8341,8 +8788,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -8641,10 +9092,7 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn delegate( &self, - to: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { @@ -8718,10 +9166,7 @@ pub mod api { #[doc = "Weight: `O(R)` with R number of vote of target."] pub fn unlock( &self, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Democracy", @@ -8795,10 +9240,7 @@ pub mod api { #[doc = " Weight is calculated for the maximum number of vote."] pub fn remove_other_vote( &self, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -8880,8 +9322,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion has been proposed by a public account."] pub struct Proposed { pub proposal_index: ::core::primitive::u32, @@ -8894,8 +9340,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A public proposal has been tabled for referendum vote."] pub struct Tabled { pub proposal_index: ::core::primitive::u32, @@ -8908,8 +9358,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An external proposal has been tabled."] pub struct ExternalTabled; impl ::subxt::events::StaticEvent for ExternalTabled { @@ -8919,8 +9373,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A referendum has begun."] pub struct Started { pub ref_index: ::core::primitive::u32, @@ -8935,8 +9393,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal has been approved by referendum."] pub struct Passed { pub ref_index: ::core::primitive::u32, @@ -8949,8 +9411,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal has been rejected by referendum."] pub struct NotPassed { pub ref_index: ::core::primitive::u32, @@ -8963,8 +9429,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A referendum has been cancelled."] pub struct Cancelled { pub ref_index: ::core::primitive::u32, @@ -8976,12 +9446,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has delegated their vote to another account."] pub struct Delegated { - pub who: ::subxt::utils::account_id::AccountId32, - pub target: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, + pub target: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Delegated { const PALLET: &'static str = "Democracy"; @@ -8990,11 +9464,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has cancelled a previous delegation operation."] pub struct Undelegated { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Undelegated { const PALLET: &'static str = "Democracy"; @@ -9003,11 +9481,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An external proposal has been vetoed."] pub struct Vetoed { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub proposal_hash: ::subxt::utils::H256, pub until: ::core::primitive::u32, } @@ -9018,8 +9500,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal_hash has been blacklisted permanently."] pub struct Blacklisted { pub proposal_hash: ::subxt::utils::H256, @@ -9031,11 +9517,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has voted in a referendum"] pub struct Voted { - pub voter: ::subxt::utils::account_id::AccountId32, + pub voter: ::subxt::utils::AccountId32, pub ref_index: ::core::primitive::u32, pub vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, @@ -9048,11 +9538,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has secconded a proposal"] pub struct Seconded { - pub seconder: ::subxt::utils::account_id::AccountId32, + pub seconder: ::subxt::utils::AccountId32, pub prop_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Seconded { @@ -9063,8 +9557,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal got canceled."] pub struct ProposalCanceled { pub prop_index: ::core::primitive::u32, @@ -9109,7 +9607,7 @@ pub mod api { runtime_types::frame_support::traits::preimages::Bounded< runtime_types::polkadot_runtime::RuntimeCall, >, - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, )>, >, ::subxt::storage::address::Yes, @@ -9137,7 +9635,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ::core::primitive::u128, )>, @@ -9168,7 +9666,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ::core::primitive::u128, )>, @@ -9303,12 +9801,12 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _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::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -9341,7 +9839,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -9421,7 +9919,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, ::subxt::storage::address::Yes, @@ -9451,7 +9949,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, (), @@ -9752,19 +10250,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, - pub prime: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, pub old_count: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: ::std::boxed::Box, @@ -9774,8 +10279,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -9787,8 +10296,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vote { pub proposal: ::subxt::utils::H256, #[codec(compact)] @@ -9798,8 +10311,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CloseOldWeight { pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] @@ -9812,16 +10329,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisapproveProposal { pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Close { pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] @@ -9866,10 +10391,8 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, - prime: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, + 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( @@ -10156,12 +10679,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub proposal_index: ::core::primitive::u32, pub proposal_hash: ::subxt::utils::H256, pub threshold: ::core::primitive::u32, @@ -10173,12 +10700,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub proposal_hash: ::subxt::utils::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, @@ -10191,8 +10722,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was approved by the required threshold."] pub struct Approved { pub proposal_hash: ::subxt::utils::H256, @@ -10204,8 +10739,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { pub proposal_hash: ::subxt::utils::H256, @@ -10217,8 +10756,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { pub proposal_hash: ::subxt::utils::H256, @@ -10232,8 +10775,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { pub proposal_hash: ::subxt::utils::H256, @@ -10247,8 +10794,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { pub proposal_hash: ::subxt::utils::H256, @@ -10346,7 +10897,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -10375,7 +10926,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -10421,7 +10972,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -10443,9 +10994,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), (), @@ -10476,19 +11025,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, - pub prime: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub prime: ::core::option::Option<::subxt::utils::AccountId32>, pub old_count: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: ::std::boxed::Box, @@ -10498,8 +11054,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Propose { #[codec(compact)] pub threshold: ::core::primitive::u32, @@ -10511,8 +11071,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vote { pub proposal: ::subxt::utils::H256, #[codec(compact)] @@ -10522,8 +11086,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CloseOldWeight { pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] @@ -10536,16 +11104,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisapproveProposal { pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Close { pub proposal_hash: ::subxt::utils::H256, #[codec(compact)] @@ -10590,10 +11166,8 @@ pub mod api { #[doc = "# "] pub fn set_members( &self, - new_members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, - prime: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, + 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( @@ -10880,12 +11454,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] #[doc = "`MemberCount`)."] pub struct Proposed { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub proposal_index: ::core::primitive::u32, pub proposal_hash: ::subxt::utils::H256, pub threshold: ::core::primitive::u32, @@ -10897,12 +11475,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub proposal_hash: ::subxt::utils::H256, pub voted: ::core::primitive::bool, pub yes: ::core::primitive::u32, @@ -10915,8 +11497,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was approved by the required threshold."] pub struct Approved { pub proposal_hash: ::subxt::utils::H256, @@ -10928,8 +11514,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was not approved by the required threshold."] pub struct Disapproved { pub proposal_hash: ::subxt::utils::H256, @@ -10941,8 +11531,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A motion was executed; result will be `Ok` if it returned without error."] pub struct Executed { pub proposal_hash: ::subxt::utils::H256, @@ -10956,8 +11550,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A single member did some action; result will be `Ok` if it returned without error."] pub struct MemberExecuted { pub proposal_hash: ::subxt::utils::H256, @@ -10971,8 +11569,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] pub struct Closed { pub proposal_hash: ::subxt::utils::H256, @@ -11070,7 +11672,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -11099,7 +11701,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_collective::Votes< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u32, >, >, @@ -11145,7 +11747,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -11167,9 +11769,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), (), @@ -11200,24 +11800,36 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vote { - pub votes: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>, #[codec(compact)] pub value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveVoter; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SubmitCandidacy { #[codec(compact)] pub candidate_count: ::core::primitive::u32, @@ -11225,29 +11837,38 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RenounceCandidacy { pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveMember { - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub slash_bond: ::core::primitive::bool, pub rerun_election: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CleanDefunctVoters { pub num_voters: ::core::primitive::u32, pub num_defunct: ::core::primitive::u32, @@ -11279,7 +11900,7 @@ pub mod api { #[doc = "# "] pub fn vote( &self, - votes: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + votes: ::std::vec::Vec<::subxt::utils::AccountId32>, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -11397,10 +12018,7 @@ pub mod api { #[doc = "# "] pub fn remove_member( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, slash_bond: ::core::primitive::bool, rerun_election: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { @@ -11459,8 +12077,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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"] @@ -11468,7 +12090,7 @@ pub mod api { #[doc = "begin with."] pub struct NewTerm { pub new_members: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, )>, } @@ -11479,8 +12101,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "No (or not enough) candidates existed for this round. This is different from"] #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] pub struct EmptyTerm; @@ -11491,8 +12117,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Internal error happened while trying to perform election."] pub struct ElectionError; impl ::subxt::events::StaticEvent for ElectionError { @@ -11502,12 +12132,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] pub struct MemberKicked { - pub member: ::subxt::utils::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for MemberKicked { const PALLET: &'static str = "PhragmenElection"; @@ -11516,11 +12150,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Someone has renounced their candidacy."] pub struct Renounced { - pub candidate: ::subxt::utils::account_id::AccountId32, + pub candidate: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Renounced { const PALLET: &'static str = "PhragmenElection"; @@ -11529,14 +12167,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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::account_id::AccountId32, + pub candidate: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for CandidateSlashed { @@ -11546,11 +12188,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] pub struct SeatHolderSlashed { - pub seat_holder: ::subxt::utils::account_id::AccountId32, + pub seat_holder: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SeatHolderSlashed { @@ -11571,7 +12217,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -11602,7 +12248,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -11634,7 +12280,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, )>, >, @@ -11680,11 +12326,11 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -11715,7 +12361,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -11920,75 +12566,85 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddMember { - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveMember { - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SwapMember { - pub remove: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub add: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ResetMembers { - pub members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + pub members: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ChangeKey { - pub new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetPrime { - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClearPrime; pub struct TransactionApi; impl TransactionApi { @@ -11997,10 +12653,7 @@ pub mod api { #[doc = "May only be called from `T::AddOrigin`."] pub fn add_member( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12019,10 +12672,7 @@ pub mod api { #[doc = "May only be called from `T::RemoveOrigin`."] pub fn remove_member( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12043,14 +12693,8 @@ pub mod api { #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] pub fn swap_member( &self, - remove: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - add: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12070,7 +12714,7 @@ pub mod api { #[doc = "May only be called from `T::ResetOrigin`."] pub fn reset_members( &self, - members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + members: ::std::vec::Vec<::subxt::utils::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12091,10 +12735,7 @@ pub mod api { #[doc = "Prime membership is passed from the origin account to `new`, if extant."] pub fn change_key( &self, - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12113,10 +12754,7 @@ pub mod api { #[doc = "May only be called from `T::PrimeOrigin`."] pub fn set_prime( &self, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", @@ -12155,8 +12793,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given member was added; see the transaction for who."] pub struct MemberAdded; impl ::subxt::events::StaticEvent for MemberAdded { @@ -12166,8 +12808,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given member was removed; see the transaction for who."] pub struct MemberRemoved; impl ::subxt::events::StaticEvent for MemberRemoved { @@ -12177,8 +12823,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Two members were swapped; see the transaction for who."] pub struct MembersSwapped; impl ::subxt::events::StaticEvent for MembersSwapped { @@ -12188,8 +12838,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The membership was reset; see the transaction for who the new set is."] pub struct MembersReset; impl ::subxt::events::StaticEvent for MembersReset { @@ -12199,8 +12853,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "One of the members' keys changed."] pub struct KeyChanged; impl ::subxt::events::StaticEvent for KeyChanged { @@ -12210,8 +12868,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Phantom member, never used."] pub struct Dummy; impl ::subxt::events::StaticEvent for Dummy { @@ -12229,7 +12891,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -12252,9 +12914,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::subxt::utils::account_id::AccountId32, - >, + ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, (), (), @@ -12285,21 +12945,27 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RejectProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, @@ -12307,8 +12973,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ApproveProposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, @@ -12316,21 +12986,27 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Spend { #[codec(compact)] pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveApproval { #[codec(compact)] pub proposal_id: ::core::primitive::u32, @@ -12349,8 +13025,8 @@ pub mod api { pub fn propose_spend( &self, value: ::core::primitive::u128, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12428,8 +13104,8 @@ pub mod api { pub fn spend( &self, amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -12489,8 +13165,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "New proposal."] pub struct Proposed { pub proposal_index: ::core::primitive::u32, @@ -12503,8 +13183,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "We have ended a spend period and will now allocate funds."] pub struct Spending { pub budget_remaining: ::core::primitive::u128, @@ -12516,13 +13200,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some funds have been allocated."] pub struct Awarded { pub proposal_index: ::core::primitive::u32, pub award: ::core::primitive::u128, - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "Treasury"; @@ -12531,8 +13219,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proposal was rejected; funds were slashed."] pub struct Rejected { pub proposal_index: ::core::primitive::u32, @@ -12546,8 +13238,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some of our funds have been burnt."] pub struct Burnt { pub burnt_funds: ::core::primitive::u128, @@ -12560,8 +13256,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Spending has finished; this is the amount that rolls over until next spend."] pub struct Rollover { pub rollover_balance: ::core::primitive::u128, @@ -12574,8 +13274,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some funds have been deposited."] pub struct Deposit { pub value: ::core::primitive::u128, @@ -12587,13 +13291,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new spend proposal has been approved."] pub struct SpendApproved { pub proposal_index: ::core::primitive::u32, pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::account_id::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for SpendApproved { const PALLET: &'static str = "Treasury"; @@ -12632,7 +13340,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_treasury::Proposal< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -12661,7 +13369,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_treasury::Proposal< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -12856,18 +13564,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Claim { - pub dest: ::subxt::utils::account_id::AccountId32, + pub dest: ::subxt::utils::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MintClaim { pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub value: ::core::primitive::u128, @@ -12883,10 +13599,14 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClaimAttest { - pub dest: ::subxt::utils::account_id::AccountId32, + pub dest: ::subxt::utils::AccountId32, pub ethereum_signature: runtime_types::polkadot_runtime_common::claims::EcdsaSignature, pub statement: ::std::vec::Vec<::core::primitive::u8>, @@ -12894,21 +13614,28 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Attest { pub statement: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MoveClaim { pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub maybe_preclaim: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, } pub struct TransactionApi; impl TransactionApi { @@ -12938,7 +13665,7 @@ pub mod api { #[doc = ""] pub fn claim( &self, - dest: ::subxt::utils::account_id::AccountId32, + dest: ::subxt::utils::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -13029,7 +13756,7 @@ pub mod api { #[doc = ""] pub fn claim_attest( &self, - dest: ::subxt::utils::account_id::AccountId32, + dest: ::subxt::utils::AccountId32, ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, statement: ::std::vec::Vec<::core::primitive::u8>, ) -> ::subxt::tx::StaticTxPayload { @@ -13086,9 +13813,7 @@ pub mod api { &self, old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - maybe_preclaim: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, + maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Claims", @@ -13115,11 +13840,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Someone claimed some DOTs."] pub struct Claimed { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub ethereum_address: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub amount: ::core::primitive::u128, @@ -13316,7 +14045,7 @@ pub mod api { #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] pub fn preclaims( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::claims::EthereumAddress, @@ -13401,30 +14130,36 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vest; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VestOther { - pub target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VestedTransfer { - pub target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -13433,17 +14168,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceVestedTransfer { - pub source: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -13452,8 +14185,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MergeSchedules { pub schedule1_index: ::core::primitive::u32, pub schedule2_index: ::core::primitive::u32, @@ -13503,10 +14240,7 @@ pub mod api { #[doc = "# "] pub fn vest_other( &self, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Vesting", @@ -13539,10 +14273,7 @@ pub mod api { #[doc = "# "] pub fn vested_transfer( &self, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -13580,14 +14311,8 @@ pub mod api { #[doc = "# "] pub fn force_vested_transfer( &self, - source: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, @@ -13659,12 +14384,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The amount vested has been updated. This could indicate a change in funds available."] #[doc = "The balance given is the amount which is left unvested (and thus locked)."] pub struct VestingUpdated { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub unvested: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for VestingUpdated { @@ -13674,11 +14403,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An \\[account\\] has become fully vested."] pub struct VestingCompleted { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for VestingCompleted { const PALLET: &'static str = "Vesting"; @@ -13692,7 +14425,7 @@ pub mod api { #[doc = " Information regarding the vesting of a given account."] pub fn vesting( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -13827,16 +14560,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Batch { pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -13844,16 +14585,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BatchAll { pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DispatchAs { pub as_origin: ::std::boxed::Box, @@ -13862,8 +14611,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, } @@ -14036,8 +14789,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] #[doc = "well as the error."] pub struct BatchInterrupted { @@ -14051,8 +14808,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Batch of dispatches completed fully with no error."] pub struct BatchCompleted; impl ::subxt::events::StaticEvent for BatchCompleted { @@ -14062,8 +14823,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Batch of dispatches completed but has errors."] pub struct BatchCompletedWithErrors; impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { @@ -14073,8 +14838,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A single item within a Batch of dispatches has completed with no error."] pub struct ItemCompleted; impl ::subxt::events::StaticEvent for ItemCompleted { @@ -14084,8 +14853,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A single item within a Batch of dispatches has completed with error."] pub struct ItemFailed { pub error: runtime_types::sp_runtime::DispatchError, @@ -14097,8 +14870,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A call was dispatched."] pub struct DispatchedAs { pub result: @@ -14144,19 +14921,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddRegistrar { - pub account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetIdentity { pub info: ::std::boxed::Box< runtime_types::pallet_identity::types::IdentityInfo, @@ -14165,25 +14948,37 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetSubs { pub subs: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClearIdentity; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RequestJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, @@ -14194,16 +14989,24 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CancelRequest { pub reg_index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetFee { #[codec(compact)] pub index: ::core::primitive::u32, @@ -14213,21 +15016,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, - pub new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetFields { #[codec(compact)] pub index: ::core::primitive::u32, @@ -14238,15 +15046,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, - pub target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -14255,54 +15064,62 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KillIdentity { - pub target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddSub { - pub sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RenameSub { - pub sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveSub { - pub sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct QuitSub; pub struct TransactionApi; impl TransactionApi { @@ -14321,8 +15138,8 @@ pub mod api { #[doc = "# "] pub fn add_registrar( &self, - account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -14399,7 +15216,7 @@ pub mod api { pub fn set_subs( &self, subs: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, ) -> ::subxt::tx::StaticTxPayload { @@ -14567,10 +15384,7 @@ pub mod api { pub fn set_account_id( &self, index: ::core::primitive::u32, - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", @@ -14639,10 +15453,7 @@ pub mod api { pub fn provide_judgement( &self, reg_index: ::core::primitive::u32, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -14686,10 +15497,7 @@ pub mod api { #[doc = "# "] pub fn kill_identity( &self, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", @@ -14712,10 +15520,7 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn add_sub( &self, - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -14736,10 +15541,7 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn rename_sub( &self, - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -14763,10 +15565,7 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn remove_sub( &self, - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", @@ -14812,11 +15611,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A name was set or reset (which will remove all judgements)."] pub struct IdentitySet { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for IdentitySet { const PALLET: &'static str = "Identity"; @@ -14825,11 +15628,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A name was cleared, and the given balance returned."] pub struct IdentityCleared { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for IdentityCleared { @@ -14839,11 +15646,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A name was removed and the given balance slashed."] pub struct IdentityKilled { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for IdentityKilled { @@ -14853,11 +15664,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A judgement was asked from a registrar."] pub struct JudgementRequested { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementRequested { @@ -14867,11 +15682,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A judgement request was retracted."] pub struct JudgementUnrequested { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementUnrequested { @@ -14881,11 +15700,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A judgement was given by a registrar."] pub struct JudgementGiven { - pub target: ::subxt::utils::account_id::AccountId32, + pub target: ::subxt::utils::AccountId32, pub registrar_index: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for JudgementGiven { @@ -14896,8 +15719,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A registrar was added."] pub struct RegistrarAdded { pub registrar_index: ::core::primitive::u32, @@ -14909,12 +15736,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A sub-identity was added to an identity and the deposit paid."] pub struct SubIdentityAdded { - pub sub: ::subxt::utils::account_id::AccountId32, - pub main: ::subxt::utils::account_id::AccountId32, + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityAdded { @@ -14924,12 +15755,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A sub-identity was removed from an identity and the deposit freed."] pub struct SubIdentityRemoved { - pub sub: ::subxt::utils::account_id::AccountId32, - pub main: ::subxt::utils::account_id::AccountId32, + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityRemoved { @@ -14939,13 +15774,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] #[doc = "main identity account to the sub-identity account."] pub struct SubIdentityRevoked { - pub sub: ::subxt::utils::account_id::AccountId32, - pub main: ::subxt::utils::account_id::AccountId32, + pub sub: ::subxt::utils::AccountId32, + pub main: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SubIdentityRevoked { @@ -14962,7 +15801,7 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_identity::types::Registration< @@ -15019,10 +15858,10 @@ pub mod api { #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] pub fn super_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, ::subxt::storage::address::Yes, @@ -15050,7 +15889,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, (), @@ -15076,12 +15915,12 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, ::subxt::storage::address::Yes, @@ -15114,7 +15953,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, (), @@ -15145,7 +15984,7 @@ pub mod api { ::core::option::Option< runtime_types::pallet_identity::types::RegistrarInfo< ::core::primitive::u128, - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, >, @@ -15292,13 +16131,14 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Proxy { - pub real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub force_proxy_type: ::core::option::Option, pub call: ::std::boxed::Box, @@ -15306,40 +16146,52 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddProxy { - pub delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveProxy { - pub delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveProxies; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CreatePure { pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, @@ -15348,13 +16200,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KillPure { - pub spawner: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub spawner: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub index: ::core::primitive::u16, #[codec(compact)] @@ -15365,53 +16219,56 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Announce { - pub real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveAnnouncement { - pub real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RejectAnnouncement { - pub delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProxyAnnounced { - pub delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub force_proxy_type: ::core::option::Option, pub call: ::std::boxed::Box, @@ -15431,10 +16288,7 @@ pub mod api { #[doc = "- `call`: The call to be made by the `real` account."] pub fn proxy( &self, - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -15467,8 +16321,8 @@ pub mod api { #[doc = "zero."] pub fn add_proxy( &self, - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15499,8 +16353,8 @@ pub mod api { #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] pub fn remove_proxy( &self, - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15601,8 +16455,8 @@ pub mod api { #[doc = "account whose `pure` call has corresponding parameters."] pub fn kill_pure( &self, - spawner: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + spawner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, proxy_type: runtime_types::polkadot_runtime::ProxyType, @@ -15645,10 +16499,7 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] pub fn announce( &self, - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -15675,10 +16526,7 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] pub fn remove_announcement( &self, - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -15705,8 +16553,8 @@ pub mod api { #[doc = "- `call_hash`: The hash of the call to be made."] pub fn reject_announcement( &self, - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, call_hash: ::subxt::utils::H256, @@ -15739,14 +16587,11 @@ pub mod api { #[doc = "- `call`: The call to be made by the `real` account."] pub fn proxy_announced( &self, - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -15778,8 +16623,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proxy was executed correctly, with the given."] pub struct ProxyExecuted { pub result: @@ -15792,13 +16641,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A pure account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] pub struct PureCreated { - pub pure: ::subxt::utils::account_id::AccountId32, - pub who: ::subxt::utils::account_id::AccountId32, + pub pure: ::subxt::utils::AccountId32, + pub who: ::subxt::utils::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub disambiguation_index: ::core::primitive::u16, } @@ -15809,12 +16662,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An announcement was placed to make a call in the future."] pub struct Announced { - pub real: ::subxt::utils::account_id::AccountId32, - pub proxy: ::subxt::utils::account_id::AccountId32, + pub real: ::subxt::utils::AccountId32, + pub proxy: ::subxt::utils::AccountId32, pub call_hash: ::subxt::utils::H256, } impl ::subxt::events::StaticEvent for Announced { @@ -15824,12 +16681,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proxy was added."] pub struct ProxyAdded { - pub delegator: ::subxt::utils::account_id::AccountId32, - pub delegatee: ::subxt::utils::account_id::AccountId32, + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } @@ -15840,12 +16701,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A proxy was removed."] pub struct ProxyRemoved { - pub delegator: ::subxt::utils::account_id::AccountId32, - pub delegatee: ::subxt::utils::account_id::AccountId32, + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, pub proxy_type: runtime_types::polkadot_runtime::ProxyType, pub delay: ::core::primitive::u32, } @@ -15862,12 +16727,12 @@ pub mod api { #[doc = " which are being delegated to, together with the amount held on deposit."] pub fn proxies( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _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_proxy::ProxyDefinition< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::polkadot_runtime::ProxyType, ::core::primitive::u32, >, @@ -15901,7 +16766,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::polkadot_runtime::ProxyType, ::core::primitive::u32, >, @@ -15927,12 +16792,12 @@ pub mod api { #[doc = " The announcements made by the proxy (key)."] pub fn announcements( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _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_proxy::Announcement< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::subxt::utils::H256, ::core::primitive::u32, >, @@ -15965,7 +16830,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType<( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< runtime_types::pallet_proxy::Announcement< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::subxt::utils::H256, ::core::primitive::u32, >, @@ -16123,22 +16988,28 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, pub call: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16148,12 +17019,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, pub maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16163,12 +17037,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + 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], @@ -16193,9 +17070,7 @@ pub mod api { #[doc = "# "] pub fn as_multi_threshold_1( &self, - other_signatories: ::std::vec::Vec< - ::subxt::utils::account_id::AccountId32, - >, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, call: runtime_types::polkadot_runtime::RuntimeCall, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -16261,9 +17136,7 @@ pub mod api { pub fn as_multi( &self, threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec< - ::subxt::utils::account_id::AccountId32, - >, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16326,9 +17199,7 @@ pub mod api { pub fn approve_as_multi( &self, threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec< - ::subxt::utils::account_id::AccountId32, - >, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, @@ -16382,9 +17253,7 @@ pub mod api { pub fn cancel_as_multi( &self, threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec< - ::subxt::utils::account_id::AccountId32, - >, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, @@ -16416,12 +17285,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new multisig operation has begun."] pub struct NewMultisig { - pub approving: ::subxt::utils::account_id::AccountId32, - pub multisig: ::subxt::utils::account_id::AccountId32, + pub approving: ::subxt::utils::AccountId32, + pub multisig: ::subxt::utils::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for NewMultisig { @@ -16431,14 +17304,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A multisig operation has been approved by someone."] pub struct MultisigApproval { - pub approving: ::subxt::utils::account_id::AccountId32, + pub approving: ::subxt::utils::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::account_id::AccountId32, + pub multisig: ::subxt::utils::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for MultisigApproval { @@ -16448,14 +17325,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A multisig operation has been executed."] pub struct MultisigExecuted { - pub approving: ::subxt::utils::account_id::AccountId32, + pub approving: ::subxt::utils::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::account_id::AccountId32, + pub multisig: ::subxt::utils::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, @@ -16467,14 +17348,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A multisig operation has been cancelled."] pub struct MultisigCancelled { - pub cancelling: ::subxt::utils::account_id::AccountId32, + pub cancelling: ::subxt::utils::AccountId32, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::account_id::AccountId32, + pub multisig: ::subxt::utils::AccountId32, pub call_hash: [::core::primitive::u8; 32usize], } impl ::subxt::events::StaticEvent for MultisigCancelled { @@ -16489,14 +17374,14 @@ pub mod api { #[doc = " The set of open multisig operations."] pub fn multisigs( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _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::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, ::subxt::storage::address::Yes, @@ -16513,7 +17398,7 @@ pub mod api { runtime_types::pallet_multisig::Multisig< ::core::primitive::u32, ::core::primitive::u128, - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, >, (), @@ -16610,8 +17495,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -16620,8 +17509,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ApproveBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -16629,23 +17522,29 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProposeCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub fee: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnassignCurator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -16653,8 +17552,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -16662,21 +17565,27 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClaimBounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, @@ -16684,8 +17593,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -16693,8 +17606,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -16765,8 +17682,8 @@ pub mod api { pub fn propose_curator( &self, bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, fee: ::core::primitive::u128, @@ -16859,8 +17776,8 @@ pub mod api { pub fn award_bounty( &self, bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -16967,8 +17884,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "New bounty proposal."] pub struct BountyProposed { pub index: ::core::primitive::u32, @@ -16980,8 +17901,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty proposal was rejected; funds were slashed."] pub struct BountyRejected { pub index: ::core::primitive::u32, @@ -16995,8 +17920,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty proposal is funded and became active."] pub struct BountyBecameActive { pub index: ::core::primitive::u32, @@ -17008,12 +17937,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty is awarded to a beneficiary."] pub struct BountyAwarded { pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::account_id::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for BountyAwarded { const PALLET: &'static str = "Bounties"; @@ -17022,13 +17955,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty is claimed by beneficiary."] pub struct BountyClaimed { pub index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::account_id::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for BountyClaimed { const PALLET: &'static str = "Bounties"; @@ -17038,8 +17975,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty is cancelled."] pub struct BountyCanceled { pub index: ::core::primitive::u32, @@ -17052,8 +17993,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A bounty expiry is extended."] pub struct BountyExtended { pub index: ::core::primitive::u32, @@ -17095,7 +18040,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bounties::Bounty< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17125,7 +18070,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bounties::Bounty< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17409,8 +18354,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -17421,25 +18370,31 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProposeCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub fee: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AcceptCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -17449,8 +18404,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnassignCurator { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -17460,23 +18419,29 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AwardChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, #[codec(compact)] pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClaimChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -17486,8 +18451,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CloseChildBounty { #[codec(compact)] pub parent_bounty_id: ::core::primitive::u32, @@ -17556,8 +18525,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, fee: ::core::primitive::u128, @@ -17693,8 +18662,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -17801,8 +18770,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A child-bounty is added."] pub struct Added { pub index: ::core::primitive::u32, @@ -17815,13 +18788,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A child-bounty is awarded to a beneficiary."] pub struct Awarded { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::account_id::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Awarded { const PALLET: &'static str = "ChildBounties"; @@ -17830,14 +18807,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A child-bounty is claimed by beneficiary."] pub struct Claimed { pub index: ::core::primitive::u32, pub child_index: ::core::primitive::u32, pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::account_id::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Claimed { const PALLET: &'static str = "ChildBounties"; @@ -17846,8 +18827,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A child-bounty is cancelled."] pub struct Canceled { pub index: ::core::primitive::u32, @@ -17939,7 +18924,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -17975,7 +18960,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, >, @@ -18150,42 +19135,52 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReportAwesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RetractTip { pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct TipNew { pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub tip_value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Tip { pub hash: ::subxt::utils::H256, #[codec(compact)] @@ -18194,16 +19189,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CloseTip { pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SlashTip { pub hash: ::subxt::utils::H256, } @@ -18231,10 +19234,7 @@ pub mod api { pub fn report_awesome( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Tips", @@ -18308,10 +19308,7 @@ pub mod api { pub fn tip_new( &self, reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, tip_value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -18440,8 +19437,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new tip suggestion has been opened."] pub struct NewTip { pub tip_hash: ::subxt::utils::H256, @@ -18453,8 +19454,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A tip suggestion has reached threshold and is closing."] pub struct TipClosing { pub tip_hash: ::subxt::utils::H256, @@ -18466,12 +19471,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A tip suggestion has been closed."] pub struct TipClosed { pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub payout: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for TipClosed { @@ -18481,8 +19490,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A tip suggestion has been retracted."] pub struct TipRetracted { pub tip_hash: ::subxt::utils::H256, @@ -18494,12 +19507,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A tip suggestion has been slashed."] pub struct TipSlashed { pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::account_id::AccountId32, + pub finder: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for TipSlashed { @@ -18520,7 +19537,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_tips::OpenTip< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::subxt::utils::H256, @@ -18553,7 +19570,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_tips::OpenTip< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::subxt::utils::H256, @@ -18736,14 +19753,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< runtime_types::sp_npos_elections::ElectionScore, @@ -18752,21 +19777,29 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Submit { pub raw_solution: ::std::boxed::Box< runtime_types::pallet_election_provider_multi_phase::RawSolution< @@ -18777,8 +19810,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -18854,9 +19891,9 @@ pub mod api { pub fn set_emergency_election_result( &self, supports: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, ) -> ::subxt::tx::StaticTxPayload @@ -18934,8 +19971,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A solution was stored with the given compute."] #[doc = ""] #[doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] @@ -18954,8 +19995,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The election has been finalized, with the given computation and score."] pub struct ElectionFinalized { pub compute: @@ -18969,8 +20014,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An election failed."] #[doc = ""] #[doc = "Not much can be said about which computes failed in the process."] @@ -18982,11 +20031,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has been rewarded for their signed submission being finalized."] pub struct Rewarded { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub value: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Rewarded { @@ -18996,11 +20049,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An account has been slashed for submitting an invalid signed submission."] pub struct Slashed { - pub account: ::subxt::utils::account_id::AccountId32, + pub account: ::subxt::utils::AccountId32, pub value: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -19011,8 +20068,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The signed phase of the given round has started."] pub struct SignedPhaseStarted { pub round: ::core::primitive::u32, @@ -19025,8 +20086,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The unsigned phase of the given round has started."] pub struct UnsignedPhaseStarted { pub round: ::core::primitive::u32, @@ -19224,7 +20289,7 @@ pub mod api { #[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 :: account_id :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + #[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 :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", @@ -19246,7 +20311,7 @@ pub mod api { #[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 :: account_id :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ + #[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 :: polkadot_runtime :: NposCompactSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ ::subxt::storage::address::StaticStorageAddress::new( "ElectionProviderMultiPhase", "SignedSubmissionsMap", @@ -19653,24 +20718,28 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub dislocated: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub lighter: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } pub struct TransactionApi; impl TransactionApi { @@ -19686,8 +20755,8 @@ pub mod api { #[doc = "If `dislocated` does not exists, it returns an error."] pub fn rebag( &self, - dislocated: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -19713,8 +20782,8 @@ pub mod api { #[doc = "- and `origin` has a greater `Score` than `lighter`."] pub fn put_in_front_of( &self, - lighter: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + lighter: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -19739,11 +20808,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Moved an account from one bag to another."] pub struct Rebagged { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub from: ::core::primitive::u64, pub to: ::core::primitive::u64, } @@ -19754,11 +20827,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Updated the score of some account to the given amount."] pub struct ScoreUpdated { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub new_score: ::core::primitive::u64, } impl ::subxt::events::StaticEvent for ScoreUpdated { @@ -19775,7 +20852,7 @@ pub mod api { #[doc = " Nodes store links forward and back within their respective bags."] pub fn list_nodes( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_bags_list::list::Node, @@ -19980,8 +21057,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -19990,8 +21071,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -20000,27 +21085,37 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClaimPayout; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub unbonding_points: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -20028,72 +21123,76 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - pub state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub pool_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, + pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -20101,8 +21200,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMetadata { pub pool_id: ::core::primitive::u32, pub metadata: ::std::vec::Vec<::core::primitive::u8>, @@ -20110,8 +21213,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -20133,26 +21240,34 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, >, pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, } @@ -20258,8 +21373,8 @@ pub mod api { #[doc = "`NoMoreChunks` error from the staking system."] pub fn unbond( &self, - member_account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, unbonding_points: ::core::primitive::u128, @@ -20326,8 +21441,8 @@ pub mod api { #[doc = "If the target is the depositor, the pool will be destroyed."] pub fn withdraw_unbonded( &self, - member_account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, num_slashing_spans: ::core::primitive::u32, @@ -20367,16 +21482,13 @@ pub mod api { pub fn create( &self, amount: ::core::primitive::u128, - root: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, - state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, ) -> ::subxt::tx::StaticTxPayload { @@ -20406,16 +21518,13 @@ pub mod api { pub fn create_with_pool_id( &self, amount: ::core::primitive::u128, - root: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, - nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, pool_id: ::core::primitive::u32, @@ -20448,7 +21557,7 @@ pub mod api { pub fn nominate( &self, pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "NominationPools", @@ -20568,13 +21677,13 @@ pub mod api { &self, pool_id: ::core::primitive::u32, new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -20626,11 +21735,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A pool has been created."] pub struct Created { - pub depositor: ::subxt::utils::account_id::AccountId32, + pub depositor: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, } impl ::subxt::events::StaticEvent for Created { @@ -20640,11 +21753,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A member has became bonded in a pool."] pub struct Bonded { - pub member: ::subxt::utils::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, pub bonded: ::core::primitive::u128, pub joined: ::core::primitive::bool, @@ -20656,11 +21773,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A payout has been made to a member."] pub struct PaidOut { - pub member: ::subxt::utils::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, pub payout: ::core::primitive::u128, } @@ -20671,8 +21792,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A member has unbonded from their pool."] #[doc = ""] #[doc = "- `balance` is the corresponding balance of the number of points that has been"] @@ -20685,7 +21810,7 @@ pub mod api { #[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::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, pub balance: ::core::primitive::u128, pub points: ::core::primitive::u128, @@ -20698,8 +21823,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A member has withdrawn from their pool."] #[doc = ""] #[doc = "The given number of `points` have been dissolved in return of `balance`."] @@ -20707,7 +21836,7 @@ pub mod api { #[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::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, pub pool_id: ::core::primitive::u32, pub balance: ::core::primitive::u128, pub points: ::core::primitive::u128, @@ -20720,8 +21849,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A pool has been destroyed."] pub struct Destroyed { pub pool_id: ::core::primitive::u32, @@ -20733,8 +21866,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The state of a pool has changed"] pub struct StateChanged { pub pool_id: ::core::primitive::u32, @@ -20747,14 +21884,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A 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::account_id::AccountId32, + pub member: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for MemberRemoved { const PALLET: &'static str = "NominationPools"; @@ -20763,16 +21904,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The 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::account_id::AccountId32>, - pub state_toggler: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, - pub nominator: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + pub root: ::core::option::Option<::subxt::utils::AccountId32>, + pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, + pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, } impl ::subxt::events::StaticEvent for RolesUpdated { const PALLET: &'static str = "NominationPools"; @@ -20781,8 +21924,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] pub struct PoolSlashed { pub pool_id: ::core::primitive::u32, @@ -20795,8 +21942,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] pub struct UnbondingPoolSlashed { pub pool_id: ::core::primitive::u32, @@ -20929,7 +22080,7 @@ pub mod api { #[doc = " Active members."] pub fn pool_members( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::pallet_nomination_pools::PoolMember, @@ -21316,7 +22467,7 @@ pub mod api { #[doc = " accounts are deterministically derived from it."] pub fn reverse_pool_id_lookup( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, @@ -21450,21 +22601,33 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RegisterFastUnstake; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Deregister; #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Control { pub unchecked_eras_to_check: ::core::primitive::u32, } @@ -21553,11 +22716,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A staker was unstaked."] pub struct Unstaked { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -21568,11 +22735,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] pub struct Slashed { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Slashed { @@ -21582,12 +22753,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] #[doc = "consequence."] pub struct Errored { - pub stash: ::subxt::utils::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Errored { const PALLET: &'static str = "FastUnstake"; @@ -21596,8 +22771,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An internal error happened. Operations will be paused now."] pub struct InternalError; impl ::subxt::events::StaticEvent for InternalError { @@ -21607,8 +22786,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A batch was partially checked for the given eras, but the process did not finish."] pub struct BatchChecked { pub eras: ::std::vec::Vec<::core::primitive::u32>, @@ -21620,8 +22803,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A batch was terminated."] #[doc = ""] #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] @@ -21664,7 +22851,7 @@ pub mod api { #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] pub fn queue( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, ::subxt::storage::address::Yes, @@ -21775,8 +22962,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetValidationUpgradeCooldown { pub new: ::core::primitive::u32, } @@ -21784,8 +22975,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetValidationUpgradeDelay { pub new: ::core::primitive::u32, } @@ -21793,8 +22988,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetCodeRetentionPeriod { pub new: ::core::primitive::u32, } @@ -21802,8 +23001,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxCodeSize { pub new: ::core::primitive::u32, } @@ -21811,8 +23014,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxPovSize { pub new: ::core::primitive::u32, } @@ -21820,8 +23027,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxHeadDataSize { pub new: ::core::primitive::u32, } @@ -21829,8 +23040,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetParathreadCores { pub new: ::core::primitive::u32, } @@ -21838,8 +23053,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetParathreadRetries { pub new: ::core::primitive::u32, } @@ -21847,8 +23066,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetGroupRotationFrequency { pub new: ::core::primitive::u32, } @@ -21856,8 +23079,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetChainAvailabilityPeriod { pub new: ::core::primitive::u32, } @@ -21865,8 +23092,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetThreadAvailabilityPeriod { pub new: ::core::primitive::u32, } @@ -21874,24 +23105,36 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetSchedulingLookahead { pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxValidatorsPerCore { pub new: ::core::option::Option<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxValidators { pub new: ::core::option::Option<::core::primitive::u32>, } @@ -21899,8 +23142,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetDisputePeriod { pub new: ::core::primitive::u32, } @@ -21908,8 +23155,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetDisputePostConclusionAcceptancePeriod { pub new: ::core::primitive::u32, } @@ -21917,8 +23168,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetDisputeMaxSpamSlots { pub new: ::core::primitive::u32, } @@ -21926,8 +23181,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetDisputeConclusionByTimeOutPeriod { pub new: ::core::primitive::u32, } @@ -21935,8 +23194,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetNoShowSlots { pub new: ::core::primitive::u32, } @@ -21944,8 +23207,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetNDelayTranches { pub new: ::core::primitive::u32, } @@ -21953,8 +23220,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetZerothDelayTrancheWidth { pub new: ::core::primitive::u32, } @@ -21962,8 +23233,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetNeededApprovals { pub new: ::core::primitive::u32, } @@ -21971,8 +23246,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetRelayVrfModuloSamples { pub new: ::core::primitive::u32, } @@ -21980,8 +23259,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxUpwardQueueCount { pub new: ::core::primitive::u32, } @@ -21989,8 +23272,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxUpwardQueueSize { pub new: ::core::primitive::u32, } @@ -21998,16 +23285,24 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxDownwardMessageSize { pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetUmpServiceTotalWeight { pub new: runtime_types::sp_weights::weight_v2::Weight, } @@ -22015,8 +23310,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxUpwardMessageSize { pub new: ::core::primitive::u32, } @@ -22024,8 +23323,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMaxUpwardMessageNumPerCandidate { pub new: ::core::primitive::u32, } @@ -22033,8 +23336,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpOpenRequestTtl { pub new: ::core::primitive::u32, } @@ -22042,8 +23349,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpSenderDeposit { pub new: ::core::primitive::u128, } @@ -22051,8 +23362,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpRecipientDeposit { pub new: ::core::primitive::u128, } @@ -22060,8 +23375,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpChannelMaxCapacity { pub new: ::core::primitive::u32, } @@ -22069,8 +23388,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpChannelMaxTotalSize { pub new: ::core::primitive::u32, } @@ -22078,8 +23401,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpMaxParachainInboundChannels { pub new: ::core::primitive::u32, } @@ -22087,8 +23414,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpMaxParathreadInboundChannels { pub new: ::core::primitive::u32, } @@ -22096,8 +23427,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpChannelMaxMessageSize { pub new: ::core::primitive::u32, } @@ -22105,8 +23440,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpMaxParachainOutboundChannels { pub new: ::core::primitive::u32, } @@ -22114,8 +23453,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpMaxParathreadOutboundChannels { pub new: ::core::primitive::u32, } @@ -22123,24 +23466,36 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetHrmpMaxMessageNumPerCandidate { pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetUmpMaxIndividualWeight { pub new: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetPvfCheckingEnabled { pub new: ::core::primitive::bool, } @@ -22148,8 +23503,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetPvfVotingTtl { pub new: ::core::primitive::u32, } @@ -22157,16 +23516,24 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetMinimumValidationUpgradeDelay { pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetBypassConsistencyCheck { pub new: ::core::primitive::bool, } @@ -23146,8 +24513,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A candidate was backed. `[candidate, head_data]`"] pub struct CandidateBacked( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< @@ -23164,8 +24535,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A candidate was included. `[candidate, head_data]`"] pub struct CandidateIncluded( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< @@ -23182,8 +24557,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A candidate timed out. `[candidate, head_data]`"] pub struct CandidateTimedOut( pub runtime_types::polkadot_primitives::v2::CandidateReceipt< @@ -23329,8 +24708,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Enter { pub data: runtime_types::polkadot_primitives::v2::InherentData< runtime_types::sp_runtime::generic::header::Header< @@ -23598,8 +24981,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceSetCurrentCode { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: @@ -23608,8 +24995,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceSetCurrentHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -23617,8 +25008,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceScheduleCodeUpgrade { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: @@ -23628,8 +25023,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceNoteNewHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -23637,16 +25036,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceQueueAction { pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddTrustedValidationCode { pub validation_code: runtime_types::polkadot_parachain::primitives::ValidationCode, @@ -23654,8 +25061,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PokeUnusedValidationCode { pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -23663,8 +25074,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IncludePvfCheckStatement { pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, pub signature: @@ -23852,8 +25267,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Current code has been updated for a Para. `para_id`"] pub struct CurrentCodeUpdated( pub runtime_types::polkadot_parachain::primitives::Id, @@ -23865,8 +25284,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Current head has been updated for a Para. `para_id`"] pub struct CurrentHeadUpdated( pub runtime_types::polkadot_parachain::primitives::Id, @@ -23878,8 +25301,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] pub struct CodeUpgradeScheduled( pub runtime_types::polkadot_parachain::primitives::Id, @@ -23891,8 +25318,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new head has been noted for a Para. `para_id`"] pub struct NewHeadNoted( pub runtime_types::polkadot_parachain::primitives::Id, @@ -23904,8 +25335,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A para has been queued to execute pending actions. `para_id`"] pub struct ActionQueued( pub runtime_types::polkadot_parachain::primitives::Id, @@ -23918,8 +25353,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] #[doc = "code. `code_hash` `para_id`"] pub struct PvfCheckStarted( @@ -23933,8 +25372,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given validation code was accepted by the PVF pre-checking vote."] #[doc = "`code_hash` `para_id`"] pub struct PvfCheckAccepted( @@ -23948,8 +25391,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The given validation code was rejected by the PVF pre-checking vote."] #[doc = "`code_hash` `para_id`"] pub struct PvfCheckRejected( @@ -24856,8 +26303,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceApprove { pub up_to: ::core::primitive::u32, } @@ -25056,8 +26507,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ServiceOverweight { pub index: ::core::primitive::u64, pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, @@ -25105,8 +26560,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Upward message is invalid XCM."] #[doc = "\\[ id \\]"] pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); @@ -25117,8 +26576,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Upward message is unsupported version of XCM."] #[doc = "\\[ id \\]"] pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); @@ -25129,8 +26592,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Upward message executed with the given outcome."] #[doc = "\\[ id, outcome \\]"] pub struct ExecutedUpward( @@ -25144,8 +26611,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The weight limit for handling upward messages was reached."] #[doc = "\\[ id, remaining, required \\]"] pub struct WeightExhausted( @@ -25160,8 +26631,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some upward messages have been received and will be processed."] #[doc = "\\[ para, count, size \\]"] pub struct UpwardMessagesReceived( @@ -25176,8 +26651,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The weight budget was exceeded for an individual upward message."] #[doc = ""] #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] @@ -25197,8 +26676,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Upward message from the overweight queue was executed with the given actual weight"] #[doc = "used."] #[doc = ""] @@ -25500,8 +26983,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpInitOpenChannel { pub recipient: runtime_types::polkadot_parachain::primitives::Id, pub proposed_max_capacity: ::core::primitive::u32, @@ -25510,16 +26997,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpAcceptOpenChannel { pub sender: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpCloseChannel { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -25527,8 +27022,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceCleanHrmp { pub para: runtime_types::polkadot_parachain::primitives::Id, pub inbound: ::core::primitive::u32, @@ -25538,8 +27037,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceProcessHrmpOpen { pub channels: ::core::primitive::u32, } @@ -25547,16 +27050,24 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceProcessHrmpClose { pub channels: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpCancelOpenRequest { pub channel_id: runtime_types::polkadot_parachain::primitives::HrmpChannelId, @@ -25565,8 +27076,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceOpenHrmpChannel { pub sender: runtime_types::polkadot_parachain::primitives::Id, pub recipient: runtime_types::polkadot_parachain::primitives::Id, @@ -25786,8 +27301,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Open HRMP channel requested."] #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] pub struct OpenChannelRequested( @@ -25803,8 +27322,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] #[doc = "`[by_parachain, channel_id]`"] pub struct OpenChannelCanceled( @@ -25818,8 +27341,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] pub struct OpenChannelAccepted( pub runtime_types::polkadot_parachain::primitives::Id, @@ -25832,8 +27359,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] pub struct ChannelClosed( pub runtime_types::polkadot_parachain::primitives::Id, @@ -25846,8 +27377,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An HRMP channel was opened via Root origin."] #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] pub struct HrmpChannelForceOpened( @@ -26598,7 +28133,7 @@ pub mod api { _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, ::subxt::storage::address::Yes, (), @@ -26624,7 +28159,7 @@ pub mod api { &self, ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, >, (), (), @@ -26656,8 +28191,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceUnfreeze; pub struct TransactionApi; impl TransactionApi { @@ -26686,8 +28225,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A dispute has been initiated. \\[candidate hash, dispute location\\]"] pub struct DisputeInitiated( pub runtime_types::polkadot_core_primitives::CandidateHash, @@ -26700,8 +28243,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A dispute has concluded for or against a candidate."] #[doc = "`\\[para id, candidate hash, dispute result\\]`"] pub struct DisputeConcluded( @@ -26715,8 +28262,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A dispute has timed out due to insufficient participation."] #[doc = "`\\[para id, candidate hash\\]`"] pub struct DisputeTimedOut( @@ -26730,8 +28281,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A dispute has concluded with supermajority against a candidate."] #[doc = "Block authors should no longer build on top of this head and should"] #[doc = "instead revert the block at the given height. This should be the"] @@ -26948,8 +28503,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Register { pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -26959,10 +28518,14 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceRegister { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub deposit: ::core::primitive::u128, pub id: runtime_types::polkadot_parachain::primitives::Id, pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -26972,16 +28535,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Deregister { pub id: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Swap { pub id: runtime_types::polkadot_parachain::primitives::Id, pub other: runtime_types::polkadot_parachain::primitives::Id, @@ -26989,30 +28560,46 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveLock { pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Reserve; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddLock { pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ScheduleCodeUpgrade { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_code: @@ -27021,8 +28608,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetCurrentHead { pub para: runtime_types::polkadot_parachain::primitives::Id, pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -27073,7 +28664,7 @@ pub mod api { #[doc = "can be registered, including sub-1000 IDs which are System Parachains."] pub fn force_register( &self, - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, id: runtime_types::polkadot_parachain::primitives::Id, genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -27261,11 +28852,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registered { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub manager: ::subxt::utils::account_id::AccountId32, + pub manager: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Registered { const PALLET: &'static str = "Registrar"; @@ -27274,8 +28869,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Deregistered { pub para_id: runtime_types::polkadot_parachain::primitives::Id, } @@ -27286,11 +28885,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Reserved { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Reserved { const PALLET: &'static str = "Registrar"; @@ -27365,7 +28968,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -27397,7 +29000,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, >, @@ -27495,11 +29098,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceLease { pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::account_id::AccountId32, + pub leaser: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, @@ -27507,16 +29114,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ClearAllLeases { pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct TriggerOnboard { pub para: runtime_types::polkadot_parachain::primitives::Id, } @@ -27529,7 +29144,7 @@ pub mod api { pub fn force_lease( &self, para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::account_id::AccountId32, + leaser: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, @@ -27604,8 +29219,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new `[lease_period]` is beginning."] pub struct NewLeasePeriod { pub lease_period: ::core::primitive::u32, @@ -27617,14 +29236,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] #[doc = "Second balance is the total amount reserved."] pub struct Leased { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::account_id::AccountId32, + pub leaser: ::subxt::utils::AccountId32, pub period_begin: ::core::primitive::u32, pub period_count: ::core::primitive::u32, pub extra_reserved: ::core::primitive::u128, @@ -27664,7 +29287,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< ::core::option::Option<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, )>, >, @@ -27710,7 +29333,7 @@ pub mod api { ::subxt::metadata::DecodeStaticType< ::std::vec::Vec< ::core::option::Option<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, )>, >, @@ -27785,8 +29408,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct NewAuction { #[codec(compact)] pub duration: ::core::primitive::u32, @@ -27796,8 +29423,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Bid { #[codec(compact)] pub para: runtime_types::polkadot_parachain::primitives::Id, @@ -27813,8 +29444,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CancelAuction; pub struct TransactionApi; impl TransactionApi { @@ -27912,8 +29547,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An auction started. Provides its index and the block number where it will begin to"] #[doc = "close and the first lease period of the quadruplet that is auctioned."] pub struct AuctionStarted { @@ -27929,8 +29568,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An auction ended. All funds become unreserved."] pub struct AuctionClosed { pub auction_index: ::core::primitive::u32, @@ -27942,12 +29585,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] #[doc = "Second is the total."] pub struct Reserved { - pub bidder: ::subxt::utils::account_id::AccountId32, + pub bidder: ::subxt::utils::AccountId32, pub extra_reserved: ::core::primitive::u128, pub total_amount: ::core::primitive::u128, } @@ -27958,11 +29605,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] pub struct Unreserved { - pub bidder: ::subxt::utils::account_id::AccountId32, + pub bidder: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for Unreserved { @@ -27972,13 +29623,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] #[doc = "but no parachain slot has been leased."] pub struct ReserveConfiscated { pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::account_id::AccountId32, + pub leaser: ::subxt::utils::AccountId32, pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for ReserveConfiscated { @@ -27988,11 +29643,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A new bid has been accepted as the current winner."] pub struct BidAccepted { - pub bidder: ::subxt::utils::account_id::AccountId32, + pub bidder: ::subxt::utils::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, pub first_slot: ::core::primitive::u32, @@ -28005,8 +29664,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] pub struct WinningOffset { pub auction_index: ::core::primitive::u32, @@ -28074,7 +29737,7 @@ pub mod api { #[doc = " (sub-)ranges."] pub fn reserved_amounts( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::account_id::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, _1: impl ::std::borrow::Borrow< runtime_types::polkadot_parachain::primitives::Id, >, @@ -28130,7 +29793,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< [::core::option::Option<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u128, )>; 36usize], @@ -28162,7 +29825,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< [::core::option::Option<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u128, )>; 36usize], @@ -28271,8 +29934,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Create { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28290,8 +29957,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Contribute { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28303,18 +29974,26 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Withdraw { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Refund { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28322,8 +30001,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Dissolve { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28331,8 +30014,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Edit { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28350,8 +30037,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddMemo { pub index: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, @@ -28359,16 +30050,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Poke { pub index: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ContributeAll { #[codec(compact)] pub index: runtime_types::polkadot_parachain::primitives::Id, @@ -28456,7 +30155,7 @@ pub mod api { #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] pub fn withdraw( &self, - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, index: runtime_types::polkadot_parachain::primitives::Id, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -28611,8 +30310,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Create a new crowdloaning campaign."] pub struct Created { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28624,11 +30327,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contributed to a crowd sale."] pub struct Contributed { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } @@ -28639,11 +30346,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Withdrew full balance of a contributor."] pub struct Withdrew { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub fund_index: runtime_types::polkadot_parachain::primitives::Id, pub amount: ::core::primitive::u128, } @@ -28654,8 +30365,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] #[doc = "over child keys that still need to be killed."] pub struct PartiallyRefunded { @@ -28668,8 +30383,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "All loans in a fund have been refunded."] pub struct AllRefunded { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28681,8 +30400,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Fund is dissolved."] pub struct Dissolved { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28694,8 +30417,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The result of trying to submit a new bid to the Slots pallet."] pub struct HandleBidResult { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28709,8 +30436,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The configuration to a crowdloan has been edited."] pub struct Edited { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28722,11 +30453,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A memo has been updated."] pub struct MemoUpdated { - pub who: ::subxt::utils::account_id::AccountId32, + pub who: ::subxt::utils::AccountId32, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub memo: ::std::vec::Vec<::core::primitive::u8>, } @@ -28737,8 +30472,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A parachain has been moved to `NewRaise`"] pub struct AddedToNewRaise { pub para_id: runtime_types::polkadot_parachain::primitives::Id, @@ -28761,7 +30500,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::core::primitive::u32, @@ -28792,7 +30531,7 @@ pub mod api { ) -> ::subxt::storage::address::StaticStorageAddress< ::subxt::metadata::DecodeStaticType< runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::u32, ::core::primitive::u32, @@ -28956,8 +30695,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Send { pub dest: ::std::boxed::Box, pub message: ::std::boxed::Box, @@ -28965,8 +30708,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct TeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -28977,8 +30724,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -28989,8 +30740,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub message: ::std::boxed::Box, pub max_weight: ::core::primitive::u64, @@ -28998,8 +30753,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceXcmVersion { pub location: ::std::boxed::Box< runtime_types::xcm::v1::multilocation::MultiLocation, @@ -29009,16 +30768,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceDefaultXcmVersion { pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceSubscribeVersionNotify { pub location: ::std::boxed::Box, @@ -29026,8 +30793,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceUnsubscribeVersionNotify { pub location: ::std::boxed::Box, @@ -29035,8 +30806,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct LimitedReserveTransferAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -29048,8 +30823,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct LimitedTeleportAssets { pub dest: ::std::boxed::Box, pub beneficiary: @@ -29383,8 +31162,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Execution of an XCM message was attempted."] #[doc = ""] #[doc = "\\[ outcome \\]"] @@ -29396,8 +31179,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A XCM message was sent."] #[doc = ""] #[doc = "\\[ origin, destination, message \\]"] @@ -29413,8 +31200,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response received which does not match a registered query. This may be because a"] #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] #[doc = "because the query timed out."] @@ -29431,8 +31222,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] #[doc = "no registered notification call."] #[doc = ""] @@ -29448,8 +31243,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response has been received and query is removed. The registered notification has"] #[doc = "been dispatched and executed successfully."] #[doc = ""] @@ -29466,8 +31265,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response has been received and query is removed. The registered notification could"] #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] #[doc = "originally budgeted by this runtime for the query result."] @@ -29487,8 +31290,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response has been received and query is removed. There was a general error with"] #[doc = "dispatching the notification call."] #[doc = ""] @@ -29505,8 +31312,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] #[doc = "is not `(origin, QueryId, Response)`."] @@ -29524,8 +31335,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Expected query response has been received but the origin location of the response does"] #[doc = "not match that expected. The query remains registered for a later, valid, response to"] #[doc = "be received and acted upon."] @@ -29545,8 +31360,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Expected query response has been received but the expected origin location placed in"] #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] #[doc = ""] @@ -29568,8 +31387,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Received query response has been read and removed."] #[doc = ""] #[doc = "\\[ id \\]"] @@ -29581,8 +31404,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some assets have been placed in an asset trap."] #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] @@ -29598,8 +31425,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "An XCM version change notification message has been attempted to be sent."] #[doc = ""] #[doc = "\\[ destination, result \\]"] @@ -29614,8 +31445,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The supported version of a location has been changed. This might be through an"] #[doc = "automatic notification or a manual intervention."] #[doc = ""] @@ -29631,8 +31466,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A given location which had a version change subscription was dropped owing to an error"] #[doc = "sending the notification to it."] #[doc = ""] @@ -29649,8 +31488,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "A given location which had a version change subscription was dropped owing to an error"] #[doc = "migrating the location to our new XCM format."] #[doc = ""] @@ -29666,8 +31509,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Some assets have been claimed from an asset trap"] #[doc = ""] #[doc = "\\[ hash, origin, assets \\]"] @@ -30002,25 +31849,17 @@ pub mod api { } pub mod runtime_types { use super::runtime_types; - pub mod bitvec { - use super::runtime_types; - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Debug, - )] - pub struct Lsb0; - } - } 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, Debug, )] + #[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, @@ -30030,8 +31869,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30039,8 +31882,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30053,8 +31900,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DispatchClass { #[codec(index = 0)] Normal, @@ -30066,8 +31917,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30076,8 +31931,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Pays { #[codec(index = 0)] Yes, @@ -30087,8 +31946,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30097,8 +31960,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RawOrigin<_0> { #[codec(index = 0)] Root, @@ -30115,8 +31982,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30127,8 +31998,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Bounded<_0> { #[codec(index = 0)] Legacy { @@ -30155,8 +32030,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum BalanceStatus { #[codec(index = 0)] Free, @@ -30169,8 +32048,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30182,8 +32065,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30191,8 +32078,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, ); @@ -30202,8 +32093,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30211,8 +32106,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30220,8 +32119,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30229,8 +32132,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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 { @@ -30238,8 +32145,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CheckWeight; } } @@ -30248,8 +32159,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30258,8 +32173,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30271,8 +32190,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -30291,8 +32214,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -30372,8 +32299,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Error for the System pallet"] pub enum Error { #[codec(index = 0)] @@ -30402,8 +32333,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Event for the System pallet."] pub enum Event { #[codec(index = 0)] @@ -30425,17 +32360,17 @@ pub mod api { #[codec(index = 3)] #[doc = "A new account was created."] NewAccount { - account: ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::AccountId32, }, #[codec(index = 4)] #[doc = "An account was reaped."] KilledAccount { - account: ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::AccountId32, }, #[codec(index = 5)] #[doc = "On on-chain remark happened."] Remarked { - sender: ::subxt::utils::account_id::AccountId32, + sender: ::subxt::utils::AccountId32, hash: ::subxt::utils::H256, }, } @@ -30443,8 +32378,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30455,8 +32394,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30465,8 +32408,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -30475,8 +32422,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Phase { #[codec(index = 0)] ApplyExtrinsic(::core::primitive::u32), @@ -30493,8 +32444,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -30511,8 +32466,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -30541,8 +32500,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum UncleEntryItem<_0, _1, _2> { #[codec(index = 0)] InclusionHeight(_0), @@ -30557,16 +32520,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -30591,19 +32562,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32>, - pub tail: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + 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, Debug, )] + #[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, @@ -30617,14 +32594,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, - pub prev: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, - pub next: - ::core::option::Option<::subxt::utils::account_id::AccountId32>, + 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, } @@ -30634,8 +32613,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -30650,10 +32633,8 @@ pub mod api { #[doc = ""] #[doc = "If `dislocated` does not exists, it returns an error."] rebag { - dislocated: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dislocated: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] #[doc = "Move the caller's Id directly in front of `lighter`."] @@ -30665,17 +32646,19 @@ pub mod api { #[doc = "- both nodes are within the same bag,"] #[doc = "- and `origin` has a greater `Score` than `lighter`."] put_in_front_of { - lighter: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + lighter: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)] @@ -30685,21 +32668,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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::account_id::AccountId32, + 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::account_id::AccountId32, + who: ::subxt::utils::AccountId32, new_score: ::core::primitive::u64, }, } @@ -30712,8 +32699,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -30743,10 +32734,8 @@ pub mod api { #[doc = "- Origin account is already in memory, so no DB operations for them."] #[doc = "# "] transfer { - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -30760,10 +32749,8 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin for this call is `root`."] set_balance { - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] new_free: ::core::primitive::u128, #[codec(compact)] @@ -30777,14 +32764,10 @@ pub mod api { #[doc = " assumed to be in the overlay."] #[doc = "# "] force_transfer { - source: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + source: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -30796,10 +32779,8 @@ pub mod api { #[doc = ""] #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] transfer_keep_alive { - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -30822,10 +32803,8 @@ pub mod api { #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."] #[doc = " #"] transfer_all { - dest: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + dest: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, keep_alive: ::core::primitive::bool, }, #[codec(index = 5)] @@ -30833,18 +32812,20 @@ pub mod api { #[doc = ""] #[doc = "Can only be called by ROOT."] force_unreserve { - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, }, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[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)] @@ -30875,17 +32856,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 :: account_id :: 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 :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Transfer succeeded."] Transfer { from : :: subxt :: utils :: account_id :: AccountId32 , to : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "A balance was set by root."] BalanceSet { who : :: subxt :: utils :: account_id :: 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 :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "Some balance was unreserved (moved from reserved to free)."] Unreserved { who : :: subxt :: utils :: account_id :: 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 :: account_id :: AccountId32 , to : :: subxt :: utils :: account_id :: 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 :: account_id :: 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 :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 9)] # [doc = "Some amount was removed from the account (e.g. for misbehavior)."] Slashed { who : :: subxt :: utils :: account_id :: AccountId32 , amount : :: core :: primitive :: u128 , } , } + # [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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AccountData<_0> { pub free: _0, pub reserved: _0, @@ -30895,8 +32884,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BalanceLock<_0> { pub id: [::core::primitive::u8; 8usize], pub amount: _0, @@ -30905,8 +32898,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Reasons { #[codec(index = 0)] Fee, @@ -30918,8 +32915,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Releases { #[codec(index = 0)] V1_0_0, @@ -30929,8 +32930,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReserveData<_0, _1> { pub id: _0, pub amount: _1, @@ -30943,8 +32948,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -30989,10 +32998,8 @@ pub mod api { propose_curator { #[codec(compact)] bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] fee: ::core::primitive::u128, }, @@ -31047,10 +33054,8 @@ pub mod api { award_bounty { #[codec(compact)] bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 6)] #[doc = "Claim the payout from an awarded bounty after payout delay."] @@ -31101,8 +33106,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -31143,8 +33152,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -31163,14 +33176,14 @@ pub mod api { #[doc = "A bounty is awarded to a beneficiary."] BountyAwarded { index: ::core::primitive::u32, - beneficiary: ::subxt::utils::account_id::AccountId32, + 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::account_id::AccountId32, + beneficiary: ::subxt::utils::AccountId32, }, #[codec(index = 5)] #[doc = "A bounty is cancelled."] @@ -31183,8 +33196,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -31196,8 +33213,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum BountyStatus<_0, _1> { #[codec(index = 0)] Proposed, @@ -31224,8 +33245,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -31276,10 +33301,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] fee: ::core::primitive::u128, }, @@ -31373,10 +33396,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, #[codec(compact)] child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 5)] #[doc = "Claim the payout from an awarded child-bounty after payout delay."] @@ -31434,8 +33455,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -31451,8 +33476,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -31466,7 +33495,7 @@ pub mod api { Awarded { index: ::core::primitive::u32, child_index: ::core::primitive::u32, - beneficiary: ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::AccountId32, }, #[codec(index = 2)] #[doc = "A child-bounty is claimed by beneficiary."] @@ -31474,7 +33503,7 @@ pub mod api { index: ::core::primitive::u32, child_index: ::core::primitive::u32, payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::AccountId32, }, #[codec(index = 3)] #[doc = "A child-bounty is cancelled."] @@ -31487,8 +33516,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ChildBounty<_0, _1, _2> { pub parent_bounty: _2, pub value: _1, @@ -31500,8 +33533,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ChildBountyStatus<_0, _1> { #[codec(index = 0)] Added, @@ -31524,8 +33561,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -31562,11 +33603,8 @@ pub mod api { #[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::account_id::AccountId32>, - prime: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, + new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, + prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, }, #[codec(index = 1)] @@ -31751,8 +33789,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -31789,15 +33831,19 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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::account_id::AccountId32, + account: ::subxt::utils::AccountId32, proposal_index: ::core::primitive::u32, proposal_hash: ::subxt::utils::H256, threshold: ::core::primitive::u32, @@ -31806,7 +33852,7 @@ pub mod api { #[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::account_id::AccountId32, + account: ::subxt::utils::AccountId32, proposal_hash: ::subxt::utils::H256, voted: ::core::primitive::bool, yes: ::core::primitive::u32, @@ -31848,8 +33894,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RawOrigin<_0> { #[codec(index = 0)] Members(::core::primitive::u32, ::core::primitive::u32), @@ -31861,8 +33911,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Votes<_0, _1> { pub index: _1, pub threshold: _1, @@ -31878,8 +33932,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Conviction { #[codec(index = 0)] None, @@ -31902,8 +33960,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -32076,10 +34138,7 @@ pub mod api { #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, @@ -32114,10 +34173,8 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(R)` with R number of vote of target."] unlock { - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 14)] #[doc = "Remove a vote for a referendum."] @@ -32165,10 +34222,8 @@ pub mod api { #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, }, #[codec(index = 16)] @@ -32207,8 +34262,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -32285,19 +34344,27 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 :: account_id :: AccountId32 , target : :: subxt :: utils :: account_id :: AccountId32 , } , # [codec (index = 8)] # [doc = "An account has cancelled a previous delegation operation."] Undelegated { account : :: subxt :: utils :: account_id :: AccountId32 , } , # [codec (index = 9)] # [doc = "An external proposal has been vetoed."] Vetoed { who : :: subxt :: utils :: account_id :: 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 :: account_id :: 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 :: account_id :: AccountId32 , prop_index : :: core :: primitive :: u32 , } , # [codec (index = 13)] # [doc = "A proposal got canceled."] ProposalCanceled { prop_index : :: core :: primitive :: u32 , } , } + # [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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Delegations<_0> { pub votes: _0, pub capital: _0, @@ -32305,8 +34372,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] Ongoing( @@ -32325,8 +34396,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReferendumStatus<_0, _1, _2> { pub end: _0, pub proposal: _1, @@ -32338,8 +34413,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Tally<_0> { pub ayes: _0, pub nays: _0, @@ -32351,8 +34430,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AccountVote<_0> { #[codec(index = 0)] Standard { @@ -32365,21 +34448,33 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PriorLock<_0, _1>(pub _0, pub _1); #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Vote(pub ::core::primitive::u8); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Voting<_0, _1, _2> { #[codec(index = 0)] Direct { @@ -32407,8 +34502,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VoteThreshold { #[codec(index = 0)] SuperMajorityApprove, @@ -32426,16 +34525,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "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 :: polkadot_runtime :: NposCompactSolution16 > > , 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 :: account_id :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: utils :: account_id :: 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 :: polkadot_runtime :: NposCompactSolution16 > > , } , # [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 (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 :: polkadot_runtime :: NposCompactSolution16 > > , 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 :: polkadot_runtime :: NposCompactSolution16 > > , } , # [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, Debug, )] + #[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)] @@ -32484,19 +34591,27 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , 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 :: account_id :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "An account has been slashed for submitting an invalid signed submission."] Slashed { account : :: subxt :: utils :: account_id :: AccountId32 , value : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } + # [codec (index = 0)] # [doc = "A solution was stored with the given compute."] # [doc = ""] # [doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , 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 = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } } 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, Debug, )] + #[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, @@ -32510,8 +34625,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ElectionCompute { #[codec(index = 0)] OnChain, @@ -32527,8 +34646,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Phase<_0> { #[codec(index = 0)] Off, @@ -32542,8 +34665,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -32552,13 +34679,17 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::sp_npos_elections::Support< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, pub score: runtime_types::sp_npos_elections::ElectionScore, @@ -32568,23 +34699,31 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u64, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, )>, - pub targets: ::std::vec::Vec<::subxt::utils::account_id::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, Debug, )] + #[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, @@ -32599,8 +34738,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -32628,7 +34771,7 @@ pub mod api { #[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::account_id::AccountId32>, + votes: ::std::vec::Vec<::subxt::utils::AccountId32>, #[codec(compact)] value: ::core::primitive::u128, }, @@ -32701,10 +34844,8 @@ pub mod api { #[doc = "will go into phragmen, we assume full block for now."] #[doc = "# "] remove_member { - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, slash_bond: ::core::primitive::bool, rerun_election: ::core::primitive::bool, }, @@ -32727,8 +34868,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -32786,8 +34931,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -32798,7 +34947,7 @@ pub mod api { #[doc = "begin with."] NewTerm { new_members: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, )>, }, @@ -32812,13 +34961,11 @@ pub mod api { #[codec(index = 3)] #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] #[doc = "`EmptyTerm`."] - MemberKicked { - member: ::subxt::utils::account_id::AccountId32, - }, + MemberKicked { member: ::subxt::utils::AccountId32 }, #[codec(index = 4)] #[doc = "Someone has renounced their candidacy."] Renounced { - candidate: ::subxt::utils::account_id::AccountId32, + candidate: ::subxt::utils::AccountId32, }, #[codec(index = 5)] #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] @@ -32826,13 +34973,13 @@ pub mod api { #[doc = ""] #[doc = "Note that old members and runners-up are also candidates."] CandidateSlashed { - candidate: ::subxt::utils::account_id::AccountId32, + 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::account_id::AccountId32, + seat_holder: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, } @@ -32840,8 +34987,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Renouncing { #[codec(index = 0)] Member, @@ -32853,8 +35004,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SeatHolder<_0, _1> { pub who: _0, pub stake: _1, @@ -32863,8 +35018,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Voter<_0, _1> { pub votes: ::std::vec::Vec<_0>, pub stake: _1, @@ -32878,8 +35037,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -32922,8 +35085,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -32950,14 +35117,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "The events of this pallet."] pub enum Event { #[codec(index = 0)] #[doc = "A staker was unstaked."] Unstaked { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, result: ::core::result::Result< (), runtime_types::sp_runtime::DispatchError, @@ -32966,15 +35137,13 @@ pub mod api { #[codec(index = 1)] #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] Slashed { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] #[doc = "consequence."] - Errored { - stash: ::subxt::utils::account_id::AccountId32, - }, + Errored { stash: ::subxt::utils::AccountId32 }, #[codec(index = 3)] #[doc = "An internal error happened. Operations will be paused now."] InternalError, @@ -32996,14 +35165,16 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UnstakeRequest { - pub stashes: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::subxt::utils::account_id::AccountId32, - ::core::primitive::u128, - )>, + pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + (::subxt::utils::AccountId32, ::core::primitive::u128), + >, pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u32, >, @@ -33017,8 +35188,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -33075,8 +35250,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -33106,8 +35285,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -33129,8 +35312,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -33144,8 +35331,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum StoredState<_0> { #[codec(index = 0)] Live, @@ -33164,8 +35355,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Identity pallet declaration."] pub enum Call { #[codec(index = 0)] @@ -33183,10 +35378,8 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] add_registrar { - account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] #[doc = "Set an account's identity information and reserve the appropriate deposit."] @@ -33237,7 +35430,7 @@ pub mod api { #[doc = "# "] set_subs { subs: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, }, @@ -33347,10 +35540,8 @@ pub mod api { set_account_id { #[codec(compact)] index: ::core::primitive::u32, - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 8)] #[doc = "Set the field information for a registrar."] @@ -33397,10 +35588,8 @@ pub mod api { provide_judgement { #[codec(compact)] reg_index: ::core::primitive::u32, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -33427,10 +35616,8 @@ pub mod api { #[doc = "- One event."] #[doc = "# "] kill_identity { - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 11)] #[doc = "Add the given account to the sender's subs."] @@ -33441,10 +35628,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] add_sub { - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, }, #[codec(index = 12)] @@ -33453,10 +35638,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] rename_sub { - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, }, #[codec(index = 13)] @@ -33468,10 +35651,8 @@ pub mod api { #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] #[doc = "sub identity of `sub`."] remove_sub { - sub: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 14)] #[doc = "Remove the sender as a sub-account."] @@ -33489,8 +35670,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -33551,43 +35736,45 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 name was set or reset (which will remove all judgements)."] - IdentitySet { - who: ::subxt::utils::account_id::AccountId32, - }, + IdentitySet { who: ::subxt::utils::AccountId32 }, #[codec(index = 1)] #[doc = "A name was cleared, and the given balance returned."] IdentityCleared { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "A name was removed and the given balance slashed."] IdentityKilled { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "A judgement was asked from a registrar."] JudgementRequested { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A judgement request was retracted."] JudgementUnrequested { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 5)] #[doc = "A judgement was given by a registrar."] JudgementGiven { - target: ::subxt::utils::account_id::AccountId32, + target: ::subxt::utils::AccountId32, registrar_index: ::core::primitive::u32, }, #[codec(index = 6)] @@ -33598,23 +35785,23 @@ pub mod api { #[codec(index = 7)] #[doc = "A sub-identity was added to an identity and the deposit paid."] SubIdentityAdded { - sub: ::subxt::utils::account_id::AccountId32, - main: ::subxt::utils::account_id::AccountId32, + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 8)] #[doc = "A sub-identity was removed from an identity and the deposit freed."] SubIdentityRemoved { - sub: ::subxt::utils::account_id::AccountId32, - main: ::subxt::utils::account_id::AccountId32, + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, #[codec(index = 9)] #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] #[doc = "main identity account to the sub-identity account."] SubIdentityRevoked { - sub: ::subxt::utils::account_id::AccountId32, - main: ::subxt::utils::account_id::AccountId32, + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, } @@ -33625,8 +35812,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BitFlags<_0>( pub ::core::primitive::u64, #[codec(skip)] pub ::core::marker::PhantomData<_0>, @@ -33634,8 +35825,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Data { #[codec(index = 0)] None, @@ -33717,8 +35912,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum IdentityField { #[codec(index = 1)] Display, @@ -33740,8 +35939,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IdentityInfo { pub additional: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( @@ -33761,8 +35964,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Judgement<_0> { #[codec(index = 0)] Unknown, @@ -33782,8 +35989,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RegistrarInfo<_0, _1> { pub account: _1, pub fee: _0, @@ -33794,8 +36005,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Registration<_0> { pub judgements: runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( @@ -33814,16 +36029,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "# "] # [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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -33836,8 +36059,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -33853,9 +36080,9 @@ pub mod api { #[doc = "At the end of the session, at least one validator was found to be offline."] SomeOffline { offline: ::std::vec::Vec<( - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, runtime_types::pallet_staking::Exposure< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, ::core::primitive::u128, >, )>, @@ -33869,22 +36096,34 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BoundedOpaqueNetworkState { pub peer_id: runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< @@ -33900,8 +36139,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -33917,8 +36160,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -33963,10 +36210,8 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (recipient)"] #[doc = "# "] transfer { - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, }, #[codec(index = 2)] @@ -34012,10 +36257,8 @@ pub mod api { #[doc = " - Writes: Indices Accounts, System Account (original owner)"] #[doc = "# "] force_transfer { - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, freeze: ::core::primitive::bool, }, @@ -34043,8 +36286,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -34066,14 +36313,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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::account_id::AccountId32, + who: ::subxt::utils::AccountId32, index: ::core::primitive::u32, }, #[codec(index = 1)] @@ -34083,7 +36334,7 @@ pub mod api { #[doc = "A account index has been frozen to its current account ID."] IndexFrozen { index: ::core::primitive::u32, - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, }, } } @@ -34095,8 +36346,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -34104,20 +36359,16 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::AddOrigin`."] add_member { - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 2)] #[doc = "Swap out one member `remove` for another `add`."] @@ -34126,14 +36377,10 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] swap_member { - remove: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - add: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + remove: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + add: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 3)] #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"] @@ -34141,7 +36388,7 @@ pub mod api { #[doc = ""] #[doc = "May only be called from `T::ResetOrigin`."] reset_members { - members: ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + members: ::std::vec::Vec<::subxt::utils::AccountId32>, }, #[codec(index = 4)] #[doc = "Swap out the sending member for some other key `new`."] @@ -34150,20 +36397,16 @@ pub mod api { #[doc = ""] #[doc = "Prime membership is passed from the origin account to `new`, if extant."] change_key { - new: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + new: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[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::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 6)] #[doc = "Remove the prime member if it exists."] @@ -34174,8 +36417,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -34191,8 +36438,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -34223,8 +36474,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -34245,8 +36500,7 @@ pub mod api { #[doc = "- Plus Call Weight"] #[doc = "# "] as_multi_threshold_1 { - other_signatories: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, call: ::std::boxed::Box< runtime_types::polkadot_runtime::RuntimeCall, >, @@ -34299,8 +36553,7 @@ pub mod api { #[doc = "# "] as_multi { threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -34349,8 +36602,7 @@ pub mod api { #[doc = "# "] approve_as_multi { threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, maybe_timepoint: ::core::option::Option< runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, @@ -34388,8 +36640,7 @@ pub mod api { #[doc = "# "] cancel_as_multi { threshold: ::core::primitive::u16, - other_signatories: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, @@ -34399,8 +36650,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -34449,35 +36704,39 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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::account_id::AccountId32, - multisig: ::subxt::utils::account_id::AccountId32, + 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::account_id::AccountId32, + approving: ::subxt::utils::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::utils::account_id::AccountId32, + multisig: ::subxt::utils::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, #[codec(index = 2)] #[doc = "A multisig operation has been executed."] MultisigExecuted { - approving: ::subxt::utils::account_id::AccountId32, + approving: ::subxt::utils::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::utils::account_id::AccountId32, + multisig: ::subxt::utils::AccountId32, call_hash: [::core::primitive::u8; 32usize], result: ::core::result::Result< (), @@ -34487,11 +36746,11 @@ pub mod api { #[codec(index = 3)] #[doc = "A multisig operation has been cancelled."] MultisigCancelled { - cancelling: ::subxt::utils::account_id::AccountId32, + cancelling: ::subxt::utils::AccountId32, timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - multisig: ::subxt::utils::account_id::AccountId32, + multisig: ::subxt::utils::AccountId32, call_hash: [::core::primitive::u8; 32usize], }, } @@ -34499,8 +36758,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -34511,8 +36774,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -34525,8 +36792,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -34595,10 +36866,8 @@ pub mod api { #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] #[doc = "`NoMoreChunks` error from the staking system."] unbond { - member_account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] unbonding_points: ::core::primitive::u128, }, @@ -34634,10 +36903,8 @@ pub mod api { #[doc = ""] #[doc = "If the target is the depositor, the pool will be destroyed."] withdraw_unbonded { - member_account: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 6)] @@ -34661,18 +36928,12 @@ pub mod api { create { #[codec(compact)] amount: ::core::primitive::u128, - root: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + root: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 7)] #[doc = "Create a new delegation pool with a previously used pool id"] @@ -34684,18 +36945,12 @@ pub mod api { create_with_pool_id { #[codec(compact)] amount: ::core::primitive::u128, - root: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - nominator: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - state_toggler: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + root: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pool_id: ::core::primitive::u32, }, #[codec(index = 8)] @@ -34708,8 +36963,7 @@ pub mod api { #[doc = "account."] nominate { pool_id: ::core::primitive::u32, - validators: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, }, #[codec(index = 9)] #[doc = "Set a new state for the pool."] @@ -34775,14 +37029,14 @@ pub mod api { update_roles { pool_id: ::core::primitive::u32, new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, }, #[codec(index = 13)] @@ -34798,8 +37052,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DefensiveError { #[codec(index = 0)] NotEnoughSpaceInUnbondPool, @@ -34815,8 +37073,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -34902,20 +37164,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Events of this pallet."] pub enum Event { #[codec(index = 0)] #[doc = "A pool has been created."] Created { - depositor: ::subxt::utils::account_id::AccountId32, + 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::account_id::AccountId32, + member: ::subxt::utils::AccountId32, pool_id: ::core::primitive::u32, bonded: ::core::primitive::u128, joined: ::core::primitive::bool, @@ -34923,7 +37189,7 @@ pub mod api { #[codec(index = 2)] #[doc = "A payout has been made to a member."] PaidOut { - member: ::subxt::utils::account_id::AccountId32, + member: ::subxt::utils::AccountId32, pool_id: ::core::primitive::u32, payout: ::core::primitive::u128, }, @@ -34940,7 +37206,7 @@ pub mod api { #[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::account_id::AccountId32, + member: ::subxt::utils::AccountId32, pool_id: ::core::primitive::u32, balance: ::core::primitive::u128, points: ::core::primitive::u128, @@ -34954,7 +37220,7 @@ pub mod api { #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] #[doc = "will be 1."] Withdrawn { - member: ::subxt::utils::account_id::AccountId32, + member: ::subxt::utils::AccountId32, pool_id: ::core::primitive::u32, balance: ::core::primitive::u128, points: ::core::primitive::u128, @@ -34974,21 +37240,16 @@ pub mod api { #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] MemberRemoved { pool_id: ::core::primitive::u32, - member: ::subxt::utils::account_id::AccountId32, + 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::account_id::AccountId32, - >, - state_toggler: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, - nominator: ::core::option::Option< - ::subxt::utils::account_id::AccountId32, - >, + 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`."] @@ -35008,8 +37269,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum BondExtra<_0> { #[codec(index = 0)] FreeBalance(_0), @@ -35019,21 +37284,29 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, >, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ConfigOp<_0> { #[codec(index = 0)] Noop, @@ -35045,8 +37318,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -35061,8 +37338,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -35072,8 +37353,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum PoolState { #[codec(index = 0)] Open, @@ -35085,8 +37370,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -35096,8 +37385,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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: @@ -35109,8 +37402,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -35123,8 +37420,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Events type."] pub enum Event { #[codec(index = 0)] @@ -35145,8 +37446,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -35180,8 +37485,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -35206,8 +37515,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -35224,8 +37537,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RequestStatus<_0, _1> { #[codec(index = 0)] Unrequested { @@ -35247,8 +37564,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -35264,10 +37585,8 @@ pub mod api { #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] #[doc = "- `call`: The call to be made by the `real` account."] proxy { - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -35286,10 +37605,8 @@ pub mod api { #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] #[doc = "zero."] add_proxy { - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -35302,10 +37619,8 @@ pub mod api { #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] remove_proxy { - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -35359,10 +37674,8 @@ pub mod api { #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] #[doc = "account whose `pure` call has corresponding parameters."] kill_pure { - spawner: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + spawner: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, proxy_type: runtime_types::polkadot_runtime::ProxyType, index: ::core::primitive::u16, #[codec(compact)] @@ -35387,10 +37700,8 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] announce { - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, }, #[codec(index = 7)] @@ -35405,10 +37716,8 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] remove_announcement { - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, }, #[codec(index = 8)] @@ -35423,10 +37732,8 @@ pub mod api { #[doc = "- `delegate`: The account that previously announced the call."] #[doc = "- `call_hash`: The hash of the call to be made."] reject_announcement { - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, }, #[codec(index = 9)] @@ -35442,14 +37749,10 @@ pub mod api { #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] #[doc = "- `call`: The call to be made by the `real` account."] proxy_announced { - delegate: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - real: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, force_proxy_type: ::core::option::Option< runtime_types::polkadot_runtime::ProxyType, >, @@ -35461,8 +37764,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -35493,8 +37800,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -35509,31 +37820,31 @@ pub mod api { #[doc = "A pure account has been created by new proxy with given"] #[doc = "disambiguation index and proxy type."] PureCreated { - pure: ::subxt::utils::account_id::AccountId32, - who: ::subxt::utils::account_id::AccountId32, + pure: ::subxt::utils::AccountId32, + who: ::subxt::utils::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, disambiguation_index: ::core::primitive::u16, }, #[codec(index = 2)] #[doc = "An announcement was placed to make a call in the future."] Announced { - real: ::subxt::utils::account_id::AccountId32, - proxy: ::subxt::utils::account_id::AccountId32, + real: ::subxt::utils::AccountId32, + proxy: ::subxt::utils::AccountId32, call_hash: ::subxt::utils::H256, }, #[codec(index = 3)] #[doc = "A proxy was added."] ProxyAdded { - delegator: ::subxt::utils::account_id::AccountId32, - delegatee: ::subxt::utils::account_id::AccountId32, + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, #[codec(index = 4)] #[doc = "A proxy was removed."] ProxyRemoved { - delegator: ::subxt::utils::account_id::AccountId32, - delegatee: ::subxt::utils::account_id::AccountId32, + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, @@ -35542,8 +37853,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Announcement<_0, _1, _2> { pub real: _0, pub call_hash: _1, @@ -35552,8 +37867,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ProxyDefinition<_0, _1, _2> { pub delegate: _0, pub proxy_type: _1, @@ -35567,8 +37886,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -35648,8 +37971,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -35671,8 +37998,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Events type."] pub enum Event { #[codec(index = 0)] @@ -35720,8 +38051,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -35739,8 +38074,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -35784,8 +38123,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Error for the session pallet."] pub enum Error { #[codec(index = 0)] @@ -35807,8 +38150,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -35829,8 +38176,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -35852,14 +38203,14 @@ pub mod api { #[doc = "------------------"] #[doc = "# "] bond { - controller: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, #[codec(compact)] value: ::core::primitive::u128, payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, }, #[codec(index = 1)] @@ -35948,8 +38299,8 @@ pub mod api { #[doc = "# "] nominate { targets: ::std::vec::Vec< - ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, >, @@ -35986,7 +38337,7 @@ pub mod api { #[doc = "# "] set_payee { payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, }, #[codec(index = 8)] @@ -36007,8 +38358,8 @@ pub mod api { #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] #[doc = "# "] set_controller { - controller: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, }, @@ -36090,15 +38441,14 @@ pub mod api { #[doc = ""] #[doc = "The dispatch origin must be Root."] set_invulnerables { - invulnerables: - ::std::vec::Vec<::subxt::utils::account_id::AccountId32>, + 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::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 16)] @@ -36145,7 +38495,7 @@ pub mod api { #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."] #[doc = "# "] payout_stakers { - validator_stash: ::subxt::utils::account_id::AccountId32, + validator_stash: ::subxt::utils::AccountId32, era: ::core::primitive::u32, }, #[codec(index = 19)] @@ -36176,7 +38526,7 @@ pub mod api { #[doc = ""] #[doc = "Refunds the transaction fees upon successful execution."] reap_stash { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 21)] @@ -36193,8 +38543,8 @@ pub mod api { #[doc = "block any further nominations."] kick { who: ::std::vec::Vec< - ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, (), >, >, @@ -36271,21 +38621,25 @@ pub mod api { #[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::account_id::AccountId32, + 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::account_id::AccountId32, + validator_stash: ::subxt::utils::AccountId32, }, } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36297,8 +38651,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -36384,8 +38742,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -36399,13 +38761,13 @@ pub mod api { #[codec(index = 1)] #[doc = "The nominator has been rewarded by this amount."] Rewarded { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] Slashed { - staker: ::subxt::utils::account_id::AccountId32, + staker: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 3)] @@ -36423,46 +38785,44 @@ pub mod api { #[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::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 6)] #[doc = "An account has unbonded this amount."] Unbonded { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 7)] #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] #[doc = "from the unlocking queue."] Withdrawn { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 8)] #[doc = "A nominator has been kicked from a validator."] Kicked { - nominator: ::subxt::utils::account_id::AccountId32, - stash: ::subxt::utils::account_id::AccountId32, + nominator: ::subxt::utils::AccountId32, + stash: ::subxt::utils::AccountId32, }, #[codec(index = 9)] #[doc = "The election failed. No new era is planned."] StakingElectionFailed, #[codec(index = 10)] #[doc = "An account has stopped participating as either a validator or nominator."] - Chilled { - stash: ::subxt::utils::account_id::AccountId32, - }, + Chilled { stash: ::subxt::utils::AccountId32 }, #[codec(index = 11)] #[doc = "The stakers' rewards are getting paid."] PayoutStarted { era_index: ::core::primitive::u32, - validator_stash: ::subxt::utils::account_id::AccountId32, + validator_stash: ::subxt::utils::AccountId32, }, #[codec(index = 12)] #[doc = "A validator has set their preferences."] ValidatorPrefsSet { - stash: ::subxt::utils::account_id::AccountId32, + stash: ::subxt::utils::AccountId32, prefs: runtime_types::pallet_staking::ValidatorPrefs, }, } @@ -36473,8 +38833,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36484,8 +38848,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36494,8 +38862,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -36503,8 +38875,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -36512,8 +38888,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36526,8 +38906,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Forcing { #[codec(index = 0)] NotForcing, @@ -36541,8 +38925,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)] @@ -36551,11 +38939,15 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + ::subxt::utils::AccountId32, >, pub submitted_in: ::core::primitive::u32, pub suppressed: ::core::primitive::bool, @@ -36563,8 +38955,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Releases { #[codec(index = 0)] V1_0_0Ancient, @@ -36594,8 +38990,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RewardDestination<_0> { #[codec(index = 0)] Staked, @@ -36611,10 +39011,14 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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::account_id::AccountId32, + pub stash: ::subxt::utils::AccountId32, #[codec(compact)] pub total: ::core::primitive::u128, #[codec(compact)] @@ -36630,8 +39034,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36642,8 +39050,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36653,8 +39065,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -36668,8 +39084,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -36703,8 +39123,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -36729,10 +39153,8 @@ pub mod api { #[doc = "# "] report_awesome { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] @@ -36780,10 +39202,8 @@ pub mod api { #[doc = "# "] tip_new { reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + who: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] tip_value: ::core::primitive::u128, }, @@ -36853,8 +39273,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -36879,8 +39303,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -36893,7 +39321,7 @@ pub mod api { #[doc = "A tip suggestion has been closed."] TipClosed { tip_hash: ::subxt::utils::H256, - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, payout: ::core::primitive::u128, }, #[codec(index = 3)] @@ -36903,7 +39331,7 @@ pub mod api { #[doc = "A tip suggestion has been slashed."] TipSlashed { tip_hash: ::subxt::utils::H256, - finder: ::subxt::utils::account_id::AccountId32, + finder: ::subxt::utils::AccountId32, deposit: ::core::primitive::u128, }, } @@ -36911,8 +39339,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OpenTip<_0, _1, _2, _3> { pub reason: _3, pub who: _0, @@ -36930,15 +39362,19 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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::account_id::AccountId32, + who: ::subxt::utils::AccountId32, actual_fee: ::core::primitive::u128, tip: ::core::primitive::u128, }, @@ -36947,16 +39383,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Releases { #[codec(index = 0)] V1Ancient, @@ -36971,8 +39415,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -36988,10 +39436,8 @@ pub mod api { propose_spend { #[codec(compact)] value: ::core::primitive::u128, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] #[doc = "Reject a proposed spend. The original deposit will be slashed."] @@ -37034,10 +39480,8 @@ pub mod api { spend { #[codec(compact)] amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 4)] #[doc = "Force a previously approved proposal to be removed from the approval queue."] @@ -37063,8 +39507,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Error for the treasury pallet."] pub enum Error { #[codec(index = 0)] @@ -37087,8 +39535,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -37106,7 +39558,7 @@ pub mod api { Awarded { proposal_index: ::core::primitive::u32, award: ::core::primitive::u128, - account: ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::AccountId32, }, #[codec(index = 3)] #[doc = "A proposal was rejected; funds were slashed."] @@ -37132,15 +39584,19 @@ pub mod api { SpendApproved { proposal_index: ::core::primitive::u32, amount: ::core::primitive::u128, - beneficiary: ::subxt::utils::account_id::AccountId32, + beneficiary: ::subxt::utils::AccountId32, }, } } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Proposal<_0, _1> { pub proposer: _0, pub value: _1, @@ -37155,8 +39611,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -37264,8 +39724,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -37275,8 +39739,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -37318,8 +39786,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -37354,10 +39826,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] #[doc = "# "] vest_other { - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 2)] #[doc = "Create a vested transfer."] @@ -37378,10 +39848,8 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] #[doc = "# "] vested_transfer { - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, @@ -37408,14 +39876,10 @@ pub mod api { #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] #[doc = "# "] force_vested_transfer { - source: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, - target: ::subxt::utils::multi_address::MultiAddress< - ::subxt::utils::account_id::AccountId32, - (), - >, + source: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, @@ -37452,8 +39916,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Error for the vesting pallet."] pub enum Error { #[codec(index = 0)] @@ -37476,21 +39944,25 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 amount vested has been updated. This could indicate a change in funds available."] #[doc = "The balance given is the amount which is left unvested (and thus locked)."] VestingUpdated { - account: ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::AccountId32, unvested: ::core::primitive::u128, }, #[codec(index = 1)] #[doc = "An \\[account\\] has become fully vested."] VestingCompleted { - account: ::subxt::utils::account_id::AccountId32, + account: ::subxt::utils::AccountId32, }, } } @@ -37499,8 +39971,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct VestingInfo<_0, _1> { pub locked: _0, pub per_block: _0, @@ -37510,8 +39986,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Releases { #[codec(index = 0)] V0, @@ -37526,8 +40006,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -37706,8 +40190,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -37756,8 +40244,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -37927,8 +40419,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Origin { #[codec(index = 0)] Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), @@ -37938,8 +40434,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum QueryStatus<_0> { #[codec(index = 0)] Pending { @@ -37964,8 +40464,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionMigrationStage { #[codec(index = 0)] MigrateSupportedVersion, @@ -37985,14 +40489,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateHash(pub ::subxt::utils::H256); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InboundDownwardMessage<_0> { pub sent_at: _0, pub msg: ::std::vec::Vec<::core::primitive::u8>, @@ -38000,8 +40512,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InboundHrmpMessage<_0> { pub sent_at: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, @@ -38009,8 +40525,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OutboundHrmpMessage<_0> { pub recipient: _0, pub data: ::std::vec::Vec<::core::primitive::u8>, @@ -38023,14 +40543,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpChannelId { pub sender: runtime_types::polkadot_parachain::primitives::Id, pub recipient: runtime_types::polkadot_parachain::primitives::Id, @@ -38039,20 +40567,32 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Id(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidationCodeHash(pub ::subxt::utils::H256); } } @@ -38065,8 +40605,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod collator_app { @@ -38074,14 +40618,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } pub mod signed { @@ -38089,8 +40641,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UncheckedSigned < _0 , _1 > { pub payload : _0 , pub validator_index : runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , pub signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _1 > } } pub mod validator_app { @@ -38098,21 +40654,33 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AvailabilityBitfield( pub ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -38122,8 +40690,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BackedCandidate<_0> { pub candidate: runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt< @@ -38140,8 +40712,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateCommitments<_0> { pub upward_messages: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, @@ -38161,8 +40737,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub relay_parent: _0, @@ -38180,8 +40760,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidateReceipt<_0> { pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, @@ -38190,8 +40774,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CommittedCandidateReceipt<_0> { pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, @@ -38204,14 +40792,22 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CoreIndex(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum CoreOccupied { #[codec(index = 0)] Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), @@ -38221,8 +40817,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisputeState<_0> { pub validators_for: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -38238,15 +40838,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DisputeStatement { # [codec (index = 0)] Valid (runtime_types :: polkadot_primitives :: v2 :: ValidDisputeStatementKind ,) , # [codec (index = 1)] Invalid (runtime_types :: polkadot_primitives :: v2 :: InvalidDisputeStatementKind ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DisputeStatementSet { pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, @@ -38261,14 +40869,22 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct GroupIndex(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct IndexedVec<_0, _1>( pub ::std::vec::Vec<_1>, #[codec(skip)] pub ::core::marker::PhantomData<_0>, @@ -38276,8 +40892,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< @@ -38298,8 +40918,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum InvalidDisputeStatementKind { #[codec(index = 0)] Explicit, @@ -38307,8 +40931,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, pub runtime_types::polkadot_primitives::v2::collator_app::Public, @@ -38316,8 +40944,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadEntry { pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, pub retries: ::core::primitive::u32, @@ -38325,8 +40957,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PvfCheckStatement { pub accept: ::core::primitive::bool, pub subject: @@ -38338,8 +40974,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( @@ -38356,8 +40996,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SessionInfo { pub active_validator_indices: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::ValidatorIndex, @@ -38391,8 +41035,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum UpgradeGoAhead { #[codec(index = 0)] Abort, @@ -38402,8 +41050,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum UpgradeRestriction { #[codec(index = 0)] Present, @@ -38411,8 +41063,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ValidDisputeStatementKind { #[codec(index = 0)] Explicit, @@ -38427,14 +41083,22 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ValidatorIndex(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ValidityAttestation { #[codec(index = 1)] Implicit( @@ -38452,8 +41116,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct NposCompactSolution16 { pub votes1: ::std::vec::Vec<( ::subxt::ext::codec::Compact<::core::primitive::u32>, @@ -38613,25 +41281,29 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum OriginCaller { #[codec(index = 0)] system( runtime_types::frame_support::dispatch::RawOrigin< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ), #[codec(index = 15)] Council( runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ), #[codec(index = 16)] TechnicalCommittee( runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::account_id::AccountId32, + ::subxt::utils::AccountId32, >, ), #[codec(index = 50)] @@ -38646,8 +41318,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ProxyType { #[codec(index = 0)] Any, @@ -38667,28 +41343,44 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, Debug, )] + #[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)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Call ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: 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)] Indices (runtime_types :: pallet_indices :: pallet :: Call ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Call ,) , # [codec (index = 6)] Authorship (runtime_types :: pallet_authorship :: pallet :: Call ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Call ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Call ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Call ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Call ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Call ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Call ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Call ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Call ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Call ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Call ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Call ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Call ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Call ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Call ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Call ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Call ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Call ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Call ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Call ,) , # [codec (index = 51)] Configuration (runtime_types :: polkadot_runtime_parachains :: configuration :: pallet :: Call ,) , # [codec (index = 52)] ParasShared (runtime_types :: polkadot_runtime_parachains :: shared :: pallet :: Call ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Call ,) , # [codec (index = 54)] ParaInherent (runtime_types :: polkadot_runtime_parachains :: paras_inherent :: pallet :: Call ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Call ,) , # [codec (index = 57)] Initializer (runtime_types :: polkadot_runtime_parachains :: initializer :: pallet :: Call ,) , # [codec (index = 58)] Dmp (runtime_types :: polkadot_runtime_parachains :: dmp :: pallet :: Call ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Call ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Call ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Call ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Call ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Call ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Call ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Call ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Call ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum RuntimeEvent { # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Event ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Event ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Event ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Event ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Event ,) , # [codec (index = 32)] TransactionPayment (runtime_types :: pallet_transaction_payment :: pallet :: Event ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Event ,) , # [codec (index = 8)] Offences (runtime_types :: pallet_offences :: pallet :: Event ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Event ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Event ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Event ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Event ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Event ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Event ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Event ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Event ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Event ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Event ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Event ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Event ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Event ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Event ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Event ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Event ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Event ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Event ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Event ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Event ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Event ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Event ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Event ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Event ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Event ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Event ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Event ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Event ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SessionKeys { pub grandpa: runtime_types::sp_finality_grandpa::app::Public, pub babe: runtime_types::sp_consensus_babe::app::Public, @@ -38711,8 +41403,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -38765,8 +41461,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -38794,8 +41494,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -38815,14 +41519,14 @@ pub mod api { #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] #[doc = "Second is the total."] Reserved { - bidder: ::subxt::utils::account_id::AccountId32, + bidder: ::subxt::utils::AccountId32, extra_reserved: ::core::primitive::u128, total_amount: ::core::primitive::u128, }, #[codec(index = 3)] #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] Unreserved { - bidder: ::subxt::utils::account_id::AccountId32, + bidder: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 4)] @@ -38830,13 +41534,13 @@ pub mod api { #[doc = "but no parachain slot has been leased."] ReserveConfiscated { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::account_id::AccountId32, + leaser: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, }, #[codec(index = 5)] #[doc = "A new bid has been accepted as the current winner."] BidAccepted { - bidder: ::subxt::utils::account_id::AccountId32, + bidder: ::subxt::utils::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, first_slot: ::core::primitive::u32, @@ -38858,16 +41562,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: utils :: account_id :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: utils :: account_id :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: core :: option :: Option < :: subxt :: utils :: account_id :: AccountId32 > , } , } + # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: 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, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -38893,35 +41605,55 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 = "Someone claimed some DOTs."] Claimed { who : :: subxt :: utils :: account_id :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } + # [codec (index = 0)] # [doc = "Someone claimed some DOTs."] Claimed { who : :: subxt :: utils :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PrevalidateAttests; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum StatementKind { #[codec(index = 0)] Regular, @@ -38936,8 +41668,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -38991,7 +41727,7 @@ pub mod api { #[doc = "- `who`: The account whose contribution should be withdrawn."] #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] withdraw { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, #[codec(compact)] index: runtime_types::polkadot_parachain::primitives::Id, }, @@ -39059,8 +41795,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -39136,8 +41876,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -39148,14 +41892,14 @@ pub mod api { #[codec(index = 1)] #[doc = "Contributed to a crowd sale."] Contributed { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, fund_index: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, }, #[codec(index = 2)] #[doc = "Withdrew full balance of a contributor."] Withdrew { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, fund_index: runtime_types::polkadot_parachain::primitives::Id, amount: ::core::primitive::u128, }, @@ -39192,7 +41936,7 @@ pub mod api { #[codec(index = 8)] #[doc = "A memo has been updated."] MemoUpdated { - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, para_id: runtime_types::polkadot_parachain::primitives::Id, memo: ::std::vec::Vec<::core::primitive::u8>, }, @@ -39206,14 +41950,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FundInfo < _0 , _1 , _2 , _3 > { pub depositor : _0 , pub verifier : :: core :: option :: Option < runtime_types :: sp_runtime :: MultiSigner > , pub deposit : _1 , pub raised : _1 , pub end : _2 , pub cap : _1 , pub last_contribution : runtime_types :: polkadot_runtime_common :: crowdloan :: LastContribution < _2 > , pub first_period : _2 , pub last_period : _2 , pub fund_index : _2 , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _3 > } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum LastContribution<_0> { #[codec(index = 0)] Never, @@ -39230,16 +41982,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { - # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: utils :: account_id :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } + # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: utils :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)] @@ -39289,14 +42049,18 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] Registered { para_id: runtime_types::polkadot_parachain::primitives::Id, - manager: ::subxt::utils::account_id::AccountId32, + manager: ::subxt::utils::AccountId32, }, #[codec(index = 1)] Deregistered { @@ -39305,15 +42069,19 @@ pub mod api { #[codec(index = 2)] Reserved { para_id: runtime_types::polkadot_parachain::primitives::Id, - who: ::subxt::utils::account_id::AccountId32, + who: ::subxt::utils::AccountId32, }, } } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaInfo<_0, _1> { pub manager: _0, pub deposit: _1, @@ -39327,8 +42095,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -39338,7 +42110,7 @@ pub mod api { #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] force_lease { para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::account_id::AccountId32, + leaser: ::subxt::utils::AccountId32, amount: ::core::primitive::u128, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, @@ -39365,8 +42137,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -39379,8 +42155,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -39394,7 +42174,7 @@ pub mod api { #[doc = "Second balance is the total amount reserved."] Leased { para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::account_id::AccountId32, + leaser: ::subxt::utils::AccountId32, period_begin: ::core::primitive::u32, period_count: ::core::primitive::u32, extra_reserved: ::core::primitive::u128, @@ -39413,8 +42193,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -39588,8 +42372,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -39600,8 +42388,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HostConfiguration<_0> { pub max_code_size: _0, pub max_head_data_size: _0, @@ -39657,8 +42449,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -39667,8 +42463,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -39696,8 +42496,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 dispute has been initiated. \\[candidate hash, dispute location\\]"] DisputeInitiated (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeLocation ,) , # [codec (index = 1)] # [doc = "A dispute has concluded for or against a candidate."] # [doc = "`\\[para id, candidate hash, dispute result\\]`"] DisputeConcluded (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeResult ,) , # [codec (index = 2)] # [doc = "A dispute has timed out due to insufficient participation."] # [doc = "`\\[para id, candidate hash\\]`"] DisputeTimedOut (runtime_types :: polkadot_core_primitives :: CandidateHash ,) , # [codec (index = 3)] # [doc = "A dispute has concluded with supermajority against a candidate."] # [doc = "Block authors should no longer build on top of this head and should"] # [doc = "instead revert the block at the given height. This should be the"] # [doc = "number of the child of the last known valid block in the chain."] Revert (:: core :: primitive :: u32 ,) , } @@ -39705,8 +42509,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DisputeLocation { #[codec(index = 0)] Local, @@ -39716,8 +42524,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DisputeResult { #[codec(index = 0)] Valid, @@ -39732,8 +42544,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} } @@ -39745,16 +42561,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] # [doc = "parameters."] # [doc = ""] # [doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] # [doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] # [doc = ""] # [doc = "These numbers are a subject to the relay-chain configuration limits."] # [doc = ""] # [doc = "The channel can be opened only after the recipient confirms it and only on a session"] # [doc = "change."] hrmp_init_open_channel { recipient : runtime_types :: polkadot_parachain :: primitives :: Id , proposed_max_capacity : :: core :: primitive :: u32 , proposed_max_message_size : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Accept a pending open channel request from the given sender."] # [doc = ""] # [doc = "The channel will be opened only on the next session boundary."] hrmp_accept_open_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 2)] # [doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] # [doc = "recipient in the channel being closed."] # [doc = ""] # [doc = "The closure can only happen on a session change."] hrmp_close_channel { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , # [codec (index = 3)] # [doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] # [doc = "a para may have. Normally this happens once per session, but this allows"] # [doc = "you to trigger the cleanup immediately for a specific parachain."] # [doc = ""] # [doc = "Origin must be Root."] # [doc = ""] # [doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] force_clean_hrmp { para : runtime_types :: polkadot_parachain :: primitives :: Id , inbound : :: core :: primitive :: u32 , outbound : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Force process HRMP open channel requests."] # [doc = ""] # [doc = "If there are pending HRMP open channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of opening channels must be provided as witness data of weighing."] force_process_hrmp_open { channels : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Force process HRMP close channel requests."] # [doc = ""] # [doc = "If there are pending HRMP close channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of closing channels must be provided as witness data of weighing."] force_process_hrmp_close { channels : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] # [doc = "or the recipient for that request. The origin must be either of those."] # [doc = ""] # [doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] # [doc = "already accepted."] # [doc = ""] # [doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] # [doc = "witness data."] hrmp_cancel_open_request { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , open_requests : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although"] # [doc = "opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay"] # [doc = "Chain's configured limits."] # [doc = ""] # [doc = "Expected use is when one of the `ParaId`s involved in the channel is governed by the"] # [doc = "Relay Chain, e.g. a common good parachain."] force_open_hrmp_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , recipient : runtime_types :: polkadot_parachain :: primitives :: Id , max_capacity : :: core :: primitive :: u32 , max_message_size : :: core :: primitive :: u32 , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)] @@ -39818,8 +42642,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -39864,8 +42692,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpChannel { pub max_capacity: ::core::primitive::u32, pub max_total_size: ::core::primitive::u32, @@ -39879,8 +42711,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct HrmpOpenChannelRequest { pub confirmed: ::core::primitive::bool, pub _age: ::core::primitive::u32, @@ -39897,15 +42733,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -40002,8 +42846,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -40040,8 +42888,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AvailabilityBitfieldRecord<_0> { pub bitfield: runtime_types::polkadot_primitives::v2::AvailabilityBitfield, @@ -40050,8 +42902,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CandidatePendingAvailability<_0, _1> { pub core: runtime_types::polkadot_primitives::v2::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, @@ -40077,8 +42933,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -40091,8 +42951,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< runtime_types::polkadot_primitives::v2::validator_app::Public, @@ -40110,8 +42974,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Origin { #[codec(index = 0)] Parachain(runtime_types::polkadot_parachain::primitives::Id), @@ -40125,16 +42993,24 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { # [codec (index = 0)] # [doc = "Set the storage for the parachain validation code immediately."] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Set the storage for the current parachain head data immediately."] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] # [doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] force_schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , relay_parent_number : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Note a new block head for para within the context of the current block."] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] # [doc = "Put a parachain directly into the next session's action queue."] # [doc = "We can't queue it any sooner than this without going into the"] # [doc = "initializer..."] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Adds the validation code to the storage."] # [doc = ""] # [doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] # [doc = "is running for that code, it will be instantly accepted."] # [doc = ""] # [doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] # [doc = "into storage with reference count 0. This is to account the fact that there are no users"] # [doc = "for this code yet. The caller will have to make sure that this code eventually gets"] # [doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] # [doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] # [doc = ""] # [doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] # [doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] # [doc = "Remove the validation code from the storage iff the reference count is 0."] # [doc = ""] # [doc = "This is better than removing the storage directly, because it will not remove the code"] # [doc = "that was suddenly got used by some parachain while this dispatchable was pending"] # [doc = "dispatching."] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] # [doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] # [doc = "enacts the results if that was the last vote before achieving the supermajority."] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[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)] @@ -40181,8 +43057,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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 = "Current code has been updated for a Para. `para_id`"] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] # [doc = "Current head has been updated for a Para. `para_id`"] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] # [doc = "A code upgrade has been scheduled for a Para. `para_id`"] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] # [doc = "A new head has been noted for a Para. `para_id`"] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] # [doc = "A para has been queued to execute pending actions. `para_id`"] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] # [doc = "The given para either initiated or subscribed to a PVF check for the given validation"] # [doc = "code. `code_hash` `para_id`"] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] # [doc = "The given validation code was accepted by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] # [doc = "The given validation code was rejected by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } @@ -40190,8 +43070,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaGenesisArgs { pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, @@ -40202,8 +43086,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ParaLifecycle { #[codec(index = 0)] Onboarding, @@ -40223,14 +43111,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParaPastCodeMeta < _0 > { pub upgrade_times : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: paras :: ReplacementTimes < _0 > > , pub last_pruned : :: core :: option :: Option < _0 > , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct PvfCheckActiveVoteState<_0> { pub votes_accept: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, @@ -40251,8 +43147,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum PvfCheckCause<_0> { #[codec(index = 0)] Onboarding(runtime_types::polkadot_parachain::primitives::Id), @@ -40265,8 +43165,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ReplacementTimes<_0> { pub expected_at: _0, pub activated_at: _0, @@ -40279,8 +43183,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -40297,8 +43205,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -40328,8 +43240,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AssignmentKind { #[codec(index = 0)] Parachain, @@ -40342,20 +43258,32 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct CoreAssignment { pub core : runtime_types :: polkadot_primitives :: v2 :: CoreIndex , pub para_id : runtime_types :: polkadot_parachain :: primitives :: Id , pub kind : runtime_types :: polkadot_runtime_parachains :: scheduler :: AssignmentKind , pub group_idx : runtime_types :: polkadot_primitives :: v2 :: GroupIndex , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ParathreadClaimQueue { pub queue : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: QueuedParathread > , pub next_core_offset : :: core :: primitive :: u32 , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct QueuedParathread { pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, pub core_offset: ::core::primitive::u32, @@ -40368,8 +43296,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call {} } @@ -40381,8 +43313,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] @@ -40406,8 +43342,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] @@ -40420,8 +43360,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "\n\t\t\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)] @@ -40481,15 +43425,6 @@ pub mod api { } } } - pub mod primitive_types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Debug, - )] - pub struct H256(pub [::core::primitive::u8; 32usize]); - } pub mod sp_arithmetic { use super::runtime_types; pub mod fixed_point { @@ -40498,8 +43433,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct FixedU128(pub ::core::primitive::u128); } pub mod per_things { @@ -40508,29 +43447,45 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct 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, Debug, )] + #[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, Debug, )] + #[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, Debug, )] + #[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); } } @@ -40541,8 +43496,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } } @@ -40553,8 +43512,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::sr25519::Public); } pub mod digests { @@ -40562,8 +43525,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum NextConfigDescriptor { #[codec(index = 1)] V1 { @@ -40574,15 +43541,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum 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, Debug, )] + #[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, @@ -40592,8 +43567,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -40601,8 +43580,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -40613,8 +43596,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AllowedSlots { #[codec(index = 0)] PrimarySlots, @@ -40626,8 +43613,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -40638,8 +43629,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EquivocationProof<_0, _1> { pub offender: _1, pub slot: runtime_types::sp_consensus_slots::Slot, @@ -40650,8 +43645,12 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Slot(pub ::core::primitive::u64); } pub mod sp_core { @@ -40663,8 +43662,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BoundedBTreeMap<_0, _1>( pub ::subxt::utils::KeyedVec<_0, _1>, ); @@ -40674,8 +43677,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); } pub mod weak_bounded_vec { @@ -40683,8 +43690,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); } } @@ -40693,14 +43704,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] - pub struct AccountId32(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Debug, - )] + #[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 { @@ -40708,14 +43717,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub [::core::primitive::u8; 33usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub [::core::primitive::u8; 65usize]); } pub mod ed25519 { @@ -40723,14 +43740,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub [::core::primitive::u8; 32usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub [::core::primitive::u8; 64usize]); } pub mod offchain { @@ -40738,14 +43763,22 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< @@ -40758,27 +43791,43 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub [::core::primitive::u8; 32usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub [::core::primitive::u8; 64usize]); } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Void {} } pub mod sp_finality_grandpa { @@ -40788,21 +43837,33 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Public(pub runtime_types::sp_core::ed25519::Public); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Equivocation<_0, _1> { #[codec(index = 0)] Prevote( @@ -40824,8 +43885,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct EquivocationProof<_0, _1> { pub set_id: ::core::primitive::u64, pub equivocation: @@ -40837,8 +43902,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -40847,8 +43916,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)>, @@ -40863,8 +43936,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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< runtime_types::sp_runtime::generic::digest::DigestItem, @@ -40873,8 +43950,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DigestItem { #[codec(index = 6)] PreRuntime( @@ -40902,8 +43983,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Era { #[codec(index = 0)] Immortal, @@ -41424,8 +44509,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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)] @@ -41442,48 +44531,40 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct UncheckedExtrinsic<_0, _1, _2, _3>( pub ::std::vec::Vec<::core::primitive::u8>, #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, ); } } - pub mod multiaddress { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - Debug, - )] - pub enum MultiAddress<_0, _1> { - #[codec(index = 0)] - Id(_0), - #[codec(index = 1)] - Index(#[codec(compact)] _1), - #[codec(index = 2)] - Raw(::std::vec::Vec<::core::primitive::u8>), - #[codec(index = 3)] - Address32([::core::primitive::u8; 32usize]), - #[codec(index = 4)] - Address20([::core::primitive::u8; 20usize]), - } - } pub mod traits { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct BlakeTwo256; } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum ArithmeticError { #[codec(index = 0)] Underflow, @@ -41495,8 +44576,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum DispatchError { #[codec(index = 0)] Other, @@ -41528,8 +44613,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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], @@ -41537,8 +44626,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiSignature { #[codec(index = 0)] Ed25519(runtime_types::sp_core::ed25519::Signature), @@ -41550,8 +44643,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiSigner { #[codec(index = 0)] Ed25519(runtime_types::sp_core::ed25519::Public), @@ -41563,8 +44660,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum TokenError { #[codec(index = 0)] NoFunds, @@ -41584,8 +44685,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum TransactionalError { #[codec(index = 0)] LimitReached, @@ -41598,8 +44703,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>>, @@ -41613,8 +44722,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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>, @@ -41626,8 +44739,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -41649,8 +44766,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -41662,14 +44783,22 @@ pub mod api { :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct OldWeight(pub ::core::primitive::u64); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[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, @@ -41682,8 +44811,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct DoubleEncoded { pub encoded: ::std::vec::Vec<::core::primitive::u8>, } @@ -41695,15 +44828,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum BodyId { # [codec (index = 0)] Unit , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Index (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 3)] Executive , # [codec (index = 4)] Technical , # [codec (index = 5)] Legislative , # [codec (index = 6)] Judicial , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum BodyPart { #[codec(index = 0)] Voice, @@ -41737,15 +44878,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Junction { # [codec (index = 0)] Parent , # [codec (index = 1)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 2)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 3)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 4)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 5)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 6)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 7)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 8)] OnlyChild , # [codec (index = 9)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum NetworkId { # [codec (index = 0)] Any , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Polkadot , # [codec (index = 3)] Kusama , } } @@ -41754,8 +44903,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiAsset { #[codec(index = 0)] None, @@ -41810,8 +44963,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiLocation { #[codec(index = 0)] Null, @@ -41880,8 +45037,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Order { #[codec(index = 0)] Null, @@ -41951,8 +45112,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum OriginKind { #[codec(index = 0)] Native, @@ -41966,8 +45131,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Response { #[codec(index = 0)] Assets( @@ -41977,8 +45146,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Xcm { #[codec(index = 0)] WithdrawAsset { @@ -42065,8 +45238,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Junction { # [codec (index = 0)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 1)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 2)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 3)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 4)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 5)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 6)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 7)] OnlyChild , # [codec (index = 8)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } } @@ -42075,8 +45252,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AssetId { #[codec(index = 0)] Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), @@ -42086,8 +45267,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum AssetInstance { #[codec(index = 0)] Undefined, @@ -42107,8 +45292,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Fungibility { #[codec(index = 0)] Fungible(#[codec(compact)] ::core::primitive::u128), @@ -42118,8 +45307,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MultiAsset { pub id: runtime_types::xcm::v1::multiasset::AssetId, pub fun: runtime_types::xcm::v1::multiasset::Fungibility, @@ -42127,8 +45320,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum MultiAssetFilter { #[codec(index = 0)] Definite(runtime_types::xcm::v1::multiasset::MultiAssets), @@ -42138,8 +45335,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MultiAssets( pub ::std::vec::Vec< runtime_types::xcm::v1::multiasset::MultiAsset, @@ -42148,8 +45349,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum WildFungibility { #[codec(index = 0)] Fungible, @@ -42159,8 +45364,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum WildMultiAsset { #[codec(index = 0)] All, @@ -42176,8 +45385,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Junctions { #[codec(index = 0)] Here, @@ -42243,8 +45456,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct MultiLocation { pub parents: ::core::primitive::u8, pub interior: runtime_types::xcm::v1::multilocation::Junctions, @@ -42255,8 +45472,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Order { #[codec(index = 0)] Noop, @@ -42314,8 +45535,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Response { #[codec(index = 0)] Assets(runtime_types::xcm::v1::multiasset::MultiAssets), @@ -42325,8 +45550,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Xcm { #[codec(index = 0)] WithdrawAsset { @@ -42412,8 +45641,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Error { #[codec(index = 0)] Overflow, @@ -42471,8 +45704,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Outcome { #[codec(index = 0)] Complete(::core::primitive::u64), @@ -42488,8 +45725,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Instruction { #[codec(index = 0)] WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), @@ -42636,8 +45877,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum Response { #[codec(index = 0)] Null, @@ -42656,8 +45901,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum WeightLimit { #[codec(index = 0)] Unlimited, @@ -42667,15 +45916,23 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Xcm(pub ::std::vec::Vec); } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiAssets { #[codec(index = 0)] V0(::std::vec::Vec), @@ -42685,8 +45942,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedMultiLocation { #[codec(index = 0)] V0(runtime_types::xcm::v0::multi_location::MultiLocation), @@ -42696,8 +45957,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedResponse { #[codec(index = 0)] V0(runtime_types::xcm::v0::Response), @@ -42709,8 +45974,12 @@ pub mod api { #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub enum VersionedXcm { #[codec(index = 0)] V0(runtime_types::xcm::v0::Xcm), From 9e3ca6091ad582695b7de1ec7b8fa0cfa06f2370 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Feb 2023 12:18:58 +0000 Subject: [PATCH 05/31] fix tests --- Cargo.lock | 12 +- codegen/src/types/tests.rs | 164 +++++++++++++----- subxt/src/utils/mod.rs | 2 +- subxt/src/utils/wrapper_opaque.rs | 109 +++++++++--- .../ui-tests/src/correct/generic-params.rs | 14 +- 5 files changed, 222 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd375987c2..2caedb5d28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.1", + "gimli 0.27.2", ] [[package]] @@ -1187,9 +1187,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "glob" @@ -2040,9 +2040,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-scale-decode-as-type#05c472b48ffcabfed597c221d2b72121a0629800" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-scale-decode-as-type#1fbc5a589cbb022c7e250f887d3c9dbc606bc32f" dependencies = [ "either", "frame-metadata", diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index a8df6860b1..54450c6055 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -56,7 +56,9 @@ fn generate_struct_with_primitives() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: ::core::primitive::bool, pub b: ::core::primitive::u32, @@ -104,12 +106,16 @@ fn generate_struct_with_a_struct_field() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Child { pub a: ::core::primitive::i32, } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Parent { pub a: ::core::primitive::bool, pub b: root::subxt_codegen::types::tests::Child, @@ -151,10 +157,14 @@ fn generate_tuple_struct() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Child(pub ::core::primitive::i32,); - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Parent(pub ::core::primitive::bool, pub root::subxt_codegen::types::tests::Child,); } } @@ -235,34 +245,54 @@ fn derive_compact_as_for_uint_wrapper_structs() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Su128 { pub a: ::core::primitive::u128, } - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Su16 { pub a: ::core::primitive::u16, } - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Su32 { pub a: ::core::primitive::u32, } - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Su64 { pub a: ::core::primitive::u64, } - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Su8 { pub a: ::core::primitive::u8, } - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TSu128(pub ::core::primitive::u128,); - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TSu16(pub ::core::primitive::u16,); - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TSu32(pub ::core::primitive::u32,); - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TSu64(pub ::core::primitive::u64,); - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TSu8(pub ::core::primitive::u8,); } } @@ -300,7 +330,9 @@ fn generate_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub enum E { # [codec (index = 0)] A, @@ -360,7 +392,9 @@ fn compact_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub enum E { # [codec (index = 0)] A { @@ -371,12 +405,16 @@ fn compact_fields() { B( #[codec(compact)] ::core::primitive::u32,), } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { #[codec(compact)] pub a: ::core::primitive::u32, } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct TupleStruct(#[codec(compact)] pub ::core::primitive::u32,); } } @@ -419,7 +457,9 @@ fn compact_generic_parameter() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: ::core::option::Option<::subxt_path::ext::codec::Compact<::core::primitive::u128> >, pub nested: ::core::option::Option<::core::result::Result<::subxt_path::ext::codec::Compact<::core::primitive::u128>, ::core::primitive::u8 > >, @@ -461,7 +501,9 @@ fn generate_array_field() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: [::core::primitive::u8; 32usize], } @@ -500,7 +542,9 @@ fn option_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: ::core::option::Option<::core::primitive::bool>, pub b: ::core::option::Option<::core::primitive::u32>, @@ -542,7 +586,9 @@ fn box_fields_struct() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: ::std::boxed::Box<::core::primitive::bool>, pub b: ::std::boxed::Box<::core::primitive::u32>, @@ -584,7 +630,9 @@ fn box_fields_enum() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub enum E { # [codec (index = 0)] A(::std::boxed::Box<::core::primitive::bool>,), @@ -626,7 +674,9 @@ fn range_fields() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub a: ::core::ops::Range<::core::primitive::u32>, pub b: ::core::ops::RangeInclusive<::core::primitive::u32>, @@ -672,12 +722,16 @@ fn generics() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Bar { pub b: root::subxt_codegen::types::tests::Foo<::core::primitive::u32>, pub c: root::subxt_codegen::types::tests::Foo<::core::primitive::u8>, } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Foo<_0> { pub a: _0, } @@ -722,12 +776,16 @@ fn generics_nested() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Bar<_0> { pub b: root::subxt_codegen::types::tests::Foo<_0, ::core::primitive::u32>, } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Foo<_0, _1> { pub a: _0, pub b: ::core::option::Option<(_0, _1,)>, @@ -775,7 +833,9 @@ fn generate_bitvec() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct S { pub lsb: ::subxt_path::utils::bits::DecodedBits<::core::primitive::u8, ::subxt_path::utils::bits::Lsb0>, pub msb: ::subxt_path::utils::bits::DecodedBits<::core::primitive::u16, ::subxt_path::utils::bits::Msb0>, @@ -830,12 +890,16 @@ fn generics_with_alias_adds_phantom_data_marker() { quote! { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::CompactAs, ::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct NamedFields<_0> { pub b: ::core::primitive::u32, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct UnnamedFields<_0, _1> ( pub (::core::primitive::u32, ::core::primitive::u32,), #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1)> @@ -900,20 +964,26 @@ fn modules() { pub mod b { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Bar { pub a: root::subxt_codegen::types::tests::m::a::Foo, } } - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Foo; } pub mod c { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct Foo { pub a: root::subxt_codegen::types::tests::m::a::b::Bar, } @@ -952,7 +1022,9 @@ fn dont_force_struct_names_camel_case() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct AB; } } @@ -995,10 +1067,14 @@ fn apply_user_defined_derives_for_all_types() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Clone, Debug, Eq)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Clone, Debug, Eq)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Clone, Debug, Eq)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Clone, Debug, Eq)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct B; } } @@ -1062,13 +1138,19 @@ fn apply_user_defined_derives_for_specific_types() { pub mod tests { use super::root; - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug, Eq)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct A(pub root :: subxt_codegen :: types :: tests :: B,); - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug, Eq, Hash)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq, Hash)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct B(pub root :: subxt_codegen :: types :: tests :: C,); - #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, Debug, Eq, Ord, PartialOrd)] + #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug, Eq, Ord, PartialOrd)] + #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct C; } } diff --git a/subxt/src/utils/mod.rs b/subxt/src/utils/mod.rs index ef2a605c22..8a4bd3823a 100644 --- a/subxt/src/utils/mod.rs +++ b/subxt/src/utils/mod.rs @@ -5,10 +5,10 @@ //! Miscellaneous utility helpers. mod account_id; +pub mod bits; mod multi_address; mod multi_signature; mod wrapper_opaque; -pub mod bits; use codec::{ Decode, diff --git a/subxt/src/utils/wrapper_opaque.rs b/subxt/src/utils/wrapper_opaque.rs index 9184aa2408..2edb337d9d 100644 --- a/subxt/src/utils/wrapper_opaque.rs +++ b/subxt/src/utils/wrapper_opaque.rs @@ -9,9 +9,12 @@ use codec::{ DecodeAll, Encode, }; -use scale_encode::EncodeAsType; -use scale_decode::{ Visitor, IntoVisitor }; use derivative::Derivative; +use scale_decode::{ + IntoVisitor, + Visitor, +}; +use scale_encode::EncodeAsType; /// A wrapper for any type `T` which implement encode/decode in a way compatible with `Vec`. /// [`WrapperKeepOpaque`] stores the type only in its opaque format, aka as a `Vec`. To @@ -41,7 +44,10 @@ impl WrapperKeepOpaque { /// Try to decode the wrapped type from the inner `data`. /// /// Returns `None` if the decoding failed. - pub fn try_decode(&self) -> Option where T: Decode { + pub fn try_decode(&self) -> Option + where + T: Decode, + { T::decode_all(&mut &self.data[..]).ok() } @@ -64,22 +70,29 @@ impl WrapperKeepOpaque { } /// Create from some raw value by encoding it. - pub fn from_value(value: T) -> Self where T: Encode { + pub fn from_value(value: T) -> Self + where + T: Encode, + { Self { data: value.encode(), - _phantom: PhantomDataSendSync::new() + _phantom: PhantomDataSendSync::new(), } } } -impl EncodeAsType for WrapperKeepOpaque { +impl EncodeAsType for WrapperKeepOpaque { fn encode_as_type_to( &self, type_id: u32, types: &scale_info::PortableRegistry, out: &mut Vec, ) -> Result<(), scale_encode::Error> { - use scale_encode::error::{ Error, ErrorKind, Kind }; + use scale_encode::error::{ + Error, + ErrorKind, + Kind, + }; let Some(ty) = types.resolve(type_id) else { return Err(Error::new(ErrorKind::TypeNotFound(type_id))) @@ -92,7 +105,10 @@ impl EncodeAsType for WrapperKeepOpaque { // Check that the name also lines up. if ty.path().ident().as_deref() != Some("WrapperKeepOpaque") { - return Err(Error::new(ErrorKind::WrongShape { actual: Kind::Struct, expected: type_id })) + return Err(Error::new(ErrorKind::WrongShape { + actual: Kind::Struct, + expected: type_id, + })) } // Just blat the bytes out.. @@ -102,7 +118,7 @@ impl EncodeAsType for WrapperKeepOpaque { } pub struct WrapperKeepOpaqueVisitor(std::marker::PhantomData); -impl Visitor for WrapperKeepOpaqueVisitor { +impl Visitor for WrapperKeepOpaqueVisitor { type Value<'scale, 'info> = WrapperKeepOpaque; type Error = scale_decode::Error; @@ -111,17 +127,28 @@ impl Visitor for WrapperKeepOpaqueVisitor { value: &mut scale_decode::visitor::types::Composite<'scale, 'info>, type_id: scale_decode::visitor::TypeId, ) -> Result, Self::Error> { - use scale_decode::error::{ Error, ErrorKind }; + use scale_decode::error::{ + Error, + ErrorKind, + }; if value.path().ident().as_deref() != Some("WrapperKeepOpaque") { - return Err(Error::new(ErrorKind::Custom("Type to decode is not 'WrapperTypeKeepOpaque'".into()))) + return Err(Error::new(ErrorKind::Custom( + "Type to decode is not 'WrapperTypeKeepOpaque'".into(), + ))) } if value.remaining() != 2 { - return Err(Error::new(ErrorKind::WrongLength { actual: type_id.0, actual_len: value.remaining(), expected_len: 2 })) + return Err(Error::new(ErrorKind::WrongLength { + actual: type_id.0, + actual_len: value.remaining(), + expected_len: 2, + })) } // The field to decode is a compact len followed by bytes. Decode the length, then grab the bytes. - let Compact(len) = value.decode_item(Compact::::into_visitor()).expect("length checked")?; + let Compact(len) = value + .decode_item(Compact::::into_visitor()) + .expect("length checked")?; let field = value.next().expect("length checked")?; // Sanity check that the compact length we decoded lines up with the number of bytes encoded inthe next field. @@ -131,12 +158,12 @@ impl Visitor for WrapperKeepOpaqueVisitor { Ok(WrapperKeepOpaque { data: field.bytes().to_vec(), - _phantom: PhantomDataSendSync::new() + _phantom: PhantomDataSendSync::new(), }) } } -impl IntoVisitor for WrapperKeepOpaque { +impl IntoVisitor for WrapperKeepOpaque { type Visitor = WrapperKeepOpaqueVisitor; fn into_visitor() -> Self::Visitor { WrapperKeepOpaqueVisitor(std::marker::PhantomData) @@ -155,7 +182,13 @@ mod test { impl scale_info::TypeInfo for WrapperKeepOpaque { type Identity = Self; fn type_info() -> scale_info::Type { - use scale_info::{ Path, Type, build::Fields, TypeParameter, meta_type }; + use scale_info::{ + build::Fields, + meta_type, + Path, + Type, + TypeParameter, + }; Type::builder() .path(Path::new("WrapperKeepOpaque", module_path!())) @@ -169,7 +202,8 @@ mod test { } /// Given a type definition, return type ID and registry representing it. - fn make_type() -> (u32, scale_info::PortableRegistry) { + fn make_type( + ) -> (u32, scale_info::PortableRegistry) { let m = scale_info::MetaType::new::(); let mut types = scale_info::Registry::new(); let id = types.register_type(&m); @@ -179,33 +213,52 @@ mod test { fn roundtrips_like_scale_codec(t: T) where - T: EncodeAsType + DecodeAsType + Encode + Decode + PartialEq + std::fmt::Debug + scale_info::TypeInfo + 'static + T: EncodeAsType + + DecodeAsType + + Encode + + Decode + + PartialEq + + std::fmt::Debug + + scale_info::TypeInfo + + 'static, { let (type_id, types) = make_type::(); let scale_codec_encoded = t.encode(); let encode_as_type_encoded = t.encode_as_type(type_id, &types).unwrap(); - assert_eq!(scale_codec_encoded, encode_as_type_encoded, "encoded bytes should match"); + assert_eq!( + scale_codec_encoded, encode_as_type_encoded, + "encoded bytes should match" + ); let decode_as_type_bytes = &mut &*scale_codec_encoded; let decoded_as_type = T::decode_as_type(decode_as_type_bytes, type_id, &types) .expect("decode-as-type decodes"); let decode_scale_codec_bytes = &mut &*scale_codec_encoded; - let decoded_scale_codec = T::decode(decode_scale_codec_bytes) - .expect("scale-codec decodes"); - - assert!(decode_as_type_bytes.is_empty(), "no bytes should remain in decode-as-type impl"); - assert!(decode_scale_codec_bytes.is_empty(), "no bytes should remain in codec-decode impl"); - - assert_eq!(decoded_as_type, decoded_scale_codec, "decoded values should match"); + let decoded_scale_codec = + T::decode(decode_scale_codec_bytes).expect("scale-codec decodes"); + + assert!( + decode_as_type_bytes.is_empty(), + "no bytes should remain in decode-as-type impl" + ); + assert!( + decode_scale_codec_bytes.is_empty(), + "no bytes should remain in codec-decode impl" + ); + + assert_eq!( + decoded_as_type, decoded_scale_codec, + "decoded values should match" + ); } #[test] fn wrapper_keep_opaque_roundtrips_ok() { roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(123u64)); roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(true)); - roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(vec![1u8,2,3,4])); + roundtrips_like_scale_codec(WrapperKeepOpaque::from_value(vec![1u8, 2, 3, 4])); } -} \ No newline at end of file +} diff --git a/testing/ui-tests/src/correct/generic-params.rs b/testing/ui-tests/src/correct/generic-params.rs index 975fb8d520..c81b16dad8 100644 --- a/testing/ui-tests/src/correct/generic-params.rs +++ b/testing/ui-tests/src/correct/generic-params.rs @@ -4,11 +4,19 @@ use codec::{Decode, Encode}; use subxt::utils::AccountId32; -#[derive(Encode, Decode, Debug)] +#[derive(Encode, Decode, subxt::ext::scale_encode::EncodeAsType, subxt::ext::scale_decode::DecodeAsType, Debug)] +#[encode_as_type(crate_path = "subxt::ext::scale_encode")] +#[decode_as_type(crate_path = "subxt::ext::scale_decode")] pub struct CustomAddress(u16); -#[derive(Encode, Decode, Debug)] + +#[derive(Encode, Decode, subxt::ext::scale_encode::EncodeAsType, subxt::ext::scale_decode::DecodeAsType, Debug)] +#[encode_as_type(crate_path = "subxt::ext::scale_encode")] +#[decode_as_type(crate_path = "subxt::ext::scale_decode")] pub struct Generic(T); -#[derive(Encode, Decode, Debug)] + +#[derive(Encode, Decode, subxt::ext::scale_encode::EncodeAsType, subxt::ext::scale_decode::DecodeAsType, Debug)] +#[encode_as_type(crate_path = "subxt::ext::scale_encode")] +#[decode_as_type(crate_path = "subxt::ext::scale_decode")] pub struct Second(U, PhantomData); #[subxt::subxt( From f3dab469127bfbeb76cce13b2e58b2440a27418b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 21 Feb 2023 12:27:14 +0000 Subject: [PATCH 06/31] accomodate scale-value changes --- Cargo.lock | 11 ++++++----- subxt/Cargo.toml | 4 ++-- subxt/src/error.rs | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5977b3fd1..905782595f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2632,9 +2632,9 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.11" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95677054fca3564fb08de43f1208128c986a2abe3e186262385a715aed8ae66" +checksum = "b415d798277870984d39315a48b8cf9bfd44b304a3d88544400edf133435fc40" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2646,9 +2646,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.11" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c18acd44b9da8bbeec4dbbdc798e9f28990dc1445f1a5ba3de048c0e44a797" +checksum = "3b81a6f686d76f6d7e71765af351debd582f89037414a64a4bd4e072ff2179c6" dependencies = [ "darling", "proc-macro-crate", @@ -2686,13 +2686,14 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-scale-decode-as-type#1fbc5a589cbb022c7e250f887d3c9dbc606bc32f" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#7872209ec66de5c7e88f0a74782079a6fd16101c" dependencies = [ "either", "frame-metadata", "parity-scale-codec", "scale-bits", "scale-decode", + "scale-encode", "scale-info", "serde", "thiserror", diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 1ddc2a489e..2fb051eb0d 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -37,10 +37,10 @@ jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } scale-info = "2.0.0" -scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-scale-decode-as-type" } +scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.11" +scale-encode = "0.0.15" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 90c1683a15..bdbaad822d 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -51,7 +51,7 @@ pub enum Error { DecodeValue(#[from] DecodeError), /// Error encoding from a [`crate::dynamic::Value`]. #[error("Error encoding from dynamic value: {0}")] - EncodeValue(#[from] EncodeError<()>), + EncodeValue(#[from] EncodeError), /// Transaction progress error. #[error("Transaction error: {0}")] Transaction(#[from] TransactionError), From 7ccfe927900dbd3da957e5da23f4f426cc583d1c Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 23 Feb 2023 17:01:13 +0000 Subject: [PATCH 07/31] starting to migrate to EncodeAsType/DecodeAsType --- Cargo.lock | 54 +- codegen/src/api/constants.rs | 2 +- codegen/src/api/storage.rs | 4 +- subxt/Cargo.toml | 2 +- subxt/src/constants/constant_address.rs | 6 +- subxt/src/constants/constants_client.rs | 11 +- subxt/src/dynamic.rs | 21 +- subxt/src/error.rs | 10 +- subxt/src/events/events_type.rs | 52 +- subxt/src/events/mod.rs | 4 +- subxt/src/metadata/decode_encode_traits.rs | 51 + subxt/src/metadata/decode_with_metadata.rs | 79 - subxt/src/metadata/encode_with_metadata.rs | 67 - subxt/src/metadata/metadata_type.rs | 25 +- subxt/src/metadata/mod.rs | 10 +- subxt/src/storage/storage_address.rs | 2 +- subxt/src/storage/storage_type.rs | 60 +- subxt/src/utils/wrapper_opaque.rs | 3 +- .../integration-tests/src/codegen/polkadot.rs | 73250 +++++++++------- 19 files changed, 43380 insertions(+), 30333 deletions(-) create mode 100644 subxt/src/metadata/decode_encode_traits.rs delete mode 100644 subxt/src/metadata/decode_with_metadata.rs delete mode 100644 subxt/src/metadata/encode_with_metadata.rs diff --git a/Cargo.lock b/Cargo.lock index 905782595f..aea1fa2ec8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -294,9 +294,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2aff4807e40f478132150d80b031f2461d88f061851afcab537d7600c24120" +checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" dependencies = [ "log", "parity-scale-codec", @@ -700,9 +700,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90d59d9acd2a682b4e40605a242f6670eaa58c5957471cbf85e8aa6a0b97a5e8" +checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" dependencies = [ "cc", "cxxbridge-flags", @@ -712,9 +712,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfa40bda659dd5c864e65f4c9a2b0aff19bea56b017b9b77c73d3766a453a38" +checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" dependencies = [ "cc", "codespan-reporting", @@ -727,15 +727,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457ce6757c5c70dc6ecdbda6925b958aae7f959bda7d8fb9bde889e34a09dc03" +checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" [[package]] name = "cxxbridge-macro" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf883b7aacd7b2aeb2a7b338648ee19f57c140d4ee8e52c68979c6b2f7f2263" +checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" dependencies = [ "proc-macro2", "quote", @@ -1381,9 +1381,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -1593,9 +1593,9 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", @@ -2608,7 +2608,7 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3e0d88f3539344f46c15bfbe23b9c3cb8fe9bdbd" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3f2bbd29fe4b168d438cf34c0fd991fc9e82d625" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2621,7 +2621,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3e0d88f3539344f46c15bfbe23b9c3cb8fe9bdbd" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3f2bbd29fe4b168d438cf34c0fd991fc9e82d625" dependencies = [ "darling", "proc-macro-crate", @@ -2632,9 +2632,9 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.15" +version = "0.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b415d798277870984d39315a48b8cf9bfd44b304a3d88544400edf133435fc40" +checksum = "01664452a22ef3d9dc6ce24cc5dd6fb217d51b09f3ee551b48828a47ee094e79" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2646,9 +2646,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.15" +version = "0.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b81a6f686d76f6d7e71765af351debd582f89037414a64a4bd4e072ff2179c6" +checksum = "373feebf1e4294837dcbae7cf8a04b4f8fa4a4f273cb055d7da13a67059a4962" dependencies = [ "darling", "proc-macro-crate", @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#7872209ec66de5c7e88f0a74782079a6fd16101c" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#0b7f1c83cd214a02be8b37502634cdeabf7ce8e4" dependencies = [ "either", "frame-metadata", @@ -2923,9 +2923,9 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -3352,9 +3352,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40c020d72bc0a9c5660bb71e4a6fdef081493583062c474740a7d59f55f0e7b" +checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" dependencies = [ "Inflector", "num-format", @@ -3538,9 +3538,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "d56e159d99e6c2b93995d171050271edb50ecc5288fbc7cc17de8fdce4e58c14" dependencies = [ "proc-macro2", "quote", diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index 73ef80b134..d6cfb063fd 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -67,7 +67,7 @@ pub fn generate_constants( quote! { #( #[doc = #docs ] )* - pub fn #fn_name(&self) -> #crate_path::constants::StaticConstantAddress<#crate_path::metadata::DecodeStaticType<#return_ty>> { + pub fn #fn_name(&self) -> #crate_path::constants::StaticConstantAddress<#return_ty> { #crate_path::constants::StaticConstantAddress::new( #pallet_name, #constant_name, diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 2168abe760..0009766c54 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -227,7 +227,7 @@ fn generate_storage_entry_fns( #docs_token pub fn #fn_name_root( &self, - ) -> #crate_path::storage::address::StaticStorageAddress::<#crate_path::metadata::DecodeStaticType<#storage_entry_value_ty>, (), #is_defaultable_type, #is_iterable_type> { + ) -> #crate_path::storage::address::StaticStorageAddress::<#storage_entry_value_ty, (), #is_defaultable_type, #is_iterable_type> { #crate_path::storage::address::StaticStorageAddress::new( #pallet_name, #storage_name, @@ -246,7 +246,7 @@ fn generate_storage_entry_fns( pub fn #fn_name( &self, #( #key_args, )* - ) -> #crate_path::storage::address::StaticStorageAddress::<#crate_path::metadata::DecodeStaticType<#storage_entry_value_ty>, #crate_path::storage::address::Yes, #is_defaultable_type, #is_iterable_type> { + ) -> #crate_path::storage::address::StaticStorageAddress::<#storage_entry_value_ty, #crate_path::storage::address::Yes, #is_defaultable_type, #is_iterable_type> { #crate_path::storage::address::StaticStorageAddress::new( #pallet_name, #storage_name, diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 2fb051eb0d..9787af1172 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -40,7 +40,7 @@ scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.15" +scale-encode = "0.0.17" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index cb3cdbdfa7..f2cb9f0740 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -2,10 +2,8 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::{ - dynamic::DecodedValueThunk, - metadata::DecodeWithMetadata, -}; +use crate::dynamic::DecodedValueThunk; +use crate::metadata::DecodeWithMetadata; use std::borrow::Cow; /// This represents a constant address. Anything implementing this trait diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index a779ab2de5..bb4ebe99ed 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -6,10 +6,7 @@ use super::ConstantAddress; use crate::{ client::OfflineClientT, error::Error, - metadata::{ - DecodeWithMetadata, - MetadataError, - }, + metadata::{MetadataError, DecodeWithMetadata}, Config, }; use derivative::Derivative; @@ -63,7 +60,7 @@ impl> ConstantsClient { pub fn at( &self, address: &Address, - ) -> Result<::Target, Error> { + ) -> Result { let metadata = self.client.metadata(); // 1. Validate constant shape if hash given: @@ -72,10 +69,10 @@ impl> ConstantsClient { // 2. Attempt to decode the constant into the type given: let pallet = metadata.pallet(address.pallet_name())?; let constant = pallet.constant(address.constant_name())?; - let value = Address::Target::decode_with_metadata( + let value = ::decode_with_metadata( &mut &*constant.value, constant.ty.id(), - &metadata, + &metadata )?; Ok(value) } diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs index a4d86f7c66..1ef9a35a4e 100644 --- a/subxt/src/dynamic.rs +++ b/subxt/src/dynamic.rs @@ -5,13 +5,9 @@ //! This module provides the entry points to create dynamic //! transactions, storage and constant lookups. -use crate::{ - error::Error, - metadata::{ - DecodeWithMetadata, - Metadata, - }, -}; +use crate::error::Error; +use crate::metadata::{ Metadata, DecodeWithMetadata }; +use scale_decode::DecodeAsType; pub use scale_value::Value; @@ -43,13 +39,11 @@ pub struct DecodedValueThunk { } impl DecodeWithMetadata for DecodedValueThunk { - type Target = Self; - fn decode_with_metadata( bytes: &mut &[u8], type_id: u32, metadata: &Metadata, - ) -> Result { + ) -> Result { let mut v = Vec::with_capacity(bytes.len()); v.extend_from_slice(bytes); *bytes = &[]; @@ -72,10 +66,11 @@ impl DecodedValueThunk { } /// Decode the SCALE encoded storage entry into a dynamic [`DecodedValue`] type. pub fn to_value(&self) -> Result { - DecodedValue::decode_with_metadata( + let val = DecodedValue::decode_as_type( &mut &*self.scale_bytes, self.type_id, - &self.metadata, - ) + self.metadata.types(), + )?; + Ok(val) } } diff --git a/subxt/src/error.rs b/subxt/src/error.rs index bdbaad822d..35a8982995 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -15,10 +15,8 @@ pub use crate::metadata::{ InvalidMetadataError, MetadataError, }; -pub use scale_value::scale::{ - DecodeError, - EncodeError, -}; +pub use scale_encode::Error as EncodeError; +pub use scale_decode::Error as DecodeError; /// The underlying error enum, generic over the type held by the `Runtime` /// variant. Prefer to use the [`Error`] and [`Error`] aliases over @@ -48,10 +46,10 @@ pub enum Error { Runtime(DispatchError), /// Error decoding to a [`crate::dynamic::Value`]. #[error("Error decoding into dynamic value: {0}")] - DecodeValue(#[from] DecodeError), + Decode(#[from] DecodeError), /// Error encoding from a [`crate::dynamic::Value`]. #[error("Error encoding from dynamic value: {0}")] - EncodeValue(#[from] EncodeError), + Encode(#[from] EncodeError), /// Transaction progress error. #[error("Transaction error: {0}")] Transaction(#[from] TransactionError), diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 768d378a44..e56dff2f22 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -12,14 +12,16 @@ use crate::{ client::OnlineClientT, error::Error, events::events_client::get_event_bytes, - metadata::EventMetadata, + metadata::{ + EventMetadata, + DecodeWithMetadata, + }, Config, Metadata, }; use codec::{ Compact, Decode, - Error as CodecError, }; use derivative::Derivative; use std::sync::Arc; @@ -203,6 +205,7 @@ impl Events { #[derive(Debug, Clone)] pub struct EventDetails { phase: Phase, + /// The index of the event in the list of events in a given block. index: u32, all_bytes: Arc<[u8]>, // start of the bytes (phase, pallet/variant index and then fields and then topic to follow). @@ -250,10 +253,10 @@ impl EventDetails { // Skip over the bytes for this field: scale_decode::visitor::decode_with_visitor( input, - field_metadata.type_id(), + field_metadata.ty().id(), &metadata.runtime_metadata().types, scale_decode::visitor::IgnoreVisitor, - )?; + ).map_err(scale_decode::Error::from)?; } // the end of the field bytes. @@ -356,9 +359,9 @@ impl EventDetails { for field_metadata in event_metadata.fields() { let value = scale_value::scale::decode_as_type( bytes, - field_metadata.type_id(), + field_metadata.ty().id(), &self.metadata.runtime_metadata().types, - )?; + ).map_err(scale_decode::Error::from)?; event_values.push(value); } @@ -368,25 +371,26 @@ impl EventDetails { for field_metadata in event_metadata.fields() { let value = scale_value::scale::decode_as_type( bytes, - field_metadata.type_id(), + field_metadata.ty().id(), &self.metadata.runtime_metadata().types, - )?; + ).map_err(scale_decode::Error::from)?; event_values - .push((field_metadata.name().unwrap_or_default().to_string(), value)); + .push((field_metadata.name().cloned().unwrap_or_default(), value)); } Ok(scale_value::Composite::Named(event_values)) } } - /// Attempt to decode these [`EventDetails`] into a specific static event. - /// This targets the fields within the event directly. You can also attempt to - /// decode the entirety of the event type (including the pallet and event - /// variants) using [`EventDetails::as_root_event()`]. - pub fn as_event(&self) -> Result, CodecError> { + /// Attempt to statically decode these [`EventDetails`] into a type representing the event + /// fields. This leans directly on [`codec::Decode`]. You can also attempt to decode the entirety + /// of the event using [`EventDetails::as_root_event()`], which is more lenient because it's able + /// to lean on [`scale_decode::DecodeAsType`]. + pub fn as_event(&self) -> Result, Error> { let ev_metadata = self.event_metadata(); if ev_metadata.pallet() == E::PALLET && ev_metadata.event() == E::EVENT { - Ok(Some(E::decode(&mut self.field_bytes())?)) + let decoded = E::decode_as_fields(&mut self.field_bytes(), ev_metadata.fields(), self.metadata.types())?; + Ok(Some(decoded)) } else { Ok(None) } @@ -395,8 +399,18 @@ impl EventDetails { /// Attempt to decode these [`EventDetails`] into a root event type (which includes /// the pallet and event enum variants as well as the event fields). A compatible /// type for this is exposed via static codegen as a root level `Event` type. - pub fn as_root_event(&self) -> Result { - E::decode(&mut &self.all_bytes[self.event_start_idx..self.event_fields_end_idx]) + pub fn as_root_event(&self) -> Result { + let pallet = self.metadata.pallet(self.pallet_name())?; + let event_ty = pallet.event_ty_id().ok_or_else(|| + Error::Metadata(crate::metadata::MetadataError::EventNotFound(pallet.index(), self.variant_index())) + )?; + + let decoded = E::decode_with_metadata( + &mut &self.all_bytes[self.event_start_idx..self.event_fields_end_idx], + event_ty, + &self.metadata + )?; + Ok(decoded) } } @@ -425,7 +439,7 @@ pub(crate) mod test_utils { use std::convert::TryFrom; /// An "outer" events enum containing exactly one event. - #[derive(Encode, Decode, TypeInfo, Clone, Debug, PartialEq, Eq)] + #[derive(Encode, Decode, TypeInfo, Clone, Debug, PartialEq, Eq, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] pub enum AllEvents { Test(Ev), } @@ -587,7 +601,7 @@ mod tests { #[test] fn statically_decode_single_root_event() { - #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] + #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo, scale_decode::DecodeAsType)] enum Event { A(u8, bool, Vec), } diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 69213532b6..aba92d0a53 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -14,7 +14,7 @@ pub use events_type::{ EventDetails, Events, }; - +use scale_decode::DecodeAsFields; use codec::{ Decode, Encode, @@ -26,7 +26,7 @@ use codec::{ /// /// The trait is utilized to decode emitted events from a block, via obtaining the /// form of the `Event` from the metadata. -pub trait StaticEvent: Decode { +pub trait StaticEvent: DecodeAsFields { /// Pallet name. const PALLET: &'static str; /// Event name. diff --git a/subxt/src/metadata/decode_encode_traits.rs b/subxt/src/metadata/decode_encode_traits.rs new file mode 100644 index 0000000000..7900ea641a --- /dev/null +++ b/subxt/src/metadata/decode_encode_traits.rs @@ -0,0 +1,51 @@ +// Copyright 2019-2022 Parity Technologies (UK) Ltd. +// This file is dual-licensed as Apache-2.0 or GPL-3.0. +// see LICENSE for license details. + +use super::Metadata; +use crate::error::Error; + +/// This trait is implemented for all types that also implement [`scale_decode::DecodeAsType`]. +pub trait DecodeWithMetadata: Sized { + /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. + fn decode_with_metadata( + bytes: &mut &[u8], + type_id: u32, + metadata: &Metadata, + ) -> Result; +} + +impl DecodeWithMetadata for T { + fn decode_with_metadata( + bytes: &mut &[u8], + type_id: u32, + metadata: &Metadata, + ) -> Result { + let val = T::decode_as_type(bytes, type_id, metadata.types())?; + Ok(val) + } +} + +/// This trait is implemented for all types that also implement [`scale_encode::EncodeAsType`]. +pub trait EncodeWithMetadata { + /// SCALE encode this type to bytes, possibly with the help of metadata. + fn encode_with_metadata( + &self, + type_id: u32, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error>; +} + +impl EncodeWithMetadata for T { + /// SCALE encode this type to bytes, possibly with the help of metadata. + fn encode_with_metadata( + &self, + type_id: u32, + metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + self.encode_as_type_to(type_id, metadata.types(), bytes)?; + Ok(()) + } +} diff --git a/subxt/src/metadata/decode_with_metadata.rs b/subxt/src/metadata/decode_with_metadata.rs deleted file mode 100644 index aa87447f34..0000000000 --- a/subxt/src/metadata/decode_with_metadata.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2019-2022 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use super::Metadata; -use crate::{ - dynamic::DecodedValue, - error::Error, -}; -use codec::Decode; -use frame_metadata::StorageEntryType; - -/// This trait is implemented for types which can be decoded with the help of metadata. -pub trait DecodeWithMetadata { - /// The type that we'll get back from decoding. - type Target; - /// Given some metadata and a type ID, attempt to SCALE decode the provided bytes into `Self`. - fn decode_with_metadata( - bytes: &mut &[u8], - type_id: u32, - metadata: &Metadata, - ) -> Result; - - /// Decode a storage item using metadata. By default, this uses the metadata to - /// work out the type ID to use, but for static items we can short circuit this - /// lookup. - fn decode_storage_with_metadata( - bytes: &mut &[u8], - pallet_name: &str, - storage_entry: &str, - metadata: &Metadata, - ) -> Result { - let ty = &metadata.pallet(pallet_name)?.storage(storage_entry)?.ty; - - let id = match ty { - StorageEntryType::Plain(ty) => ty.id(), - StorageEntryType::Map { value, .. } => value.id(), - }; - - Self::decode_with_metadata(bytes, id, metadata) - } -} - -// Things can be dynamically decoded to our Value type: -impl DecodeWithMetadata for DecodedValue { - type Target = Self; - fn decode_with_metadata( - bytes: &mut &[u8], - type_id: u32, - metadata: &Metadata, - ) -> Result { - let res = scale_value::scale::decode_as_type(bytes, type_id, metadata.types())?; - Ok(res) - } -} - -/// Any type implementing [`Decode`] can also be decoded with the help of metadata. -pub struct DecodeStaticType(std::marker::PhantomData); - -impl DecodeWithMetadata for DecodeStaticType { - type Target = T; - - fn decode_with_metadata( - bytes: &mut &[u8], - _type_id: u32, - _metadata: &Metadata, - ) -> Result { - T::decode(bytes).map_err(|e| e.into()) - } - - fn decode_storage_with_metadata( - bytes: &mut &[u8], - _pallet_name: &str, - _storage_entry: &str, - _metadata: &Metadata, - ) -> Result { - T::decode(bytes).map_err(|e| e.into()) - } -} diff --git a/subxt/src/metadata/encode_with_metadata.rs b/subxt/src/metadata/encode_with_metadata.rs deleted file mode 100644 index 387c20fd00..0000000000 --- a/subxt/src/metadata/encode_with_metadata.rs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2019-2022 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use crate::{ - dynamic::Value, - error::Error, - metadata::Metadata, -}; -use codec::Encode; - -/// This trait is implemented for types which can be encoded with the help of metadata. -pub trait EncodeWithMetadata { - /// SCALE encode this type to bytes, possibly with the help of metadata. - fn encode_with_metadata( - &self, - type_id: u32, - metadata: &Metadata, - bytes: &mut Vec, - ) -> Result<(), Error>; -} - -impl EncodeWithMetadata for Value<()> { - fn encode_with_metadata( - &self, - type_id: u32, - metadata: &Metadata, - bytes: &mut Vec, - ) -> Result<(), Error> { - scale_value::scale::encode_as_type(self, type_id, metadata.types(), bytes) - .map_err(|e| e.into()) - } -} - -/// Any type implementing [`Encode`] can also be encoded with the help of metadata. -pub struct EncodeStaticType(pub T); - -impl EncodeWithMetadata for EncodeStaticType { - fn encode_with_metadata( - &self, - _type_id: u32, - _metadata: &Metadata, - bytes: &mut Vec, - ) -> Result<(), Error> { - self.0.encode_to(bytes); - Ok(()) - } -} - -// We can transparently Encode anything wrapped in EncodeStaticType, too. -impl Encode for EncodeStaticType { - fn size_hint(&self) -> usize { - self.0.size_hint() - } - fn encode_to(&self, dest: &mut T) { - self.0.encode_to(dest) - } - fn encode(&self) -> Vec { - self.0.encode() - } - fn using_encoded R>(&self, f: F) -> R { - self.0.using_encoded(f) - } - fn encoded_size(&self) -> usize { - self.0.encoded_size() - } -} diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index f63cf08838..95c0636923 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -247,6 +247,7 @@ pub struct PalletMetadata { name: String, call_indexes: HashMap, call_ty_id: Option, + event_ty_id: Option, storage: HashMap>, constants: HashMap>, } @@ -268,6 +269,12 @@ impl PalletMetadata { self.call_ty_id } + /// If events exist for this pallet, this returns the type ID of the variant + /// representing the different possible events. + pub fn event_ty_id(&self) -> Option { + self.event_ty_id + } + /// Attempt to resolve a call into an index in this pallet, failing /// if the call is not found in this pallet. pub fn call_index(&self, function: &str) -> Result { @@ -338,7 +345,7 @@ pub struct EventMetadata { // behind an Arc to avoid lots of needless clones of it existing. pallet: Arc, event: String, - fields: Vec, + fields: Vec>, docs: Vec, } @@ -354,7 +361,7 @@ impl EventMetadata { } /// The names, type names & types of each field in the event. - pub fn fields(&self) -> &[EventFieldMetadata] { + pub fn fields(&self) -> &[scale_info::Field] { &self.fields } @@ -437,6 +444,7 @@ impl TryFrom for Metadata { .iter() .map(|pallet| { let call_ty_id = pallet.calls.as_ref().map(|c| c.ty.id()); + let event_ty_id = pallet.event.as_ref().map(|e| e.ty.id()); let call_indexes = pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { @@ -468,6 +476,7 @@ impl TryFrom for Metadata { name: pallet.name.to_string(), call_indexes, call_ty_id, + event_ty_id, storage, constants, }; @@ -488,17 +497,7 @@ impl TryFrom for Metadata { EventMetadata { pallet: pallet_name.clone(), event: variant.name().to_owned(), - fields: variant - .fields() - .iter() - .map(|f| { - EventFieldMetadata::new( - f.name().map(|n| n.to_owned()), - f.type_name().map(|n| n.to_owned()), - f.ty().id(), - ) - }) - .collect(), + fields: variant.fields().to_vec(), docs: variant.docs().to_vec(), }, ); diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 600ea119d1..1f4d309c37 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -4,8 +4,7 @@ //! Types representing the metadata obtained from a node. -mod decode_with_metadata; -mod encode_with_metadata; +mod decode_encode_traits; mod hash_cache; mod metadata_location; mod metadata_type; @@ -22,12 +21,7 @@ pub use metadata_type::{ PalletMetadata, }; -pub use decode_with_metadata::{ - DecodeStaticType, +pub use decode_encode_traits::{ DecodeWithMetadata, -}; - -pub use encode_with_metadata::{ - EncodeStaticType, EncodeWithMetadata, }; diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index e0c80ba384..b4567e67df 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -13,9 +13,9 @@ use crate::{ StorageAddressError, }, metadata::{ + Metadata, DecodeWithMetadata, EncodeWithMetadata, - Metadata, }, }; use frame_metadata::StorageEntryType; diff --git a/subxt/src/storage/storage_type.rs b/subxt/src/storage/storage_type.rs index f5c5e20c5c..a29f845dac 100644 --- a/subxt/src/storage/storage_type.rs +++ b/subxt/src/storage/storage_type.rs @@ -13,8 +13,8 @@ use crate::{ }, error::Error, metadata::{ - DecodeWithMetadata, Metadata, + DecodeWithMetadata, }, rpc::types::{ StorageData, @@ -72,10 +72,10 @@ where Client: OnlineClientT, { /// Fetch the raw encoded value at the address/key given. - pub fn fetch_raw<'a>( + pub fn fetch_raw<'address>( &self, - key: &'a [u8], - ) -> impl Future>, Error>> + 'a { + key: &'address [u8], + ) -> impl Future>, Error>> + 'address { let client = self.client.clone(); let block_hash = self.block_hash; // Ensure that the returned future doesn't have a lifetime tied to api.storage(), @@ -116,14 +116,14 @@ where /// println!("Value: {:?}", value); /// # } /// ``` - pub fn fetch<'a, Address>( + pub fn fetch<'address, Address>( &self, - address: &'a Address, + address: &'address Address, ) -> impl Future< - Output = Result::Target>, Error>, - > + 'a + Output = Result, Error> + > + 'address where - Address: StorageAddress + 'a, + Address: StorageAddress + 'address, { let client = self.clone(); async move { @@ -137,7 +137,7 @@ where let metadata = client.client.metadata(); let lookup_bytes = super::utils::storage_address_bytes(address, &metadata)?; if let Some(data) = client.fetch_raw(&lookup_bytes).await? { - let val = ::decode_storage_with_metadata( + let val = decode_storage_with_metadata::( &mut &*data, address.pallet_name(), address.entry_name(), @@ -151,13 +151,13 @@ where } /// Fetch a StorageKey that has a default value with an optional block hash. - pub fn fetch_or_default<'a, Address>( + pub fn fetch_or_default<'address, Address>( &self, - address: &'a Address, - ) -> impl Future::Target, Error>> - + 'a + address: &'address Address, + ) -> impl Future> + + 'address where - Address: StorageAddress + 'a, + Address: StorageAddress + 'address, { let client = self.clone(); async move { @@ -176,7 +176,7 @@ where return_type_from_storage_entry_type(&storage_metadata.ty); let bytes = &mut &storage_metadata.default[..]; - let val = ::decode_with_metadata( + let val = Address::Target::decode_with_metadata( bytes, return_ty_id, &metadata, @@ -189,12 +189,12 @@ where /// Fetch up to `count` keys for a storage map in lexicographic order. /// /// Supports pagination by passing a value to `start_key`. - pub fn fetch_keys<'a>( + pub fn fetch_keys<'address>( &self, - key: &'a [u8], + key: &'address [u8], count: u32, - start_key: Option<&'a [u8]>, - ) -> impl Future, Error>> + 'a { + start_key: Option<&'address [u8]>, + ) -> impl Future, Error>> + 'address { let client = self.client.clone(); let block_hash = self.block_hash; async move { @@ -305,7 +305,7 @@ where /// Returns the next key value pair from a map. pub async fn next( &mut self, - ) -> Result, Error> { + ) -> Result, Error> { loop { if let Some((k, v)) = self.buffer.pop() { let val = ReturnTy::decode_with_metadata( @@ -402,3 +402,21 @@ fn return_type_from_storage_entry_type(entry: &StorageEntryType) - StorageEntryType::Map { value, .. } => value.id(), } } + +/// Given some bytes, a pallet and storage name, decode the response. +fn decode_storage_with_metadata( + bytes: &mut &[u8], + pallet_name: &str, + storage_entry: &str, + metadata: &Metadata, +) -> Result { + let ty = &metadata.pallet(pallet_name)?.storage(storage_entry)?.ty; + + let id = match ty { + StorageEntryType::Plain(ty) => ty.id(), + StorageEntryType::Map { value, .. } => value.id(), + }; + + let val = T::decode_with_metadata(bytes, id, metadata)?; + Ok(val) +} \ No newline at end of file diff --git a/subxt/src/utils/wrapper_opaque.rs b/subxt/src/utils/wrapper_opaque.rs index 2edb337d9d..44ef5842ca 100644 --- a/subxt/src/utils/wrapper_opaque.rs +++ b/subxt/src/utils/wrapper_opaque.rs @@ -125,7 +125,7 @@ impl Visitor for WrapperKeepOpaqueVisitor { fn visit_composite<'scale, 'info>( self, value: &mut scale_decode::visitor::types::Composite<'scale, 'info>, - type_id: scale_decode::visitor::TypeId, + _type_id: scale_decode::visitor::TypeId, ) -> Result, Self::Error> { use scale_decode::error::{ Error, @@ -139,7 +139,6 @@ impl Visitor for WrapperKeepOpaqueVisitor { } if value.remaining() != 2 { return Err(Error::new(ErrorKind::WrongLength { - actual: type_id.0, actual_len: value.remaining(), expected_len: 2, })) diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 303a346189..21ef19b5e3 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -2,60 +2,65 @@ #[allow(clippy::all)] pub mod api { use super::api as root_mod; - pub static PALLETS: [&str; 53usize] = [ + pub static PALLETS: [&str; 58usize] = [ "System", - "Scheduler", - "Preimage", + "Utility", "Babe", "Timestamp", + "Authorship", "Indices", "Balances", "TransactionPayment", - "Authorship", + "AssetTxPayment", + "ElectionProviderMultiPhase", "Staking", - "Offences", - "Historical", "Session", - "Grandpa", - "ImOnline", - "AuthorityDiscovery", "Democracy", "Council", "TechnicalCommittee", - "PhragmenElection", + "Elections", "TechnicalMembership", + "Grandpa", "Treasury", - "Claims", - "Vesting", - "Utility", + "Contracts", + "Sudo", + "ImOnline", + "AuthorityDiscovery", + "Offences", + "Historical", + "RandomnessCollectiveFlip", "Identity", + "Society", + "Recovery", + "Vesting", + "Scheduler", + "Preimage", "Proxy", "Multisig", "Bounties", - "ChildBounties", "Tips", - "ElectionProviderMultiPhase", + "Assets", + "Mmr", + "Lottery", + "Nis", + "Uniques", + "Nfts", + "TransactionStorage", "VoterList", + "StateTrieMigration", + "ChildBounties", + "Referenda", + "Remark", + "RootTesting", + "ConvictionVoting", + "Whitelist", + "AllianceMotion", + "Alliance", "NominationPools", + "RankedPolls", + "RankedCollective", "FastUnstake", - "ParachainsOrigin", - "Configuration", - "ParasShared", - "ParaInclusion", - "ParaInherent", - "ParaScheduler", - "Paras", - "Initializer", - "Dmp", - "Ump", - "Hrmp", - "ParaSessionInfo", - "ParasDisputes", - "Registrar", - "Slots", - "Auctions", - "Crowdloan", - "XcmPallet", + "MessageQueue", ]; #[derive( :: subxt :: ext :: codec :: Decode, @@ -70,83 +75,103 @@ pub mod api { #[codec(index = 0)] System(system::Event), #[codec(index = 1)] - Scheduler(scheduler::Event), - #[codec(index = 10)] - Preimage(preimage::Event), - #[codec(index = 4)] - Indices(indices::Event), + Utility(utility::Event), #[codec(index = 5)] + Indices(indices::Event), + #[codec(index = 6)] Balances(balances::Event), - #[codec(index = 32)] - TransactionPayment(transaction_payment::Event), #[codec(index = 7)] - Staking(staking::Event), + TransactionPayment(transaction_payment::Event), #[codec(index = 8)] - Offences(offences::Event), + AssetTxPayment(asset_tx_payment::Event), #[codec(index = 9)] - Session(session::Event), + ElectionProviderMultiPhase(election_provider_multi_phase::Event), + #[codec(index = 10)] + Staking(staking::Event), #[codec(index = 11)] - Grandpa(grandpa::Event), + Session(session::Event), #[codec(index = 12)] - ImOnline(im_online::Event), - #[codec(index = 14)] Democracy(democracy::Event), - #[codec(index = 15)] + #[codec(index = 13)] Council(council::Event), - #[codec(index = 16)] + #[codec(index = 14)] TechnicalCommittee(technical_committee::Event), + #[codec(index = 15)] + Elections(elections::Event), + #[codec(index = 16)] + TechnicalMembership(technical_membership::Event), #[codec(index = 17)] - PhragmenElection(phragmen_election::Event), + Grandpa(grandpa::Event), #[codec(index = 18)] - TechnicalMembership(technical_membership::Event), - #[codec(index = 19)] Treasury(treasury::Event), - #[codec(index = 24)] - Claims(claims::Event), - #[codec(index = 25)] - Vesting(vesting::Event), + #[codec(index = 19)] + Contracts(contracts::Event), + #[codec(index = 20)] + Sudo(sudo::Event), + #[codec(index = 21)] + ImOnline(im_online::Event), + #[codec(index = 23)] + Offences(offences::Event), #[codec(index = 26)] - Utility(utility::Event), - #[codec(index = 28)] Identity(identity::Event), + #[codec(index = 27)] + Society(society::Event), + #[codec(index = 28)] + Recovery(recovery::Event), #[codec(index = 29)] - Proxy(proxy::Event), + Vesting(vesting::Event), #[codec(index = 30)] + Scheduler(scheduler::Event), + #[codec(index = 31)] + Preimage(preimage::Event), + #[codec(index = 32)] + Proxy(proxy::Event), + #[codec(index = 33)] Multisig(multisig::Event), #[codec(index = 34)] Bounties(bounties::Event), - #[codec(index = 38)] - ChildBounties(child_bounties::Event), #[codec(index = 35)] Tips(tips::Event), #[codec(index = 36)] - ElectionProviderMultiPhase(election_provider_multi_phase::Event), - #[codec(index = 37)] - VoterList(voter_list::Event), + Assets(assets::Event), + #[codec(index = 38)] + Lottery(lottery::Event), #[codec(index = 39)] - NominationPools(nomination_pools::Event), + Nis(nis::Event), #[codec(index = 40)] - FastUnstake(fast_unstake::Event), + Uniques(uniques::Event), + #[codec(index = 41)] + Nfts(nfts::Event), + #[codec(index = 42)] + TransactionStorage(transaction_storage::Event), + #[codec(index = 43)] + VoterList(voter_list::Event), + #[codec(index = 44)] + StateTrieMigration(state_trie_migration::Event), + #[codec(index = 45)] + ChildBounties(child_bounties::Event), + #[codec(index = 46)] + Referenda(referenda::Event), + #[codec(index = 47)] + Remark(remark::Event), + #[codec(index = 49)] + ConvictionVoting(conviction_voting::Event), + #[codec(index = 50)] + Whitelist(whitelist::Event), + #[codec(index = 51)] + AllianceMotion(alliance_motion::Event), + #[codec(index = 52)] + Alliance(alliance::Event), #[codec(index = 53)] - ParaInclusion(para_inclusion::Event), + NominationPools(nomination_pools::Event), + #[codec(index = 54)] + RankedPolls(ranked_polls::Event), + #[codec(index = 55)] + RankedCollective(ranked_collective::Event), #[codec(index = 56)] - Paras(paras::Event), - #[codec(index = 59)] - Ump(ump::Event), - #[codec(index = 60)] - Hrmp(hrmp::Event), - #[codec(index = 62)] - ParasDisputes(paras_disputes::Event), - #[codec(index = 70)] - Registrar(registrar::Event), - #[codec(index = 71)] - Slots(slots::Event), - #[codec(index = 72)] - Auctions(auctions::Event), - #[codec(index = 73)] - Crowdloan(crowdloan::Event), - #[codec(index = 99)] - XcmPallet(xcm_pallet::Event), + FastUnstake(fast_unstake::Event), + #[codec(index = 57)] + MessageQueue(message_queue::Event), } pub mod system { use super::root_mod; @@ -165,18 +190,6 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FillBlock { - pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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>, } @@ -271,23 +284,6 @@ pub mod api { } pub struct TransactionApi; impl TransactionApi { - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - pub fn fill_block( - &self, - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "System", - "fill_block", - FillBlock { ratio }, - [ - 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, - 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, - 191u8, 145u8, 130u8, 245u8, 177u8, 201u8, 169u8, 129u8, - 173u8, 105u8, 88u8, 45u8, 136u8, 191u8, - ], - ) - } #[doc = "Make some on-chain remark."] #[doc = ""] #[doc = "# "] @@ -572,12 +568,10 @@ pub mod api { &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, - >, + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, @@ -603,12 +597,10 @@ pub mod api { 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, - >, + runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::AccountData< + ::core::primitive::u128, >, >, (), @@ -631,7 +623,7 @@ pub mod api { pub fn extrinsic_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), (), @@ -652,10 +644,8 @@ pub mod api { 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, - >, + runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::sp_weights::weight_v2::Weight, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -677,7 +667,7 @@ pub mod api { pub fn all_extrinsics_len( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), (), @@ -699,7 +689,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, + ::subxt::utils::H256, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -723,7 +713,7 @@ pub mod api { pub fn block_hash_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, + ::subxt::utils::H256, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -745,9 +735,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u8>, - >, + ::std::vec::Vec<::core::primitive::u8>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -771,9 +759,7 @@ pub mod api { pub fn extrinsic_data_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u8>, - >, + ::std::vec::Vec<::core::primitive::u8>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -794,7 +780,7 @@ pub mod api { pub fn number( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -815,7 +801,7 @@ pub mod api { pub fn parent_hash( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, + ::subxt::utils::H256, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -836,9 +822,7 @@ pub mod api { pub fn digest( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_runtime::generic::digest::Digest, - >, + runtime_types::sp_runtime::generic::digest::Digest, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -865,12 +849,10 @@ pub mod api { pub fn events( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::frame_system::EventRecord< - runtime_types::polkadot_runtime::RuntimeEvent, - ::subxt::utils::H256, - >, + ::std::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::kitchensink_runtime::RuntimeEvent, + ::subxt::utils::H256, >, >, ::subxt::storage::address::Yes, @@ -882,10 +864,10 @@ pub mod api { "Events", vec![], [ - 230u8, 215u8, 9u8, 223u8, 139u8, 55u8, 22u8, 144u8, 226u8, - 245u8, 166u8, 235u8, 8u8, 182u8, 131u8, 51u8, 41u8, 148u8, - 102u8, 40u8, 86u8, 230u8, 82u8, 41u8, 226u8, 151u8, 247u8, - 41u8, 186u8, 190u8, 85u8, 20u8, + 134u8, 132u8, 50u8, 86u8, 182u8, 182u8, 18u8, 241u8, 61u8, + 219u8, 108u8, 254u8, 9u8, 218u8, 225u8, 121u8, 207u8, 72u8, + 165u8, 249u8, 159u8, 100u8, 9u8, 172u8, 211u8, 246u8, 146u8, + 248u8, 168u8, 246u8, 226u8, 137u8, ], ) } @@ -893,7 +875,7 @@ pub mod api { pub fn event_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -924,9 +906,7 @@ pub mod api { &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)>, - >, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -959,9 +939,7 @@ pub mod api { pub fn event_topics_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, - >, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -982,9 +960,7 @@ pub mod api { pub fn last_runtime_upgrade( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::LastRuntimeUpgradeInfo, - >, + runtime_types::frame_system::LastRuntimeUpgradeInfo, ::subxt::storage::address::Yes, (), (), @@ -1005,7 +981,7 @@ pub mod api { pub fn upgraded_to_u32_ref_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -1027,7 +1003,7 @@ pub mod api { pub fn upgraded_to_triple_ref_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -1048,9 +1024,7 @@ pub mod api { pub fn execution_phase( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::Phase, - >, + runtime_types::frame_system::Phase, ::subxt::storage::address::Yes, (), (), @@ -1077,9 +1051,7 @@ pub mod api { pub fn block_weights( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockWeights, - >, + runtime_types::frame_system::limits::BlockWeights, > { ::subxt::constants::StaticConstantAddress::new( "System", @@ -1096,9 +1068,7 @@ pub mod api { pub fn block_length( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_system::limits::BlockLength, - >, + runtime_types::frame_system::limits::BlockLength, > { ::subxt::constants::StaticConstantAddress::new( "System", @@ -1114,9 +1084,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "System", "BlockHashCount", @@ -1132,9 +1101,7 @@ pub mod api { pub fn db_weight( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::RuntimeDbWeight, - >, + runtime_types::sp_weights::RuntimeDbWeight, > { ::subxt::constants::StaticConstantAddress::new( "System", @@ -1151,9 +1118,7 @@ pub mod api { pub fn version( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_version::RuntimeVersion, - >, + runtime_types::sp_version::RuntimeVersion, > { ::subxt::constants::StaticConstantAddress::new( "System", @@ -1173,9 +1138,8 @@ pub mod api { #[doc = " an identifier of the chain."] pub fn ss58_prefix( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u16> + { ::subxt::constants::StaticConstantAddress::new( "System", "SS58Prefix", @@ -1190,7 +1154,7 @@ pub mod api { } } } - pub mod scheduler { + pub mod utility { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -1207,14 +1171,9 @@ pub mod api { )] #[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, + pub struct Batch { + pub calls: + ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1225,9 +1184,10 @@ pub mod api { )] #[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, + pub struct AsDerivative { + pub index: ::core::primitive::u16, + pub call: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1238,15 +1198,9 @@ pub mod api { )] #[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, + pub struct BatchAll { + pub calls: + ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1257,8 +1211,11 @@ pub mod api { )] #[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], + pub struct DispatchAs { + pub as_origin: + ::std::boxed::Box, + pub call: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1269,14 +1226,9 @@ pub mod api { )] #[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, + pub struct ForceBatch { + pub calls: + ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1287,181 +1239,207 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamedAfter { - pub id: [::core::primitive::u8; 32usize], - pub after: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - pub priority: ::core::primitive::u8, - pub call: ::std::boxed::Box, + pub struct WithWeight { + pub call: + ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Anonymously schedule a task."] - pub fn schedule( - &self, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule", - Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, - [ - 110u8, 118u8, 202u8, 51u8, 211u8, 53u8, 194u8, 114u8, 80u8, - 166u8, 134u8, 18u8, 89u8, 144u8, 204u8, 155u8, 201u8, 237u8, - 138u8, 170u8, 86u8, 16u8, 7u8, 2u8, 12u8, 96u8, 17u8, 148u8, - 147u8, 144u8, 196u8, 4u8, - ], - ) - } - #[doc = "Cancel an anonymously scheduled task."] - pub fn cancel( + #[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, - when: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + calls: ::std::vec::Vec< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "cancel", - Cancel { when, index }, + "Utility", + "batch", + Batch { calls }, [ - 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, + 62u8, 136u8, 113u8, 235u8, 148u8, 170u8, 205u8, 39u8, 83u8, + 193u8, 255u8, 141u8, 246u8, 154u8, 62u8, 1u8, 130u8, 30u8, + 240u8, 252u8, 5u8, 189u8, 162u8, 35u8, 77u8, 117u8, 234u8, + 39u8, 85u8, 162u8, 15u8, 78u8, ], ) } - #[doc = "Schedule a named task."] - pub fn schedule_named( + #[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, - id: [::core::primitive::u8; 32usize], - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + index: ::core::primitive::u16, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_named", - ScheduleNamed { - id, - when, - maybe_periodic, - priority, + "Utility", + "as_derivative", + AsDerivative { + index, call: ::std::boxed::Box::new(call), }, [ - 84u8, 106u8, 212u8, 23u8, 117u8, 33u8, 204u8, 44u8, 79u8, - 178u8, 21u8, 241u8, 151u8, 179u8, 201u8, 1u8, 48u8, 13u8, - 125u8, 176u8, 166u8, 49u8, 118u8, 174u8, 1u8, 187u8, 45u8, - 75u8, 204u8, 219u8, 229u8, 24u8, + 211u8, 250u8, 152u8, 77u8, 181u8, 199u8, 247u8, 99u8, 23u8, + 108u8, 191u8, 169u8, 114u8, 21u8, 21u8, 223u8, 28u8, 26u8, + 143u8, 125u8, 2u8, 156u8, 204u8, 84u8, 175u8, 199u8, 58u8, + 92u8, 62u8, 10u8, 51u8, 209u8, ], ) } - #[doc = "Cancel a named scheduled task."] - pub fn cancel_named( + #[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, - id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { + calls: ::std::vec::Vec< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "cancel_named", - CancelNamed { id }, + "Utility", + "batch_all", + BatchAll { calls }, [ - 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, + 68u8, 38u8, 31u8, 206u8, 216u8, 184u8, 101u8, 154u8, 252u8, + 86u8, 87u8, 144u8, 84u8, 54u8, 148u8, 51u8, 88u8, 155u8, + 225u8, 71u8, 144u8, 139u8, 4u8, 250u8, 110u8, 219u8, 24u8, + 65u8, 145u8, 11u8, 185u8, 209u8, ], ) } - #[doc = "Anonymously schedule a task after a delay."] + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] #[doc = "# "] - #[doc = "Same as [`schedule`]."] + #[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 schedule_after( + pub fn dispatch_as( &self, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + as_origin: runtime_types::kitchensink_runtime::OriginCaller, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_after", - ScheduleAfter { - after, - maybe_periodic, - priority, + "Utility", + "dispatch_as", + DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), call: ::std::boxed::Box::new(call), }, [ - 176u8, 3u8, 143u8, 176u8, 250u8, 9u8, 0u8, 75u8, 62u8, 93u8, - 220u8, 19u8, 98u8, 136u8, 178u8, 98u8, 187u8, 57u8, 228u8, - 147u8, 133u8, 88u8, 146u8, 58u8, 113u8, 166u8, 41u8, 25u8, - 163u8, 95u8, 6u8, 47u8, + 54u8, 74u8, 229u8, 187u8, 235u8, 51u8, 114u8, 41u8, 227u8, + 155u8, 105u8, 171u8, 185u8, 177u8, 164u8, 144u8, 81u8, 50u8, + 105u8, 194u8, 205u8, 127u8, 105u8, 62u8, 194u8, 7u8, 198u8, + 122u8, 187u8, 231u8, 178u8, 9u8, ], ) } - #[doc = "Schedule a named task after a delay."] + #[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 = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] #[doc = "# "] - pub fn schedule_named_after( + pub fn force_batch( &self, - id: [::core::primitive::u8; 32usize], - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + calls: ::std::vec::Vec< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Scheduler", - "schedule_named_after", - ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, + "Utility", + "force_batch", + ForceBatch { calls }, + [ + 182u8, 123u8, 124u8, 127u8, 7u8, 64u8, 14u8, 109u8, 80u8, + 109u8, 239u8, 139u8, 117u8, 155u8, 83u8, 112u8, 86u8, 176u8, + 89u8, 236u8, 63u8, 100u8, 231u8, 162u8, 113u8, 242u8, 248u8, + 229u8, 19u8, 4u8, 104u8, 217u8, + ], + ) + } + #[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::kitchensink_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, }, [ - 195u8, 224u8, 47u8, 168u8, 137u8, 114u8, 75u8, 129u8, 115u8, - 108u8, 190u8, 194u8, 60u8, 179u8, 249u8, 51u8, 110u8, 4u8, - 109u8, 50u8, 68u8, 121u8, 101u8, 41u8, 203u8, 4u8, 18u8, - 182u8, 245u8, 197u8, 244u8, 195u8, + 140u8, 177u8, 172u8, 97u8, 191u8, 107u8, 58u8, 138u8, 167u8, + 177u8, 185u8, 9u8, 86u8, 53u8, 181u8, 21u8, 161u8, 198u8, + 134u8, 90u8, 185u8, 172u8, 132u8, 177u8, 250u8, 162u8, 8u8, + 128u8, 198u8, 37u8, 157u8, 224u8, ], ) } } } - #[doc = "Events type."] - pub type Event = runtime_types::pallet_scheduler::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_utility::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -1473,14 +1451,15 @@ pub mod api { )] #[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, + #[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 Scheduled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Scheduled"; + impl ::subxt::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1491,14 +1470,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Canceled some task."] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Canceled"; + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt::events::StaticEvent for BatchCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompleted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1509,16 +1485,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Dispatched some task."] - pub struct Dispatched { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Dispatched { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Dispatched"; + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1529,14 +1500,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The call for the provided hash was not found so the task has been aborted."] - pub struct CallUnavailable { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for CallUnavailable { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallUnavailable"; + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt::events::StaticEvent for ItemCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemCompleted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1547,14 +1515,13 @@ pub mod api { )] #[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]>, + #[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 PeriodicFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PeriodicFailed"; + impl ::subxt::events::StaticEvent for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1565,161 +1532,28 @@ pub mod api { )] #[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]>, + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for PermanentlyOverweight { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PermanentlyOverweight"; + impl ::subxt::events::StaticEvent for DispatchedAs { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "DispatchedAs"; } } - pub mod storage { + pub mod constants { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn incomplete_since( + 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::StaticStorageAddress::new( - "Scheduler", - "IncompleteSince", - vec![], - [ - 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, - 56u8, 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, - 153u8, 31u8, 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, - 73u8, 222u8, 168u8, 193u8, 227u8, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, - 185u8, 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, - 254u8, 2u8, 66u8, 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, - 88u8, 172u8, 127u8, 143u8, - ], - ) - } - #[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 :: 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 :: polkadot_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: polkadot_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", - Vec::new(), - [ - 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, - 185u8, 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, - 254u8, 2u8, 66u8, 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, - 88u8, 172u8, 127u8, 143u8, - ], - ) - } - #[doc = " Lookup from a name to the block number and index of the task."] - #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[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<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", - Vec::new(), - [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, - 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, - 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, - 211u8, 158u8, 250u8, 103u8, 243u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] - pub fn maximum_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::weight_v2::Weight, - >, - > { - ::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, - ], - ) - } - #[doc = " The maximum number of scheduled calls in the queue for a single block."] - pub fn max_scheduled_per_block( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Scheduler", - "MaxScheduledPerBlock", + ) -> ::subxt::constants::StaticConstantAddress<::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, @@ -1731,319 +1565,6 @@ pub mod api { } } } - pub mod preimage { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotePreimage { - pub bytes: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnnotePreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnrequestPreimage { - pub hash: ::subxt::utils::H256, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register a preimage on-chain."] - #[doc = ""] - #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] - #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] - pub fn note_preimage( - &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::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, - ], - ) - } - #[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::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "unnote_preimage", - UnnotePreimage { hash }, - [ - 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, - 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, - 147u8, 116u8, 27u8, 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, - 8u8, 19u8, 242u8, 207u8, 17u8, - ], - ) - } - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] - #[doc = ""] - #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] - #[doc = "a user may have paid, and take the control of the preimage out of their hands."] - pub fn request_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "request_preimage", - RequestPreimage { hash }, - [ - 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, - 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, - 170u8, 169u8, 127u8, 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, - 228u8, 141u8, 83u8, 162u8, 233u8, - ], - ) - } - #[doc = "Clear a previously made request for a preimage."] - #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub fn unrequest_preimage( - &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Preimage", - "unrequest_preimage", - UnrequestPreimage { hash }, - [ - 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, - 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, - 105u8, 152u8, 69u8, 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, - 130u8, 11u8, 113u8, 187u8, 108u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_preimage::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A preimage has been noted."] - pub struct Noted { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A preimage has been requested."] - pub struct Requested { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A preimage has ben cleared."] - pub struct Cleared { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Cleared { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Cleared"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The request status of a given hash."] - pub fn status_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::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, - ], - ) - } - } - } - } pub mod babe { use super::root_mod; use super::runtime_types; @@ -2196,7 +1717,7 @@ pub mod api { pub fn epoch_index( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::core::primitive::u64, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2217,14 +1738,10 @@ pub mod api { 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, - ), - >, - >, + 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, (), @@ -2246,9 +1763,7 @@ pub mod api { pub fn genesis_slot( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_slots::Slot, - >, + runtime_types::sp_consensus_slots::Slot, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2269,9 +1784,7 @@ pub mod api { pub fn current_slot( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_slots::Slot, - >, + runtime_types::sp_consensus_slots::Slot, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2301,7 +1814,7 @@ pub mod api { pub fn randomness( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, + [::core::primitive::u8; 32usize], ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2322,9 +1835,7 @@ pub mod api { pub fn pending_epoch_config_change( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - >, + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, ::subxt::storage::address::Yes, (), (), @@ -2345,7 +1856,7 @@ pub mod api { pub fn next_randomness( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>, + [::core::primitive::u8; 32usize], ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2366,14 +1877,10 @@ pub mod api { 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, - ), - >, - >, + 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, (), @@ -2402,7 +1909,7 @@ pub mod api { pub fn segment_index( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2424,10 +1931,8 @@ pub mod api { &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], - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -2452,10 +1957,8 @@ pub mod api { pub fn under_construction_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - [::core::primitive::u8; 32usize], - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], >, (), ::subxt::storage::address::Yes, @@ -2478,10 +1981,8 @@ pub mod api { pub fn initialized( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option< - runtime_types::sp_consensus_babe::digests::PreDigest, - >, + ::core::option::Option< + runtime_types::sp_consensus_babe::digests::PreDigest, >, ::subxt::storage::address::Yes, (), @@ -2506,9 +2007,7 @@ pub mod api { pub fn author_vrf_randomness( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<[::core::primitive::u8; 32usize]>, - >, + ::core::option::Option<[::core::primitive::u8; 32usize]>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2533,10 +2032,7 @@ pub mod api { pub fn epoch_start( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, + (::core::primitive::u32, ::core::primitive::u32), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2561,7 +2057,7 @@ pub mod api { pub fn lateness( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2583,9 +2079,7 @@ pub mod api { pub fn epoch_config( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, ::subxt::storage::address::Yes, (), (), @@ -2607,9 +2101,7 @@ pub mod api { pub fn next_epoch_config( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_consensus_babe::BabeEpochConfiguration, - >, + runtime_types::sp_consensus_babe::BabeEpochConfiguration, ::subxt::storage::address::Yes, (), (), @@ -2637,9 +2129,8 @@ pub mod api { #[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<::core::primitive::u64> + { ::subxt::constants::StaticConstantAddress::new( "Babe", "EpochDuration", @@ -2658,9 +2149,8 @@ pub mod api { #[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<::core::primitive::u64> + { ::subxt::constants::StaticConstantAddress::new( "Babe", "ExpectedBlockTime", @@ -2675,9 +2165,8 @@ pub mod api { #[doc = " Max number of authorities allowed"] pub fn max_authorities( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Babe", "MaxAuthorities", @@ -2757,7 +2246,7 @@ pub mod api { pub fn now( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ::core::primitive::u64, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2778,7 +2267,7 @@ pub mod api { pub fn did_update( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -2807,9 +2296,8 @@ pub mod api { #[doc = " double this period on default settings."] pub fn minimum_period( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> + { ::subxt::constants::StaticConstantAddress::new( "Timestamp", "MinimumPeriod", @@ -2824,7 +2312,7 @@ pub mod api { } } } - pub mod indices { + pub mod authorship { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -2833,7 +2321,6 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -2842,21 +2329,176 @@ pub mod api { )] #[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, + pub struct SetUncles { + pub new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub index: ::core::primitive::u32, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Provide a set of uncles."] + pub fn set_uncles( + &self, + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Authorship", + "set_uncles", + SetUncles { new_uncles }, + [ + 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, + 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, + 90u8, 60u8, 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, + 37u8, 235u8, 119u8, 42u8, 64u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Uncles"] + pub fn uncles( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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::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< + ::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<::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; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Claim { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -2881,7 +2523,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceTransfer { - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub index: ::core::primitive::u32, pub freeze: ::core::primitive::bool, } @@ -2956,7 +2601,10 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, index: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -2964,10 +2612,10 @@ pub mod api { "transfer", Transfer { new, index }, [ - 154u8, 191u8, 183u8, 50u8, 185u8, 69u8, 126u8, 132u8, 12u8, - 77u8, 146u8, 189u8, 254u8, 7u8, 72u8, 191u8, 118u8, 102u8, - 180u8, 2u8, 161u8, 151u8, 68u8, 93u8, 79u8, 45u8, 97u8, - 202u8, 131u8, 103u8, 174u8, 189u8, + 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, ], ) } @@ -3028,7 +2676,10 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, index: ::core::primitive::u32, freeze: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { @@ -3037,10 +2688,10 @@ pub mod api { "force_transfer", ForceTransfer { new, index, freeze }, [ - 37u8, 220u8, 91u8, 118u8, 222u8, 81u8, 225u8, 131u8, 101u8, - 203u8, 60u8, 149u8, 102u8, 92u8, 58u8, 91u8, 227u8, 64u8, - 229u8, 62u8, 201u8, 57u8, 168u8, 11u8, 51u8, 149u8, 146u8, - 156u8, 209u8, 226u8, 11u8, 181u8, + 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, ], ) } @@ -3148,11 +2799,11 @@ pub mod api { &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::Yes, (), ::subxt::storage::address::Yes, @@ -3176,11 +2827,11 @@ pub mod api { pub fn accounts_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( ::subxt::utils::AccountId32, ::core::primitive::u128, ::core::primitive::bool, - )>, + ), (), (), ::subxt::storage::address::Yes, @@ -3206,9 +2857,8 @@ pub mod api { #[doc = " The deposit needed for reserving an index."] pub fn deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Indices", "Deposit", @@ -3241,7 +2891,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -3255,7 +2908,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetBalance { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, #[codec(compact)] pub new_free: ::core::primitive::u128, #[codec(compact)] @@ -3271,8 +2927,14 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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, } @@ -3286,7 +2948,10 @@ pub mod api { #[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, ()>, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -3300,7 +2965,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub keep_alive: ::core::primitive::bool, } #[derive( @@ -3313,7 +2981,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceUnreserve { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub amount: ::core::primitive::u128, } pub struct TransactionApi; @@ -3345,7 +3016,10 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3353,10 +3027,10 @@ pub mod api { "transfer", Transfer { dest, value }, [ - 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, - 155u8, 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, - 218u8, 114u8, 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, - 172u8, 3u8, 20u8, 216u8, 38u8, + 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, ], ) } @@ -3370,7 +3044,10 @@ pub mod api { #[doc = "The dispatch origin for this call is `root`."] pub fn set_balance( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { @@ -3383,10 +3060,10 @@ pub mod api { new_reserved, }, [ - 234u8, 215u8, 97u8, 98u8, 243u8, 199u8, 57u8, 76u8, 59u8, - 161u8, 118u8, 207u8, 34u8, 197u8, 198u8, 61u8, 231u8, 210u8, - 169u8, 235u8, 150u8, 137u8, 173u8, 49u8, 28u8, 77u8, 84u8, - 149u8, 143u8, 210u8, 139u8, 193u8, + 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, ], ) } @@ -3398,8 +3075,14 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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( @@ -3411,10 +3094,10 @@ pub mod api { value, }, [ - 79u8, 174u8, 212u8, 108u8, 184u8, 33u8, 170u8, 29u8, 232u8, - 254u8, 195u8, 218u8, 221u8, 134u8, 57u8, 99u8, 6u8, 70u8, - 181u8, 227u8, 56u8, 239u8, 243u8, 158u8, 157u8, 245u8, 36u8, - 162u8, 11u8, 237u8, 147u8, 15u8, + 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, ], ) } @@ -3426,7 +3109,10 @@ pub mod api { #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, - dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3434,10 +3120,10 @@ pub mod api { "transfer_keep_alive", TransferKeepAlive { dest, value }, [ - 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, - 113u8, 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, - 242u8, 220u8, 202u8, 112u8, 47u8, 79u8, 73u8, 244u8, 226u8, - 59u8, 240u8, 188u8, 210u8, 208u8, + 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, ], ) } @@ -3460,7 +3146,10 @@ pub mod api { #[doc = " #"] pub fn transfer_all( &self, - dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, keep_alive: ::core::primitive::bool, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3468,10 +3157,10 @@ pub mod api { "transfer_all", TransferAll { dest, keep_alive }, [ - 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, - 126u8, 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, - 214u8, 63u8, 67u8, 201u8, 144u8, 45u8, 129u8, 145u8, 174u8, - 71u8, 238u8, 113u8, 208u8, 34u8, + 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, ], ) } @@ -3480,7 +3169,10 @@ pub mod api { #[doc = "Can only be called by ROOT."] pub fn force_unreserve( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, amount: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -3488,10 +3180,10 @@ pub mod api { "force_unreserve", ForceUnreserve { who, amount }, [ - 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, - 76u8, 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, - 32u8, 98u8, 102u8, 106u8, 234u8, 123u8, 6u8, 175u8, 184u8, - 188u8, 174u8, 106u8, 176u8, 78u8, + 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, ], ) } @@ -3697,7 +3389,7 @@ pub mod api { pub fn total_issuance( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -3714,6 +3406,27 @@ pub mod api { ], ) } + #[doc = " The total units of outstanding deactivated balance in the system."] + pub fn inactive_issuance( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Balances", + "InactiveIssuance", + vec![], + [ + 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8, + 12u8, 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8, + 184u8, 250u8, 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8, + 46u8, 204u8, 160u8, 154u8, 21u8, + ], + ) + } #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] #[doc = " # Example"] @@ -3742,11 +3455,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, - >, - >, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -3793,11 +3502,7 @@ pub mod api { pub fn account_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::AccountData< - ::core::primitive::u128, - >, - >, + runtime_types::pallet_balances::AccountData<::core::primitive::u128>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -3820,11 +3525,9 @@ pub mod api { &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, - >, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock< + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, @@ -3851,11 +3554,9 @@ pub mod api { 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, - >, + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::BalanceLock< + ::core::primitive::u128, >, >, (), @@ -3879,12 +3580,10 @@ pub mod api { &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, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, @@ -3910,12 +3609,10 @@ pub mod api { 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, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_balances::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, >, >, (), @@ -3934,31 +3631,6 @@ pub mod api { ], ) } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " This is set to v2.0.0 for new networks."] - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_balances::Releases, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "StorageVersion", - vec![], - [ - 135u8, 96u8, 28u8, 234u8, 124u8, 212u8, 56u8, 140u8, 40u8, - 101u8, 235u8, 128u8, 136u8, 221u8, 182u8, 81u8, 17u8, 9u8, - 184u8, 228u8, 174u8, 165u8, 200u8, 162u8, 214u8, 178u8, - 227u8, 72u8, 34u8, 5u8, 173u8, 96u8, - ], - ) - } } } pub mod constants { @@ -3968,9 +3640,8 @@ pub mod api { #[doc = " The minimum amount required to keep an account open."] pub fn existential_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Balances", "ExistentialDeposit", @@ -3986,9 +3657,8 @@ pub mod api { #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_locks( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Balances", "MaxLocks", @@ -4003,9 +3673,8 @@ pub mod api { #[doc = " The maximum number of named reserves that can exist on an account."] pub fn max_reserves( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Balances", "MaxReserves", @@ -4055,9 +3724,7 @@ pub mod api { pub fn next_fee_multiplier( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::fixed_point::FixedU128, - >, + runtime_types::sp_arithmetic::fixed_point::FixedU128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -4077,9 +3744,7 @@ pub mod api { pub fn storage_version( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_transaction_payment::Releases, - >, + runtime_types::pallet_transaction_payment::Releases, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -4125,9 +3790,8 @@ pub mod api { #[doc = " transactions."] pub fn operational_fee_multiplier( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u8> + { ::subxt::constants::StaticConstantAddress::new( "TransactionPayment", "OperationalFeeMultiplier", @@ -4142,14 +3806,13 @@ pub mod api { } } } - pub mod authorship { + pub mod asset_tx_payment { use super::root_mod; use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_asset_tx_payment::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -4159,144 +3822,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUncles { - pub new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Provide a set of uncles."] - pub fn set_uncles( - &self, - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Authorship", - "set_uncles", - SetUncles { new_uncles }, - [ - 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, - 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, - 90u8, 60u8, 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, - 37u8, 235u8, 119u8, 42u8, 64u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Uncles"] - pub fn uncles( - &self, - ) -> ::subxt::storage::address::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, - ], - ) - } + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who` in an asset `asset_id`."] + pub struct AssetTxFeePaid { + pub who: ::subxt::utils::AccountId32, + pub actual_fee: ::core::primitive::u128, + pub tip: ::core::primitive::u128, + pub asset_id: ::core::option::Option<::core::primitive::u32>, } - } - 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, - ], - ) - } + impl ::subxt::events::StaticEvent for AssetTxFeePaid { + const PALLET: &'static str = "AssetTxPayment"; + const EVENT: &'static str = "AssetTxFeePaid"; } } } - pub mod staking { + pub mod election_provider_multi_phase { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -4313,43 +3853,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bond { - pub controller: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - #[codec(compact)] - pub max_additional: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } + pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -4358,8 +3863,10 @@ pub mod api { )] #[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, + pub struct SetMinimumUntrustedScore { + pub maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4370,8 +3877,13 @@ pub mod api { )] #[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, + 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, @@ -4382,9 +3894,11 @@ pub mod api { )] #[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, ()>, + pub struct Submit { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::kitchensink_runtime::NposSolution16, + >, >, } #[derive( @@ -4396,34 +3910,158 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - >, + pub struct GovernanceFallback { + pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, ()>, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Submit a solution for the unsigned phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = ""] + #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] + #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] + #[doc = "that only active validators can submit this transaction when authoring a block (similar"] + #[doc = "to an inherent)."] + #[doc = ""] + #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] + #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] + #[doc = "putting their authoring reward at risk."] + #[doc = ""] + #[doc = "No deposit or reward is associated with this submission."] + pub fn submit_unsigned( + &self, + raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: 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, + ], + ) + } + #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = ""] + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = ""] + #[doc = "This check can be turned off by setting the value to `None`."] + pub fn set_minimum_untrusted_score( + &self, + maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, + >, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + SetMinimumUntrustedScore { maybe_next_score }, + [ + 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, + 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, + 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, + 76u8, 4u8, 67u8, 81u8, + ], + ) + } + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] + #[doc = ""] + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = ""] + #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub fn set_emergency_election_result( + &self, + supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support< + ::subxt::utils::AccountId32, + >, + )>, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + SetEmergencyElectionResult { supports }, + [ + 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, + 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, + 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8, + 250u8, 151u8, 5u8, 44u8, 133u8, + ], + ) + } + #[doc = "Submit a solution for the signed phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = ""] + #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] + #[doc = ""] + #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] + #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] + pub fn submit( + &self, + raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "submit", + Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), + }, + [ + 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, + 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, + 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, + 225u8, 241u8, 58u8, 193u8, 134u8, + ], + ) + } + #[doc = "Trigger the governance fallback."] + #[doc = ""] + #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] + #[doc = "calling [`Call::set_emergency_election_result`]."] + pub fn governance_fallback( + &self, + maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ElectionProviderMultiPhase", + "governance_fallback", + GovernanceFallback { + maybe_max_voters, + maybe_max_targets, + }, + [ + 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, + 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, + 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8, + 190u8, 53u8, 226u8, 142u8, 182u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = + runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -4433,22 +4071,22 @@ pub mod api { )] #[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, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + impl ::subxt::events::StaticEvent for SolutionStored { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "SolutionStored"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4459,40 +4097,15 @@ pub mod api { )] #[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 = "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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoEras; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEra; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for ElectionFinalized { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFinalized"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4503,9 +4116,13 @@ pub mod api { )] #[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, + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + pub struct ElectionFailed; + impl ::subxt::events::StaticEvent for ElectionFailed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFailed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4516,32 +4133,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEraAlways; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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>, + #[doc = "An account has been rewarded for their signed submission being finalized."] + pub struct Rewarded { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Rewarded { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Rewarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4552,22 +4151,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Rebond { - #[codec(compact)] + #[doc = "An account has been slashed for submitting an invalid signed submission."] + pub struct Slashed { + pub account: ::subxt::utils::AccountId32, pub value: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Slashed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Slashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4578,851 +4169,641 @@ pub mod api { )] #[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, ()>, + #[doc = "There was a phase transition in a given round."] + pub struct PhaseTransitioned { + pub from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, >, + pub to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + pub round: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetStakingConfigs { - pub min_nominator_bond: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub min_validator_bond: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u128, - >, - pub max_nominator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - pub max_validator_count: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - ::core::primitive::u32, - >, - pub chill_threshold: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Percent, - >, - pub min_commission: - runtime_types::pallet_staking::pallet::pallet::ConfigOp< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChillOther { - pub controller: ::subxt::utils::AccountId32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for PhaseTransitioned { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "PhaseTransitioned"; } - 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."] + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Internal counter for the number of rounds."] #[doc = ""] - #[doc = "Emits `Bonded`."] - #[doc = "# "] - #[doc = "- Independent of the arguments. Moderate complexity."] - #[doc = "- O(1)."] - #[doc = "- Three extra DB entries."] + #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] + #[doc = " diagnostics of the pallet."] #[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( + #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] + pub fn round( &self, - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "bond", - Bond { - controller, - value, - payee, - }, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "Round", + vec![], [ - 215u8, 211u8, 69u8, 215u8, 33u8, 158u8, 62u8, 3u8, 31u8, - 216u8, 213u8, 188u8, 151u8, 43u8, 165u8, 154u8, 117u8, 163u8, - 190u8, 227u8, 116u8, 70u8, 155u8, 178u8, 64u8, 174u8, 203u8, - 179u8, 214u8, 187u8, 176u8, 10u8, + 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, + 96u8, 35u8, 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, + 166u8, 188u8, 199u8, 210u8, 21u8, 19u8, 70u8, 96u8, 139u8, + 8u8, 53u8, 82u8, 165u8, 239u8, ], ) } - #[doc = "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 = " Current phase."] + pub fn current_phase( &self, - max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "bond_extra", - BondExtra { max_additional }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "CurrentPhase", + vec![], [ - 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, + 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, + 53u8, 153u8, 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, + 35u8, 28u8, 121u8, 44u8, 229u8, 45u8, 196u8, 87u8, 73u8, + 125u8, 216u8, 245u8, 255u8, 15u8, ], ) } - #[doc = "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. In that case, [`Call::withdraw_unbonded`] need"] - #[doc = "to be called first 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( + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + pub fn queued_solution( &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "unbond", - Unbond { value }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_election_provider_multi_phase::ReadySolution, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "QueuedSolution", + vec![], [ - 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, + 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, + 250u8, 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, + 159u8, 251u8, 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, + 71u8, 136u8, 173u8, 145u8, 236u8, ], ) } - #[doc = "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 = " Snapshot data of the round."] #[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( + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + pub fn snapshot( &self, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "withdraw_unbonded", - WithdrawUnbonded { num_slashing_spans }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "Snapshot", + vec![], [ - 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, + 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, + 224u8, 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, + 36u8, 206u8, 72u8, 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, + 178u8, 26u8, 115u8, 232u8, 71u8, ], ) } - #[doc = "Declare the desire to validate for the origin controller."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = " Desired number of targets to elect for this round."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] - pub fn validate( + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn desired_targets( &self, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "validate", - Validate { prefs }, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "DesiredTargets", + vec![], [ - 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, + 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, + 167u8, 80u8, 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, + 31u8, 210u8, 2u8, 116u8, 220u8, 231u8, 115u8, 112u8, 118u8, + 118u8, 68u8, 34u8, 151u8, 165u8, ], ) } - #[doc = "Declare the desire to nominate `targets` for the origin controller."] + #[doc = " The metadata of the [`RoundSnapshot`]"] #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , :: subxt :: storage :: address :: Yes , () , () >{ + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + vec![], + [ + 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, + 203u8, 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, + 94u8, 22u8, 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, + 251u8, 117u8, 220u8, 205u8, 78u8, + ], + ) + } + #[doc = " The next index to be assigned to an incoming signed submission."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[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 = "# "] - #[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( + #[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, - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "nominate", - Nominate { targets }, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", + vec![], [ - 112u8, 162u8, 70u8, 26u8, 74u8, 7u8, 188u8, 193u8, 210u8, - 247u8, 27u8, 189u8, 133u8, 137u8, 33u8, 155u8, 255u8, 171u8, - 122u8, 68u8, 175u8, 247u8, 139u8, 253u8, 97u8, 187u8, 254u8, - 201u8, 66u8, 166u8, 226u8, 90u8, + 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, + 141u8, 182u8, 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, + 115u8, 8u8, 6u8, 137u8, 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, + 19u8, 129u8, 54u8, 22u8, ], ) } - #[doc = "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 = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] + #[doc = " value in `SignedSubmissions`."] #[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 {}, + #[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, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + vec![], [ - 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, + 228u8, 166u8, 94u8, 248u8, 71u8, 26u8, 125u8, 81u8, 32u8, + 22u8, 46u8, 185u8, 209u8, 123u8, 46u8, 17u8, 152u8, 149u8, + 222u8, 125u8, 112u8, 230u8, 29u8, 177u8, 162u8, 214u8, 66u8, + 38u8, 170u8, 121u8, 129u8, 100u8, ], ) } - #[doc = "(Re-)set the payment target for a controller."] - #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = " Unchecked, signed solutions."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[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 = "# "] - #[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 }, + #[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 :: < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, ], ) } - #[doc = "(Re-)set the controller of a stash."] - #[doc = ""] - #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = " Unchecked, signed solutions."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[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 = "# "] - #[doc = "- Independent of the arguments. Insignificant complexity."] - #[doc = "- Contains a limited number of reads."] - #[doc = "- Writes are limited to the `origin` account key."] - #[doc = "----------"] - #[doc = "Weight: O(1)"] - #[doc = "DB Weight:"] - #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"] - #[doc = "# "] - pub fn set_controller( - &self, - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_controller", - SetController { controller }, + #[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 :: < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + Vec::new(), [ - 165u8, 250u8, 213u8, 32u8, 179u8, 163u8, 15u8, 35u8, 14u8, - 152u8, 56u8, 171u8, 43u8, 101u8, 7u8, 167u8, 178u8, 60u8, - 89u8, 186u8, 59u8, 28u8, 82u8, 159u8, 13u8, 96u8, 168u8, - 123u8, 194u8, 212u8, 205u8, 184u8, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, ], ) } - #[doc = "Sets the ideal number of validators."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] + #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] + #[doc = " feasible."] #[doc = ""] - #[doc = "# "] - #[doc = "Weight: O(1)"] - #[doc = "Write: Validator Count"] - #[doc = "# "] - pub fn set_validator_count( + #[doc = " Can be set via `set_minimum_untrusted_score`."] + pub fn minimum_untrusted_score( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_validator_count", - SetValidatorCount { new }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_npos_elections::ElectionScore, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + vec![], [ - 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, + 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, + 38u8, 74u8, 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, + 217u8, 125u8, 17u8, 194u8, 95u8, 157u8, 73u8, 245u8, 75u8, + 130u8, 248u8, 7u8, 53u8, 226u8, ], ) } - #[doc = "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( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Duration of the unsigned phase."] + pub fn unsigned_phase( &self, - additional: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "increase_validator_count", - IncreaseValidatorCount { additional }, + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "UnsignedPhase", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "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( + #[doc = " Duration of the signed phase."] + pub fn signed_phase( &self, - factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "scale_validator_count", - ScaleValidatorCount { factor }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedPhase", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "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 {}, + #[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::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Perbill, + > { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "BetterSignedThreshold", [ - 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, + 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 = "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 {}, + #[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::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Perbill, + > { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "BetterUnsignedThreshold", [ - 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, + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, ], ) } - #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = " The repeat threshold of the offchain worker."] #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn set_invulnerables( + #[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, - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "set_invulnerables", - SetInvulnerables { invulnerables }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "OffchainRepeat", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "Force a current staker to become completely unstaked, immediately."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn force_unstake( + #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] + pub fn miner_tx_priority( &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, - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MinerTxPriority", [ - 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, + 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 = "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 = " Maximum number of signed submissions that can be queued."] #[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( + #[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::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "force_new_era_always", - ForceNewEraAlways {}, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedMaxSubmissions", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 enactment of a deferred slash."] - #[doc = ""] - #[doc = "Can be called by the `T::SlashCancelOrigin`."] + #[doc = " Maximum weight of a signed solution."] #[doc = ""] - #[doc = "Parameters: era and indices of the slashes for that era to kill."] - pub fn cancel_deferred_slash( + #[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, - 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 }, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedMaxWeight", [ - 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, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, ], ) } - #[doc = "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( + #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] + pub fn signed_max_refunds( &self, - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "payout_stakers", - PayoutStakers { - validator_stash, - era, - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedMaxRefunds", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "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( + #[doc = " Base reward for a signed solution"] + pub fn signed_reward_base( &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "rebond", - Rebond { value }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedRewardBase", [ - 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, + 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 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( + #[doc = " Base deposit for a signed solution."] + pub fn signed_deposit_base( &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, - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedDepositBase", [ - 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, + 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 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( + #[doc = " Per-byte deposit for a signed solution."] + pub fn signed_deposit_byte( &self, - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "kick", - Kick { who }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedDepositByte", [ - 32u8, 26u8, 202u8, 6u8, 186u8, 180u8, 58u8, 121u8, 185u8, - 208u8, 123u8, 10u8, 53u8, 179u8, 167u8, 203u8, 96u8, 229u8, - 7u8, 144u8, 231u8, 172u8, 145u8, 141u8, 162u8, 180u8, 212u8, - 42u8, 34u8, 5u8, 199u8, 82u8, + 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 = "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( + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( &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, - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "SignedDepositWeight", [ - 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, + 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 = "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( + #[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, - controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "chill_other", - ChillOther { controller }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MaxElectingVoters", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "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( + #[doc = " The maximum number of electable targets to put in the snapshot."] + pub fn max_electable_targets( &self, - validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u16> { - ::subxt::tx::StaticTxPayload::new( - "Staking", - "force_apply_min_commission", - ForceApplyMinCommission { validator_stash }, + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MaxElectableTargets", [ - 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, + 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 = "\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; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "EraPaid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] + #[doc = ""] + #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] + pub fn max_winners( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MaxWinners", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + pub fn miner_max_length( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MinerMaxLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + pub fn miner_max_weight( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MinerMaxWeight", + [ + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, + ], + ) + } + pub fn miner_max_votes_per_voter( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } + } + } + } + pub mod staking { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: scale_encode :: EncodeAsType, Debug, )] #[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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Rewarded"; + 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, @@ -5433,14 +4814,22 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] - pub struct Slashed { - pub staker: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + pub struct BondExtra { + #[codec(compact)] + pub max_additional: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Slashed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + #[codec(compact)] + pub value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -5452,14 +4841,20 @@ pub mod api { )] #[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, + pub struct WithdrawUnbonded { + pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "OldSlashingReportDiscarded"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Validate { + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5470,11 +4865,13 @@ pub mod api { )] #[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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakersElected"; + pub struct Nominate { + pub targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5485,17 +4882,35 @@ pub mod api { )] #[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 Chill; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Bonded"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5506,14 +4921,22 @@ pub mod api { )] #[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, + pub struct SetValidatorCount { + #[codec(compact)] + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Unbonded"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IncreaseValidatorCount { + #[codec(compact)] + pub additional: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5524,15 +4947,40 @@ pub mod api { )] #[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, + pub struct ScaleValidatorCount { + pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - impl ::subxt::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Withdrawn"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNoEras; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEra; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetInvulnerables { + pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5543,14 +4991,32 @@ pub mod api { )] #[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 struct ForceUnstake { pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Kicked { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Kicked"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEraAlways; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelDeferredSlash { + pub era: ::core::primitive::u32, + pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5561,11 +5027,9 @@ pub mod api { )] #[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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakingElectionFailed"; + pub struct PayoutStakers { + pub validator_stash: ::subxt::utils::AccountId32, + pub era: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5576,13 +5040,39 @@ pub mod api { )] #[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 struct Rebond { + #[codec(compact)] + pub value: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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::events::StaticEvent for Chilled { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Chilled"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5593,14 +5083,43 @@ pub mod api { )] #[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, + 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::events::StaticEvent for PayoutStarted { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "PayoutStarted"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChillOther { + pub controller: ::subxt::utils::AccountId32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5611,1762 +5130,1852 @@ pub mod api { )] #[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, + pub struct ForceApplyMinCommission { + pub validator_stash: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ValidatorPrefsSet { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "ValidatorPrefsSet"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinCommission { + pub new: runtime_types::sp_arithmetic::per_things::Perbill, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The ideal number of active validators."] - pub fn validator_count( + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "# "] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] + #[doc = "------------------"] + #[doc = "# "] + pub fn bond( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ValidatorCount", - vec![], + "bond", + Bond { + controller, + value, + payee, + }, [ - 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, + 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, ], ) } - #[doc = " Minimum number of staking participants before emergency conditions are imposed."] - pub fn minimum_validator_count( + #[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( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + max_additional: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "MinimumValidatorCount", - vec![], + "bond_extra", + BondExtra { max_additional }, [ - 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, + 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, ], ) } - #[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 = "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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + value: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Invulnerables", - vec![], + "unbond", + Unbond { value }, [ - 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, + 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, ], ) } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] - pub fn bonded( + #[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 = "# "] + pub fn withdraw_unbonded( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Bonded", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "withdraw_unbonded", + WithdrawUnbonded { num_slashing_spans }, [ - 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, + 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, ], ) } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] - pub fn bonded_root( + #[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."] + pub fn validate( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + prefs: runtime_types::pallet_staking::ValidatorPrefs, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Bonded", - Vec::new(), + "validate", + Validate { prefs }, [ - 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, + 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, ], ) } - #[doc = " The minimum active bond to become and maintain the role of a nominator."] - pub fn min_nominator_bond( + #[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 = "# "] + pub fn nominate( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "MinNominatorBond", - vec![], + "nominate", + Nominate { targets }, [ - 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, + 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, ], ) } - #[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( + #[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 = "# "] + pub fn chill(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "MinValidatorBond", - vec![], + "chill", + Chill {}, [ - 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, + 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 = " The minimum amount of commission that validators can set."] + #[doc = "(Re-)set the payment target for a controller."] #[doc = ""] - #[doc = " If set to `0`, no limit exists."] - pub fn min_commission( + #[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 = "# "] + pub fn set_payee( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "MinCommission", - vec![], + "set_payee", + SetPayee { payee }, [ - 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, + 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 = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger( + #[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( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::StakingLedger, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Ledger", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], + "set_controller", + SetController { controller }, [ - 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, + 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 = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger_root( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::StakingLedger, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + new: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Ledger", - Vec::new(), + "set_validator_count", + SetValidatorCount { 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, + 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 = " Where the reward payment should be made. Keyed by stash."] - pub fn payee( + #[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, - _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::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + additional: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Payee", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "increase_validator_count", + IncreaseValidatorCount { additional }, [ - 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, + 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 = " Where the reward payment should be made. Keyed by stash."] - pub fn payee_root( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + factor: runtime_types::sp_arithmetic::per_things::Percent, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Payee", - Vec::new(), + "scale_validator_count", + ScaleValidatorCount { factor }, [ - 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, + 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 = " The map from (wannabe) validator stash key to the preferences of that validator."] - pub fn validators( - &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( + #[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", - "Validators", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "force_no_eras", + ForceNoEras {}, [ - 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, + 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 = " The map from (wannabe) validator stash key to the preferences of that validator."] - 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( + #[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", - "Validators", - Vec::new(), + "force_new_era", + ForceNewEra {}, [ - 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, + 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 = "Counter for the related counted storage map"] - pub fn counter_for_validators( + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub fn set_invulnerables( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "CounterForValidators", - vec![], + "set_invulnerables", + SetInvulnerables { invulnerables }, [ - 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, + 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 = " The maximum validator count before we stop allowing new validators to join."] + #[doc = "Force a current staker to become completely unstaked, immediately."] #[doc = ""] - #[doc = " When this value is not set, no limits are enforced."] - pub fn max_validators_count( + #[doc = "The dispatch origin must be Root."] + pub fn force_unstake( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "MaxValidatorsCount", - vec![], + "force_unstake", + ForceUnstake { + stash, + num_slashing_spans, + }, [ - 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, + 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 = " The map from nominator stash key to their nomination preferences, namely the validators that"] - #[doc = " they wish to support."] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] #[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 must be Root."] #[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 = "# Warning"] #[doc = ""] - #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] - #[doc = " [`Call::chill_other`] dispatchable by anyone."] - pub fn nominators( + #[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, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Nominations, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "Nominators", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "force_new_era_always", + ForceNewEraAlways {}, [ - 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, + 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 = " 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 = "Cancel enactment of a deferred slash."] #[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 = "Can be called by the `T::AdminOrigin`."] #[doc = ""] - #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] - #[doc = " [`Call::chill_other`] dispatchable by anyone."] - pub fn nominators_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Nominations, - >, - (), - (), - ::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 = "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( + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "CounterForNominators", - vec![], + "cancel_deferred_slash", + CancelDeferredSlash { era, slash_indices }, [ - 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, + 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, ], ) } - #[doc = " The maximum nominator count before we stop allowing new validators to join."] + #[doc = "Pay out all the stakers behind a single validator for a single era."] #[doc = ""] - #[doc = " When this value is not set, no limits are enforced."] - pub fn max_nominators_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "MaxNominatorsCount", - vec![], - [ - 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, - ], - ) - } - #[doc = " The current era index."] + #[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 = " 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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CurrentEra", - vec![], - [ - 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, - ], - ) - } - #[doc = " The active era information, it holds index and start."] + #[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 = " 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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::ActiveEraInfo, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ActiveEra", - vec![], - [ - 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, - ], - ) - } - #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] + #[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: 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 = " 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, - _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( + validator_stash: ::subxt::utils::AccountId32, + era: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ErasStartSessionIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "payout_stakers", + PayoutStakers { + validator_stash, + era, + }, [ - 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, + 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 = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] #[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 = "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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + value: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ErasStartSessionIndex", - Vec::new(), + "rebond", + Rebond { value }, [ - 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, + 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 = " Exposure of validator at era."] + #[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 = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[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 = " 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 = "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, - _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::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::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, - ), - ], + "reap_stash", + ReapStash { + stash, + num_slashing_spans, + }, [ - 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, + 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 = " Exposure of validator at era."] + #[doc = "Remove the given nominations from the calling validator."] #[doc = ""] - #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = "Effects will be felt at the beginning of the next era."] #[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 = "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< - runtime_types::pallet_staking::Exposure< + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u128, + ::core::primitive::u32, >, >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ErasStakers", - Vec::new(), + "kick", + Kick { who }, [ - 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, + 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 = " Clipped Exposure of validator at era."] + #[doc = "Update the various staking configurations ."] #[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 = "* `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 = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = "RuntimeOrigin must be Root to call this function."] #[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 = "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<::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::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + 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", - "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, - ), - ], + "set_staking_configs", + SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, + }, [ - 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, + 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 = " Clipped Exposure of validator at era."] + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] #[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 = "Effects will be felt at the beginning of the next era."] #[doc = ""] - #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] #[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 = "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::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + controller: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ErasStakersClipped", - Vec::new(), + "chill_other", + ChillOther { controller }, [ - 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, + 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 = " 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( + #[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<::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::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + validator_stash: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::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, - ), - ], + "force_apply_min_commission", + ForceApplyMinCommission { validator_stash }, [ - 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, + 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 = " 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 = "Sets the minimum amount of commission that each validators must maintain."] #[doc = ""] - #[doc = " Is it removed after `HISTORY_DEPTH` eras."] - pub fn eras_validator_prefs_root( + #[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< - runtime_types::pallet_staking::ValidatorPrefs, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + new: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( "Staking", - "ErasValidatorPrefs", - Vec::new(), + "set_min_commission", + SetMinCommission { new }, [ - 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, + 62u8, 139u8, 175u8, 245u8, 212u8, 113u8, 117u8, 130u8, 191u8, + 173u8, 78u8, 97u8, 19u8, 104u8, 185u8, 207u8, 201u8, 14u8, + 200u8, 208u8, 184u8, 195u8, 242u8, 175u8, 158u8, 156u8, 51u8, + 58u8, 118u8, 154u8, 68u8, 221u8, ], ) } - #[doc = " 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<::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_staking::pallet::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "EraPaid"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Rewarded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + pub struct SlashReported { + pub validator: ::subxt::utils::AccountId32, + pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, + pub slash_era: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SlashReported { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "SlashReported"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "OldSlashingReportDiscarded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new set of stakers was elected."] + pub struct StakersElected; + impl ::subxt::events::StaticEvent for StakersElected { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakersElected"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has 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, + } + impl ::subxt::events::StaticEvent for Bonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Bonded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has unbonded this amount."] + pub struct Unbonded { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unbonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Kicked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The election failed. No new era is planned."] + pub struct StakingElectionFailed; + impl ::subxt::events::StaticEvent for StakingElectionFailed { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakingElectionFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has stopped participating as either a validator or nominator."] + pub struct Chilled { + pub stash: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Chilled { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Chilled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "PayoutStarted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A 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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ValidatorPrefsSet"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new force era mode was set."] + pub struct ForceEra { + pub mode: runtime_types::pallet_staking::Forcing, + } + impl ::subxt::events::StaticEvent for ForceEra { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ForceEra"; + } + } + pub mod storage { + use super::runtime_types; + 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::u128>, + ::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, - )], + "ValidatorCount", + 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, + 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 = " 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( + #[doc = " Minimum number of staking participants before emergency conditions are imposed."] + pub fn minimum_validator_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - (), + ::core::primitive::u32, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ErasValidatorReward", - Vec::new(), + "MinimumValidatorCount", + 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, + 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, ], ) } - #[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 = " 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, - _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::Yes, + ::std::vec::Vec<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ErasRewardPoints", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "Invulnerables", + vec![], [ - 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, + 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, ], ) } - #[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 = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::utils::AccountId32, - >, - >, - (), + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ErasRewardPoints", - Vec::new(), + "Bonded", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + 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, ], ) } - #[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 = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded_root( &self, - _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::utils::AccountId32, + (), + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ErasTotalStake", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "Bonded", + Vec::new(), [ - 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, + 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, ], ) } - #[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( + #[doc = " The minimum active bond to become and maintain the role of a nominator."] + pub fn min_nominator_bond( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ErasTotalStake", - Vec::new(), + "MinNominatorBond", + 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, + 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 = " Mode of era forcing."] - pub fn force_era( + #[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< - runtime_types::pallet_staking::Forcing, - >, + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ForceEra", + "MinValidatorBond", vec![], [ - 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, + 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 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 active nominator stake of the last successful election."] + pub fn minimum_active_stake( &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::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "SlashRewardFraction", + "MinimumActiveStake", vec![], [ - 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, + 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 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 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<::core::primitive::u128>, + runtime_types::sp_arithmetic::per_things::Perbill, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "CanceledSlashPayout", + "MinCommission", vec![], [ - 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, + 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 = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes( + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::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, + runtime_types::pallet_staking::StakingLedger, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "UnappliedSlashes", + "Ledger", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 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, + 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, ], ) } - #[doc = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes_root( + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - >, + runtime_types::pallet_staking::StakingLedger, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "UnappliedSlashes", + "Ledger", Vec::new(), [ - 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, + 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, ], ) } - #[doc = " A mapping from still-bonded eras to the first session index of that era."] + #[doc = " Where the reward payment should be made. Keyed by stash."] #[doc = ""] - #[doc = " Must contains information for eras for the range:"] - #[doc = " `[active_era - bounding_duration; active_era]`"] - pub fn bonded_eras( + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn payee( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "BondedEras", - vec![], - [ - 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, - ], - ) - } - #[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, - _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, - ), - ], + "Payee", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 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, ], ) } - #[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 = " 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<( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - )>, - (), + runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ValidatorSlashInEra", + "Payee", Vec::new(), [ - 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, + 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, ], ) } - #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era( + #[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<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + runtime_types::pallet_staking::ValidatorPrefs, + ::subxt::storage::address::Yes, ::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, - ), - ], + "Validators", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 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 = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era_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<::core::primitive::u128>, - (), + runtime_types::pallet_staking::ValidatorPrefs, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "NominatorSlashInEra", + "Validators", Vec::new(), [ - 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, + 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 = " Slashing spans for stash accounts."] - pub fn slashing_spans( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_validators( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SlashingSpans, - >, + ::core::primitive::u32, ::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, - )], + "CounterForValidators", + vec![], [ - 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, + 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, ], ) } - #[doc = " Slashing spans for stash accounts."] - pub fn slashing_spans_root( + #[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< - runtime_types::pallet_staking::slashing::SlashingSpans, - >, + ::core::primitive::u32, + ::subxt::storage::address::Yes, (), (), - ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "SlashingSpans", - Vec::new(), + "MaxValidatorsCount", + vec![], [ - 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, + 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, ], ) } - #[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 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, _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, + runtime_types::pallet_staking::Nominations, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "SpanSlash", + "Nominators", vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), + _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 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, + 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 = " 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 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_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - >, + runtime_types::pallet_staking::Nominations, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "SpanSlash", + "Nominators", Vec::new(), [ - 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, + 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 = " 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( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_nominators( &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( "Staking", - "CurrentPlannedSession", + "CounterForNominators", vec![], [ - 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, + 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, ], ) } - #[doc = " Indices of validators that have offended in the active era and whether they are currently"] - #[doc = " disabled."] + #[doc = " The maximum nominator count before we stop allowing new validators to join."] #[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( + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_nominators_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::core::primitive::u32, - ::core::primitive::bool, - )>, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "OffendingValidators", + "MaxNominatorsCount", vec![], [ - 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, + 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, ], ) } - #[doc = " True if network has been upgraded to this version."] - #[doc = " Storage version of the pallet."] + #[doc = " The current era index."] #[doc = ""] - #[doc = " This is set to v7.0.0 for new networks."] - pub fn storage_version( + #[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, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_staking::Releases, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "StorageVersion", + "CurrentEra", vec![], [ - 70u8, 24u8, 179u8, 189u8, 168u8, 164u8, 175u8, 150u8, 215u8, - 43u8, 18u8, 110u8, 180u8, 137u8, 237u8, 187u8, 185u8, 50u8, - 31u8, 57u8, 16u8, 110u8, 6u8, 170u8, 19u8, 7u8, 160u8, 134u8, - 232u8, 227u8, 151u8, 116u8, + 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, ], ) } - #[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( + #[doc = " The active era information, it holds index and start."] + #[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( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Percent, - >, + runtime_types::pallet_staking::ActiveEraInfo, ::subxt::storage::address::Yes, (), (), > { ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "ChillThreshold", + "ActiveEra", 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, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum number of nominations per nominator."] - pub fn max_nominations( + #[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( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "MaxNominations", + "ErasStartSessionIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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, ], ) } - #[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 = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[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( + #[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::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "HistoryDepth", + "ErasStartSessionIndex", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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, ], ) } - #[doc = " Number of sessions per era."] - pub fn sessions_per_era( + #[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( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::storage::address::StaticStorageAddress::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, + "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, + ), ], - ) - } - #[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, + 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, ], ) } - #[doc = " Number of eras that slashes are deferred by, after computation."] + #[doc = " Exposure of validator at era."] #[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( + #[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( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::storage::address::StaticStorageAddress::new( "Staking", - "SlashDeferDuration", + "ErasStakers", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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, ], ) } - #[doc = " The maximum number of nominators rewarded for each validator."] + #[doc = " Clipped Exposure of validator at era."] #[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( + #[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 = ""] + #[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, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "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::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "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, - ], - ) - } - } - } - } - pub mod offences { - use super::root_mod; - use super::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, - Debug, - )] - #[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 PALLET: &'static str = "Offences"; - const EVENT: &'static str = "Offence"; - } - } - 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>, + _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_staking::offence::OffenceDetails< - ::subxt::utils::AccountId32, - ( - ::subxt::utils::AccountId32, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ), - >, + 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::StaticStorageAddress::new( - "Offences", - "Reports", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "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, + ), + ], [ - 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, + 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, ], ) } - #[doc = " The primary structure that holds all offence records keyed by report identifiers."] - pub fn reports_root( + #[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 = ""] + #[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, ) -> ::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, - >, - ), - >, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "Reports", + "Staking", + "ErasStakersClipped", 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, + 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, ], ) } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index( + #[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, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::H256>, - >, + runtime_types::pallet_staking::ValidatorPrefs, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ConcurrentReportsIndex", + "Staking", + "ErasValidatorPrefs", vec![ ::subxt::storage::address::StorageMapKey::new( _0.borrow(), @@ -7378,840 +6987,766 @@ pub mod api { ), ], [ - 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, + 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, ], ) } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index_root( + #[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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::H256>, - >, + runtime_types::pallet_staking::ValidatorPrefs, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ConcurrentReportsIndex", + "Staking", + "ErasValidatorPrefs", Vec::new(), [ - 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, + 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, ], ) } - #[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 = " The total validator era payout for the last `HISTORY_DEPTH` eras."] #[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 = " 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<[::core::primitive::u8; 16usize]>, + _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, + ::core::primitive::u128, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", + "Staking", + "ErasValidatorReward", vec![::subxt::storage::address::StorageMapKey::new( _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, + 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 = " Enumerates all reports of a kind along with the time they happened."] - #[doc = ""] - #[doc = " All reports are sorted by the time of offence."] + #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] #[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 = " 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< - ::std::vec::Vec<::core::primitive::u8>, - >, + ::core::primitive::u128, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", + "Staking", + "ErasValidatorReward", 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, + 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, ], ) } - } - } - } - pub mod historical { - use super::root_mod; - use super::runtime_types; - } - pub mod session { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetKeys { - pub keys: runtime_types::polkadot_runtime::SessionKeys, - pub proof: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PurgeKeys; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Sets the session key(s) of the function caller to `keys`."] - #[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( + #[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, - keys: runtime_types::polkadot_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Session", - "set_keys", - SetKeys { keys, proof }, - [ - 17u8, 127u8, 23u8, 71u8, 118u8, 133u8, 89u8, 105u8, 93u8, - 52u8, 46u8, 201u8, 151u8, 19u8, 124u8, 195u8, 228u8, 229u8, - 22u8, 216u8, 32u8, 54u8, 67u8, 222u8, 91u8, 175u8, 206u8, - 7u8, 238u8, 118u8, 81u8, 112u8, - ], - ) - } - #[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 {}, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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( + "Staking", + "ErasRewardPoints", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 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, ], ) } - } - } - #[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, - Debug, - )] - #[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, - } - impl ::subxt::events::StaticEvent for NewSession { - const PALLET: &'static str = "Session"; - const EVENT: &'static str = "NewSession"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current set of validators."] - pub fn validators( + #[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< - ::std::vec::Vec<::subxt::utils::AccountId32>, + runtime_types::pallet_staking::EraRewardPoints< + ::subxt::utils::AccountId32, >, + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "Validators", - vec![], + "Staking", + "ErasRewardPoints", + Vec::new(), [ - 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, + 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, ], ) } - #[doc = " Current index of the session."] - pub fn current_index( + #[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, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "CurrentIndex", - vec![], + "Staking", + "ErasTotalStake", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 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, ], ) } - #[doc = " True if the underlying economic identities or weighting behind the validators"] - #[doc = " has changed in the queued validator set."] - pub fn queued_changed( + #[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<::core::primitive::bool>, + ::core::primitive::u128, + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "QueuedChanged", - vec![], + "Staking", + "ErasTotalStake", + Vec::new(), [ - 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, + 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, ], ) } - #[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( + #[doc = " Mode of era forcing."] + pub fn force_era( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::SessionKeys, - )>, - >, + runtime_types::pallet_staking::Forcing, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "QueuedKeys", + "Staking", + "ForceEra", vec![], [ - 197u8, 174u8, 245u8, 219u8, 36u8, 118u8, 73u8, 184u8, 156u8, - 93u8, 167u8, 107u8, 142u8, 7u8, 41u8, 51u8, 77u8, 191u8, - 68u8, 95u8, 71u8, 76u8, 253u8, 137u8, 73u8, 194u8, 169u8, - 234u8, 217u8, 76u8, 157u8, 223u8, + 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, ], ) } - #[doc = " Indices of disabled validators."] + #[doc = " The percentage of the slash that is distributed to reporters."] #[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( + #[doc = " The rest of the slashed value is handled by the `Slash`."] + pub fn slash_reward_fraction( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u32>, - >, + runtime_types::sp_arithmetic::per_things::Perbill, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "DisabledValidators", + "Staking", + "SlashRewardFraction", 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, + 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, ], ) } - #[doc = " The next session keys for a validator."] - pub fn next_keys( + #[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, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::SessionKeys, - >, + ::core::primitive::u128, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Staking", + "CanceledSlashPayout", + vec![], + [ + 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, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::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( - "Session", - "NextKeys", + "Staking", + "UnappliedSlashes", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, - 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, - 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, - 131u8, 29u8, 192u8, 248u8, 166u8, + 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, ], ) } - #[doc = " The next session keys for a validator."] - pub fn next_keys_root( + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::SessionKeys, + ::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( - "Session", - "NextKeys", + "Staking", + "UnappliedSlashes", Vec::new(), [ - 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, - 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, - 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, - 131u8, 29u8, 192u8, 248u8, 166u8, + 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, ], ) } - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner( + #[doc = " A mapping from still-bonded eras to the first session index of that era."] + #[doc = ""] + #[doc = " Must contains information for eras for the range:"] + #[doc = " `[active_era - bounding_duration; active_era]`"] + pub fn bonded_eras( &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, ::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, - )], + "Staking", + "BondedEras", + vec![], [ - 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, + 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, ], ) } - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner_root( + #[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, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, - (), + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, (), ::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, - ], - ) - } - } - } - } - pub mod grandpa { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NoteStalled { - pub delay: ::core::primitive::u32, - pub best_finalized_block_number: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[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 >, - 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, + "Staking", + "ValidatorSlashInEra", + vec![ + ::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, ), - 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, - ], - ) - } - #[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, + ::subxt::storage::address::StorageMapKey::new( + _1.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, ), - 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, ], - ) - } - #[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, + 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, ], ) } - } - } - #[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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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 PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "NewAuthorities"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current authority set has been paused."] - pub struct Paused; - impl ::subxt::events::StaticEvent for Paused { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Paused"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current authority set has been resumed."] - pub struct Resumed; - impl ::subxt::events::StaticEvent for Resumed { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Resumed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " State of the current authority set."] - pub fn state( + #[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< - runtime_types::pallet_grandpa::StoredState< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ), + (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "State", - vec![], + "Staking", + "ValidatorSlashInEra", + Vec::new(), [ - 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, + 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, ], ) } - #[doc = " Pending change: (signaled at, scheduled change)."] - pub fn pending_change( + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era( &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_grandpa::StoredPendingChange< - ::core::primitive::u32, - >, - >, + ::core::primitive::u128, ::subxt::storage::address::Yes, (), - (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "PendingChange", - vec![], + "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, + ), + ], [ - 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, + 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, ], ) } - #[doc = " next block number where we can force a change."] - pub fn next_forced( + #[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<::core::primitive::u32>, - ::subxt::storage::address::Yes, + ::core::primitive::u128, (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "NextForced", - vec![], + "Staking", + "NominatorSlashInEra", + Vec::new(), [ - 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, + 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, ], ) } - #[doc = " `true` if we are currently stalled."] - pub fn stalled( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, + runtime_types::pallet_staking::slashing::SlashingSpans, ::subxt::storage::address::Yes, (), - (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "Stalled", - vec![], + "Staking", + "SlashingSpans", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 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, ], ) } - #[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( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + runtime_types::pallet_staking::slashing::SlashingSpans, + (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "CurrentSetId", - vec![], + "Staking", + "SlashingSpans", + Vec::new(), [ - 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, + 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, ], ) } - #[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( + #[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<::core::primitive::u64>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + 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( - "Grandpa", - "SetIdSession", + "Staking", + "SpanSlash", vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), + &(_0.borrow(), _1.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, + 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, ], ) } - #[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( + #[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<::core::primitive::u32>, - (), + runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, + >, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Grandpa", - "SetIdSession", + "Staking", + "SpanSlash", 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, + 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, ], ) } - } - } + #[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::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Staking", + "CurrentPlannedSession", + vec![], + [ + 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, + ], + ) + } + #[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( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::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![], + [ + 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, + ], + ) + } + #[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::storage::address::StaticStorageAddress< + 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 = " Max Authorities in use"] - pub fn max_authorities( + #[doc = " Maximum number of nominations per nominator."] + pub fn max_nominations( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Grandpa", - "MaxAuthorities", + "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<::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<::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<::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<::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<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "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::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Staking", + "MaxUnlockingChunks", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -8223,7 +7758,7 @@ pub mod api { } } } - pub mod im_online { + pub mod session { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -8240,52 +7775,90 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Heartbeat { - pub heartbeat: - runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, - pub signature: - runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + pub struct SetKeys { + pub keys: runtime_types::kitchensink_runtime::SessionKeys, + pub proof: ::std::vec::Vec<::core::primitive::u8>, } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PurgeKeys; pub struct TransactionApi; impl TransactionApi { + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[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(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 = "- 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 heartbeat( + pub fn set_keys( &self, - heartbeat: runtime_types::pallet_im_online::Heartbeat< - ::core::primitive::u32, - >, - signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::tx::StaticTxPayload { + keys: runtime_types::kitchensink_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ImOnline", - "heartbeat", - Heartbeat { - heartbeat, - signature, - }, + "Session", + "set_keys", + SetKeys { keys, proof }, [ - 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, + 19u8, 210u8, 111u8, 216u8, 235u8, 1u8, 119u8, 211u8, 79u8, + 9u8, 91u8, 245u8, 109u8, 116u8, 95u8, 223u8, 233u8, 189u8, + 185u8, 243u8, 46u8, 178u8, 10u8, 4u8, 231u8, 159u8, 217u8, + 59u8, 45u8, 167u8, 207u8, 137u8, + ], + ) + } + #[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_im_online::pallet::Event; + 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, @@ -8294,265 +7867,230 @@ pub mod api { )] #[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, - } - impl ::subxt::events::StaticEvent for HeartbeatReceived { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "HeartbeatReceived"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "At the end of the session, no offence was committed."] - pub struct AllGood; - impl ::subxt::events::StaticEvent for AllGood { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "AllGood"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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, - >, - )>, + #[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 SomeOffline { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "SomeOffline"; + impl ::subxt::events::StaticEvent for NewSession { + const PALLET: &'static str = "Session"; + const EVENT: &'static str = "NewSession"; } } 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 current set of validators."] + pub fn validators( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::std::vec::Vec<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "HeartbeatAfter", + "Session", + "Validators", 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, + 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 = " The current set of keys that may issue a heartbeat."] - pub fn keys( + #[doc = " Current index of the session."] + pub fn current_index( &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, - >, - >, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "Keys", + "Session", + "CurrentIndex", 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, + 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, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats( + #[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, - _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, - >, - >, + ::core::primitive::bool, ::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, - ), - ], + "Session", + "QueuedChanged", + vec![], [ - 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, + 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, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats_root( + #[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< - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, - >, - >, - (), - (), + ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::kitchensink_runtime::SessionKeys, + )>, ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "ReceivedHeartbeats", - Vec::new(), + "Session", + "QueuedKeys", + vec![], [ - 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, + 57u8, 139u8, 66u8, 116u8, 133u8, 98u8, 66u8, 181u8, 96u8, + 190u8, 69u8, 124u8, 158u8, 124u8, 187u8, 164u8, 223u8, 89u8, + 209u8, 84u8, 106u8, 127u8, 85u8, 202u8, 130u8, 7u8, 250u8, + 163u8, 99u8, 209u8, 225u8, 25u8, ], ) } - #[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 = " 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, - _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, + ::std::vec::Vec<::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, - ), - ], + "Session", + "DisabledValidators", + 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, + 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, ], ) } - #[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 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<::core::primitive::u32>, - (), + runtime_types::kitchensink_runtime::SessionKeys, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "AuthoredBlocks", - Vec::new(), - [ - 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, - 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, - 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, - 227u8, 228u8, 223u8, 103u8, 151u8, + "Session", + "NextKeys", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8, + 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8, + 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8, + 116u8, 207u8, 46u8, 82u8, 64u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " A configuration for base priority of unsigned transactions."] - #[doc = ""] - #[doc = " This is exposed so that it can be tuned for particular runtime, when"] - #[doc = " multiple pallets send unsigned transactions."] - pub fn unsigned_priority( + #[doc = " The next session keys for a validator."] + pub fn next_keys_root( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::kitchensink_runtime::SessionKeys, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "ImOnline", - "UnsignedPriority", + ::subxt::storage::address::StaticStorageAddress::new( + "Session", + "NextKeys", + Vec::new(), [ - 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, + 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8, + 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8, + 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8, + 116u8, 207u8, 46u8, 82u8, 64u8, + ], + ) + } + #[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::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, + ], + ) + } + #[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::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, ], ) } } } } - pub mod authority_discovery { - use super::root_mod; - use super::runtime_types; - } pub mod democracy { use super::root_mod; use super::runtime_types; @@ -8572,7 +8110,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Propose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, #[codec(compact)] pub value: ::core::primitive::u128, @@ -8630,7 +8168,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalPropose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, } #[derive( @@ -8644,7 +8182,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeMajority { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, } #[derive( @@ -8658,7 +8196,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeDefault { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, } #[derive( @@ -8710,7 +8248,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Delegate { - pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } @@ -8744,7 +8285,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Unlock { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -8769,7 +8313,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub index: ::core::primitive::u32, } #[derive( @@ -8812,7 +8359,7 @@ pub mod api { pub fn propose( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { @@ -8909,7 +8456,7 @@ pub mod api { pub fn external_propose( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -8938,7 +8485,7 @@ pub mod api { pub fn external_propose_majority( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, ) -> ::subxt::tx::StaticTxPayload { @@ -8968,7 +8515,7 @@ pub mod api { pub fn external_propose_default( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, ) -> ::subxt::tx::StaticTxPayload { @@ -9092,7 +8639,10 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn delegate( &self, - to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { @@ -9105,10 +8655,10 @@ pub mod api { balance, }, [ - 22u8, 205u8, 202u8, 196u8, 63u8, 1u8, 196u8, 109u8, 4u8, - 190u8, 38u8, 142u8, 248u8, 200u8, 136u8, 12u8, 194u8, 170u8, - 237u8, 176u8, 70u8, 21u8, 112u8, 154u8, 93u8, 169u8, 211u8, - 120u8, 156u8, 68u8, 14u8, 231u8, + 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, ], ) } @@ -9166,17 +8716,20 @@ pub mod api { #[doc = "Weight: `O(R)` with R number of vote of target."] pub fn unlock( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Democracy", "unlock", Unlock { target }, [ - 126u8, 151u8, 230u8, 89u8, 49u8, 247u8, 242u8, 139u8, 190u8, - 15u8, 47u8, 2u8, 132u8, 165u8, 48u8, 205u8, 196u8, 66u8, - 230u8, 222u8, 164u8, 249u8, 152u8, 107u8, 0u8, 99u8, 238u8, - 167u8, 72u8, 77u8, 145u8, 236u8, + 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, ], ) } @@ -9240,7 +8793,10 @@ pub mod api { #[doc = " Weight is calculated for the maximum number of vote."] pub fn remove_other_vote( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, index: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -9248,10 +8804,10 @@ pub mod api { "remove_other_vote", RemoveOtherVote { target, index }, [ - 151u8, 190u8, 115u8, 124u8, 185u8, 43u8, 70u8, 147u8, 98u8, - 167u8, 120u8, 25u8, 231u8, 143u8, 214u8, 25u8, 240u8, 74u8, - 35u8, 58u8, 206u8, 78u8, 121u8, 215u8, 190u8, 42u8, 2u8, - 206u8, 241u8, 44u8, 92u8, 23u8, + 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, ], ) } @@ -9580,7 +9136,7 @@ pub mod api { pub fn public_prop_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -9601,15 +9157,13 @@ pub mod api { pub fn public_props( &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::polkadot_runtime::RuntimeCall, - >, - ::subxt::utils::AccountId32, - )>, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ::subxt::utils::AccountId32, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -9633,12 +9187,12 @@ pub mod api { &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, @@ -9664,12 +9218,12 @@ pub mod api { pub fn deposit_of_root( &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, @@ -9690,7 +9244,7 @@ pub mod api { pub fn referendum_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -9712,7 +9266,7 @@ pub mod api { pub fn lowest_unbaked( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -9736,14 +9290,12 @@ pub mod api { &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::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, >, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), @@ -9770,14 +9322,12 @@ pub mod api { 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::polkadot_runtime::RuntimeCall, - >, - ::core::primitive::u128, + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, >, + ::core::primitive::u128, >, (), (), @@ -9803,12 +9353,10 @@ pub mod api { &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, - >, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -9836,12 +9384,10 @@ pub mod api { 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, - >, + runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), ::subxt::storage::address::Yes, @@ -9864,7 +9410,7 @@ pub mod api { pub fn last_tabled_was_external( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -9888,12 +9434,12 @@ pub mod api { pub fn next_external( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::polkadot_runtime::RuntimeCall, + runtime_types::kitchensink_runtime::RuntimeCall, >, runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - )>, + ), ::subxt::storage::address::Yes, (), (), @@ -9916,12 +9462,12 @@ pub mod api { &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, @@ -9946,12 +9492,12 @@ pub mod api { pub fn blacklist_root( &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, @@ -9973,7 +9519,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -9997,7 +9543,7 @@ pub mod api { pub fn cancellations_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, + ::core::primitive::bool, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -10027,9 +9573,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "EnactmentPeriod", @@ -10044,9 +9589,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "LaunchPeriod", @@ -10061,9 +9605,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "VotingPeriod", @@ -10081,9 +9624,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "VoteLockingPeriod", @@ -10098,9 +9640,8 @@ pub mod api { #[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<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "MinimumDeposit", @@ -10117,9 +9658,8 @@ pub mod api { #[doc = " as an upgrade having happened recently."] pub fn instant_allowed( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::bool> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "InstantAllowed", @@ -10134,9 +9674,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "FastTrackVotingPeriod", @@ -10151,9 +9690,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "CooloffPeriod", @@ -10171,9 +9709,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxVotes", @@ -10188,9 +9725,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxProposals", @@ -10205,9 +9741,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxDeposits", @@ -10222,9 +9757,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Democracy", "MaxBlacklisted", @@ -10272,7 +9806,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -10289,7 +9823,7 @@ pub mod api { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -10424,7 +9958,7 @@ pub mod api { #[doc = "# "] pub fn execute( &self, - proposal: runtime_types::polkadot_runtime::RuntimeCall, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -10435,10 +9969,10 @@ pub mod api { length_bound, }, [ - 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, - 174u8, 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, - 255u8, 184u8, 36u8, 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, - 193u8, 132u8, 20u8, 244u8, 40u8, + 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, + 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, + 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, + 21u8, 24u8, 213u8, 28u8, 224u8, ], ) } @@ -10472,7 +10006,7 @@ pub mod api { pub fn propose( &self, threshold: ::core::primitive::u32, - proposal: runtime_types::polkadot_runtime::RuntimeCall, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -10484,10 +10018,10 @@ pub mod api { length_bound, }, [ - 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, - 106u8, 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, - 70u8, 235u8, 43u8, 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, - 201u8, 201u8, 114u8, 236u8, 197u8, + 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, + 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, + 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, + 94u8, 45u8, 11u8, 127u8, ], ) } @@ -10819,10 +10353,8 @@ pub mod api { pub fn proposals( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::H256, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -10845,9 +10377,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::RuntimeCall, - >, + runtime_types::kitchensink_runtime::RuntimeCall, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -10860,10 +10390,10 @@ pub mod api { ::subxt::storage::address::StorageHasher::Identity, )], [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, - 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, - 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, - 253u8, 110u8, 183u8, 61u8, 225u8, + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, ], ) } @@ -10871,9 +10401,7 @@ pub mod api { pub fn proposal_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::RuntimeCall, - >, + runtime_types::kitchensink_runtime::RuntimeCall, (), (), ::subxt::storage::address::Yes, @@ -10883,10 +10411,10 @@ pub mod api { "ProposalOf", Vec::new(), [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, - 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, - 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, - 253u8, 110u8, 183u8, 61u8, 225u8, + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, ], ) } @@ -10895,11 +10423,9 @@ pub mod api { &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, - >, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, (), @@ -10924,11 +10450,9 @@ pub mod api { pub fn voting_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), (), @@ -10950,7 +10474,7 @@ pub mod api { pub fn proposal_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -10971,9 +10495,7 @@ pub mod api { pub fn members( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, + ::std::vec::Vec<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -10994,7 +10516,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), @@ -11047,7 +10569,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -11064,7 +10586,7 @@ pub mod api { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -11199,7 +10721,7 @@ pub mod api { #[doc = "# "] pub fn execute( &self, - proposal: runtime_types::polkadot_runtime::RuntimeCall, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -11210,10 +10732,10 @@ pub mod api { length_bound, }, [ - 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, - 174u8, 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, - 255u8, 184u8, 36u8, 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, - 193u8, 132u8, 20u8, 244u8, 40u8, + 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, + 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, + 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, + 21u8, 24u8, 213u8, 28u8, 224u8, ], ) } @@ -11247,7 +10769,7 @@ pub mod api { pub fn propose( &self, threshold: ::core::primitive::u32, - proposal: runtime_types::polkadot_runtime::RuntimeCall, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -11259,10 +10781,10 @@ pub mod api { length_bound, }, [ - 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, - 106u8, 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, - 70u8, 235u8, 43u8, 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, - 201u8, 201u8, 114u8, 236u8, 197u8, + 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, + 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, + 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, + 94u8, 45u8, 11u8, 127u8, ], ) } @@ -11594,10 +11116,8 @@ pub mod api { pub fn proposals( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::H256, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -11620,9 +11140,7 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::RuntimeCall, - >, + runtime_types::kitchensink_runtime::RuntimeCall, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -11635,10 +11153,10 @@ pub mod api { ::subxt::storage::address::StorageHasher::Identity, )], [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, - 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, - 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, - 253u8, 110u8, 183u8, 61u8, 225u8, + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, ], ) } @@ -11646,9 +11164,7 @@ pub mod api { pub fn proposal_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime::RuntimeCall, - >, + runtime_types::kitchensink_runtime::RuntimeCall, (), (), ::subxt::storage::address::Yes, @@ -11658,10 +11174,10 @@ pub mod api { "ProposalOf", Vec::new(), [ - 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, - 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, - 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, - 253u8, 110u8, 183u8, 61u8, 225u8, + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, ], ) } @@ -11670,11 +11186,9 @@ pub mod api { &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, - >, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, (), @@ -11699,11 +11213,9 @@ pub mod api { pub fn voting_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), (), @@ -11725,7 +11237,7 @@ pub mod api { pub fn proposal_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -11746,9 +11258,7 @@ pub mod api { pub fn members( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, + ::std::vec::Vec<::subxt::utils::AccountId32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -11769,7 +11279,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), @@ -11789,7 +11299,7 @@ pub mod api { } } } - pub mod phragmen_election { + pub mod elections { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -11856,7 +11366,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub slash_bond: ::core::primitive::bool, pub rerun_election: ::core::primitive::bool, } @@ -11904,7 +11417,7 @@ pub mod api { value: ::core::primitive::u128, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "PhragmenElection", + "Elections", "vote", Vote { votes, value }, [ @@ -11922,7 +11435,7 @@ pub mod api { #[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( - "PhragmenElection", + "Elections", "remove_voter", RemoveVoter {}, [ @@ -11953,7 +11466,7 @@ pub mod api { candidate_count: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "PhragmenElection", + "Elections", "submit_candidacy", SubmitCandidacy { candidate_count }, [ @@ -11987,7 +11500,7 @@ pub mod api { renouncing: runtime_types::pallet_elections_phragmen::Renouncing, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "PhragmenElection", + "Elections", "renounce_candidacy", RenounceCandidacy { renouncing }, [ @@ -12018,12 +11531,15 @@ pub mod api { #[doc = "# "] pub fn remove_member( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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( - "PhragmenElection", + "Elections", "remove_member", RemoveMember { who, @@ -12031,10 +11547,10 @@ pub mod api { rerun_election, }, [ - 45u8, 106u8, 9u8, 19u8, 133u8, 38u8, 20u8, 233u8, 12u8, - 169u8, 216u8, 40u8, 23u8, 139u8, 184u8, 202u8, 2u8, 124u8, - 202u8, 48u8, 205u8, 176u8, 161u8, 43u8, 66u8, 24u8, 189u8, - 183u8, 233u8, 62u8, 102u8, 237u8, + 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, ], ) } @@ -12054,7 +11570,7 @@ pub mod api { num_defunct: ::core::primitive::u32, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "PhragmenElection", + "Elections", "clean_defunct_voters", CleanDefunctVoters { num_voters, @@ -12095,7 +11611,7 @@ pub mod api { )>, } impl ::subxt::events::StaticEvent for NewTerm { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "NewTerm"; } #[derive( @@ -12111,7 +11627,7 @@ pub mod api { #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] pub struct EmptyTerm; impl ::subxt::events::StaticEvent for EmptyTerm { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "EmptyTerm"; } #[derive( @@ -12126,7 +11642,7 @@ pub mod api { #[doc = "Internal error happened while trying to perform election."] pub struct ElectionError; impl ::subxt::events::StaticEvent for ElectionError { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "ElectionError"; } #[derive( @@ -12144,7 +11660,7 @@ pub mod api { pub member: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for MemberKicked { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "MemberKicked"; } #[derive( @@ -12161,7 +11677,7 @@ pub mod api { pub candidate: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Renounced { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "Renounced"; } #[derive( @@ -12182,7 +11698,7 @@ pub mod api { pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for CandidateSlashed { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "CandidateSlashed"; } #[derive( @@ -12200,7 +11716,7 @@ pub mod api { pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SeatHolderSlashed { - const PALLET: &'static str = "PhragmenElection"; + const PALLET: &'static str = "Elections"; const EVENT: &'static str = "SeatHolderSlashed"; } } @@ -12214,12 +11730,10 @@ pub mod api { pub fn members( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, @@ -12227,7 +11741,7 @@ pub mod api { (), > { ::subxt::storage::address::StaticStorageAddress::new( - "PhragmenElection", + "Elections", "Members", vec![], [ @@ -12245,12 +11759,10 @@ pub mod api { pub fn runners_up( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::pallet_elections_phragmen::SeatHolder< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + ::std::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, >, ::subxt::storage::address::Yes, @@ -12258,7 +11770,7 @@ pub mod api { (), > { ::subxt::storage::address::StaticStorageAddress::new( - "PhragmenElection", + "Elections", "RunnersUp", vec![], [ @@ -12278,18 +11790,16 @@ pub mod api { pub fn candidates( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - )>, - >, + ::std::vec::Vec<( + ::subxt::utils::AccountId32, + ::core::primitive::u128, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "PhragmenElection", + "Elections", "Candidates", vec![], [ @@ -12304,13 +11814,13 @@ pub mod api { pub fn election_rounds( &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( - "PhragmenElection", + "Elections", "ElectionRounds", vec![], [ @@ -12328,18 +11838,16 @@ pub mod api { &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, - >, + 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::StaticStorageAddress::new( - "PhragmenElection", + "Elections", "Voting", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), @@ -12359,18 +11867,16 @@ pub mod api { pub fn voting_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_elections_phragmen::Voter< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + 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( - "PhragmenElection", + "Elections", "Voting", Vec::new(), [ @@ -12391,10 +11897,10 @@ pub mod api { pub fn pallet_id( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 8usize]>, + [::core::primitive::u8; 8usize], > { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "PalletId", [ 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, @@ -12407,11 +11913,10 @@ pub mod api { #[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<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "CandidacyBond", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -12427,11 +11932,10 @@ pub mod api { #[doc = " creating a gigantic number of votes."] pub fn voting_bond_base( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "VotingBondBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -12444,11 +11948,10 @@ pub mod api { #[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<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "VotingBondFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -12461,11 +11964,10 @@ pub mod api { #[doc = " Number of members to elect."] pub fn desired_members( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "DesiredMembers", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12478,11 +11980,10 @@ pub mod api { #[doc = " Number of runners_up to keep."] pub fn desired_runners_up( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "DesiredRunnersUp", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12497,11 +11998,10 @@ pub mod api { #[doc = " be in passive mode."] pub fn term_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "TermDuration", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12518,11 +12018,10 @@ pub mod api { #[doc = " candidates are accepted in the election."] pub fn max_candidates( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "MaxCandidates", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12538,11 +12037,10 @@ pub mod api { #[doc = " When the limit is reached the new voters are ignored."] pub fn max_voters( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "PhragmenElection", + "Elections", "MaxVoters", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12573,7 +12071,10 @@ pub mod api { #[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, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12585,7 +12086,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12597,8 +12101,14 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SwapMember { - pub remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub remove: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub add: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12622,7 +12132,10 @@ pub mod api { #[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, ()>, + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12634,7 +12147,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetPrime { - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12653,17 +12169,20 @@ pub mod api { #[doc = "May only be called from `T::AddOrigin`."] pub fn add_member( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", "add_member", AddMember { who }, [ - 165u8, 116u8, 123u8, 50u8, 236u8, 196u8, 108u8, 211u8, 112u8, - 214u8, 121u8, 105u8, 7u8, 88u8, 125u8, 99u8, 24u8, 0u8, - 168u8, 65u8, 158u8, 100u8, 42u8, 62u8, 101u8, 59u8, 30u8, - 174u8, 170u8, 119u8, 141u8, 121u8, + 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, ], ) } @@ -12672,17 +12191,20 @@ pub mod api { #[doc = "May only be called from `T::RemoveOrigin`."] pub fn remove_member( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", "remove_member", RemoveMember { who }, [ - 177u8, 18u8, 217u8, 235u8, 254u8, 40u8, 137u8, 79u8, 146u8, - 5u8, 55u8, 187u8, 129u8, 28u8, 54u8, 132u8, 115u8, 220u8, - 132u8, 139u8, 91u8, 81u8, 0u8, 110u8, 188u8, 248u8, 1u8, - 135u8, 93u8, 153u8, 95u8, 193u8, + 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, ], ) } @@ -12693,18 +12215,24 @@ pub mod api { #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] pub fn swap_member( &self, - remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + 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 }, [ - 96u8, 248u8, 50u8, 206u8, 192u8, 242u8, 162u8, 62u8, 28u8, - 91u8, 11u8, 208u8, 15u8, 84u8, 188u8, 234u8, 219u8, 233u8, - 200u8, 215u8, 157u8, 155u8, 40u8, 220u8, 132u8, 182u8, 57u8, - 210u8, 94u8, 240u8, 95u8, 252u8, + 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, ], ) } @@ -12735,17 +12263,20 @@ pub mod api { #[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, ()>, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", "change_key", ChangeKey { new }, [ - 27u8, 236u8, 241u8, 168u8, 98u8, 39u8, 176u8, 220u8, 145u8, - 48u8, 173u8, 25u8, 179u8, 103u8, 170u8, 13u8, 166u8, 181u8, - 131u8, 160u8, 131u8, 219u8, 116u8, 34u8, 152u8, 152u8, 46u8, - 100u8, 46u8, 5u8, 156u8, 195u8, + 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, ], ) } @@ -12754,17 +12285,20 @@ pub mod api { #[doc = "May only be called from `T::PrimeOrigin`."] pub fn set_prime( &self, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "TechnicalMembership", "set_prime", SetPrime { who }, [ - 0u8, 42u8, 111u8, 52u8, 151u8, 19u8, 239u8, 149u8, 183u8, - 252u8, 87u8, 194u8, 145u8, 21u8, 245u8, 112u8, 221u8, 181u8, - 87u8, 28u8, 48u8, 39u8, 210u8, 133u8, 241u8, 207u8, 255u8, - 209u8, 139u8, 232u8, 119u8, 64u8, + 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, ], ) } @@ -12889,10 +12423,8 @@ pub mod api { pub fn members( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -12914,7 +12446,7 @@ pub mod api { pub fn prime( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), @@ -12934,6 +12466,401 @@ pub mod api { } } } + pub mod grandpa { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NoteStalled { + pub delay: ::core::primitive::u32, + pub best_finalized_block_number: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[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 >, + 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, + ], + ) + } + #[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, + ], + ) + } + #[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, + ], + ) + } + } + } + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "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 PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "NewAuthorities"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been paused."] + pub struct Paused; + impl ::subxt::events::StaticEvent for Paused { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Paused"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been resumed."] + pub struct Resumed; + impl ::subxt::events::StaticEvent for Resumed { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Resumed"; + } + } + 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< + runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, + ::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< + runtime_types::pallet_grandpa::StoredPendingChange< + ::core::primitive::u32, + >, + ::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< + ::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, + ], + ) + } + #[doc = " `true` if we are currently stalled."] + pub fn stalled( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + (::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, + ], + ) + } + #[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< + ::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, + ], + ) + } + #[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< + ::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, + ], + ) + } + #[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< + ::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, + ], + ) + } + } + } + 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<::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, + ], + ) + } + } + } + } pub mod treasury { use super::root_mod; use super::runtime_types; @@ -12954,8 +12881,10 @@ pub mod api { pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, - pub beneficiary: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12995,8 +12924,10 @@ pub mod api { pub struct Spend { #[codec(compact)] pub amount: ::core::primitive::u128, - pub beneficiary: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13027,7 +12958,7 @@ pub mod api { value: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -13035,10 +12966,10 @@ pub mod api { "propose_spend", ProposeSpend { value, beneficiary }, [ - 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, - 244u8, 78u8, 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, - 108u8, 153u8, 203u8, 223u8, 8u8, 117u8, 126u8, 250u8, 255u8, - 52u8, 245u8, 69u8, 45u8, 136u8, + 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, ], ) } @@ -13106,7 +13037,7 @@ pub mod api { amount: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -13117,10 +13048,10 @@ pub mod api { beneficiary, }, [ - 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, - 239u8, 7u8, 84u8, 14u8, 228u8, 58u8, 31u8, 158u8, 185u8, - 25u8, 91u8, 70u8, 33u8, 19u8, 92u8, 100u8, 162u8, 5u8, 48u8, - 20u8, 120u8, 9u8, 109u8, + 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, ], ) } @@ -13307,6 +13238,24 @@ pub mod api { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "SpendApproved"; } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The inactive funds of the pallet have been updated."] + pub struct UpdatedInactive { + pub reactivated: ::core::primitive::u128, + pub deactivated: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for UpdatedInactive { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "UpdatedInactive"; + } } pub mod storage { use super::runtime_types; @@ -13316,7 +13265,7 @@ pub mod api { pub fn proposal_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), @@ -13338,11 +13287,9 @@ pub mod api { &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, - >, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), @@ -13367,11 +13314,9 @@ pub mod api { pub fn proposals_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_treasury::Proposal< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + runtime_types::pallet_treasury::Proposal< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), (), @@ -13389,27 +13334,46 @@ pub mod api { ], ) } - #[doc = " Proposal indices that have been approved but not yet awarded."] - pub fn approvals( + #[doc = " The amount which has been reported as inactive to Currency."] + pub fn deactivated( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - >, + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( "Treasury", - "Approvals", + "Deactivated", vec![], [ - 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8, - 4u8, 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8, - 244u8, 175u8, 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8, + 159u8, 57u8, 5u8, 85u8, 136u8, 128u8, 70u8, 43u8, 67u8, 76u8, + 123u8, 206u8, 48u8, 253u8, 51u8, 40u8, 14u8, 35u8, 162u8, + 173u8, 127u8, 79u8, 38u8, 235u8, 9u8, 141u8, 201u8, 37u8, + 211u8, 176u8, 119u8, 106u8, + ], + ) + } + #[doc = " Proposal indices that have been approved but not yet awarded."] + pub fn approvals( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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![], + [ + 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, ], ) @@ -13425,9 +13389,7 @@ pub mod api { pub fn proposal_bond( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Permill, - >, + runtime_types::sp_arithmetic::per_things::Permill, > { ::subxt::constants::StaticConstantAddress::new( "Treasury", @@ -13443,9 +13405,8 @@ pub mod api { #[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<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Treasury", "ProposalBondMinimum", @@ -13461,9 +13422,7 @@ pub mod api { pub fn proposal_bond_maximum( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<::core::primitive::u128>, - >, + ::core::option::Option<::core::primitive::u128>, > { ::subxt::constants::StaticConstantAddress::new( "Treasury", @@ -13479,9 +13438,8 @@ pub mod api { #[doc = " Period between successive spends."] pub fn spend_period( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Treasury", "SpendPeriod", @@ -13497,9 +13455,7 @@ pub mod api { pub fn burn( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Permill, - >, + runtime_types::sp_arithmetic::per_things::Permill, > { ::subxt::constants::StaticConstantAddress::new( "Treasury", @@ -13516,9 +13472,7 @@ pub mod api { pub fn pallet_id( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::PalletId, - >, + runtime_types::frame_support::PalletId, > { ::subxt::constants::StaticConstantAddress::new( "Treasury", @@ -13536,9 +13490,8 @@ pub mod api { #[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<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Treasury", "MaxApprovals", @@ -13553,7 +13506,7 @@ pub mod api { } } } - pub mod claims { + pub mod contracts { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -13570,10 +13523,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: - runtime_types::polkadot_runtime_common::claims::EcdsaSignature, + pub struct CallOldWeight { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + #[codec(compact)] + pub gas_limit: runtime_types::sp_weights::OldWeight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub data: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13584,17 +13546,82 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintClaim { - pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub struct InstantiateWithCodeOldWeight { + #[codec(compact)] pub value: ::core::primitive::u128, - pub vesting_schedule: ::core::option::Option<( - ::core::primitive::u128, - ::core::primitive::u128, + #[codec(compact)] + pub gas_limit: runtime_types::sp_weights::OldWeight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub code: ::std::vec::Vec<::core::primitive::u8>, + pub data: ::std::vec::Vec<::core::primitive::u8>, + pub salt: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct InstantiateOldWeight { + #[codec(compact)] + pub value: ::core::primitive::u128, + #[codec(compact)] + pub gas_limit: runtime_types::sp_weights::OldWeight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub code_hash: ::subxt::utils::H256, + pub data: ::std::vec::Vec<::core::primitive::u8>, + pub salt: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UploadCode { + pub code: ::std::vec::Vec<::core::primitive::u8>, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub determinism: runtime_types::pallet_contracts::wasm::Determinism, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveCode { + pub code_hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCode { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, - )>, - pub statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, >, + pub code_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13605,11 +13632,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimAttest { - pub dest: ::subxt::utils::AccountId32, - pub ethereum_signature: - runtime_types::polkadot_runtime_common::claims::EcdsaSignature, - pub statement: ::std::vec::Vec<::core::primitive::u8>, + pub struct Call { + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub data: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13620,8 +13654,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Attest { - pub statement: ::std::vec::Vec<::core::primitive::u8>, + pub struct InstantiateWithCode { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub code: ::std::vec::Vec<::core::primitive::u8>, + pub data: ::std::vec::Vec<::core::primitive::u8>, + pub salt: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13632,209 +13674,350 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MoveClaim { - pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, + pub struct Instantiate { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, + pub storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + pub code_hash: ::subxt::utils::H256, + pub data: ::std::vec::Vec<::core::primitive::u8>, + pub salt: ::std::vec::Vec<::core::primitive::u8>, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Make a claim to collect your DOTs."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] - #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to claim is deemed valid if the signature provided matches"] - #[doc = "the expected signed message of:"] + #[doc = "Deprecated version if [`Self::call`] for use in an in-storage `Call`."] + pub fn call_old_weight( + &self, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + data: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "call_old_weight", + CallOldWeight { + dest, + value, + gas_limit, + storage_deposit_limit, + data, + }, + [ + 110u8, 227u8, 98u8, 194u8, 241u8, 14u8, 112u8, 34u8, 18u8, + 0u8, 102u8, 76u8, 145u8, 224u8, 186u8, 143u8, 89u8, 61u8, + 182u8, 157u8, 35u8, 128u8, 148u8, 255u8, 192u8, 223u8, 12u8, + 178u8, 69u8, 1u8, 168u8, 149u8, + ], + ) + } + #[doc = "Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`."] + pub fn instantiate_with_code_old_weight( + &self, + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code: ::std::vec::Vec<::core::primitive::u8>, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "instantiate_with_code_old_weight", + InstantiateWithCodeOldWeight { + value, + gas_limit, + storage_deposit_limit, + code, + data, + salt, + }, + [ + 93u8, 124u8, 100u8, 101u8, 7u8, 110u8, 92u8, 199u8, 162u8, + 126u8, 35u8, 47u8, 190u8, 42u8, 237u8, 152u8, 169u8, 130u8, + 21u8, 33u8, 136u8, 220u8, 110u8, 106u8, 57u8, 211u8, 158u8, + 130u8, 112u8, 37u8, 41u8, 39u8, + ], + ) + } + #[doc = "Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`."] + pub fn instantiate_old_weight( + &self, + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code_hash: ::subxt::utils::H256, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "instantiate_old_weight", + InstantiateOldWeight { + value, + gas_limit, + storage_deposit_limit, + code_hash, + data, + salt, + }, + [ + 243u8, 56u8, 93u8, 198u8, 169u8, 134u8, 6u8, 135u8, 19u8, + 1u8, 20u8, 138u8, 202u8, 59u8, 59u8, 99u8, 58u8, 22u8, 33u8, + 94u8, 253u8, 215u8, 203u8, 159u8, 58u8, 21u8, 24u8, 235u8, + 30u8, 215u8, 173u8, 23u8, + ], + ) + } + #[doc = "Upload new `code` without instantiating a contract from it."] #[doc = ""] - #[doc = "> Ethereum Signed Message:"] - #[doc = "> (configured prefix string)(address)"] + #[doc = "If the code does not already exist a deposit is reserved from the caller"] + #[doc = "and unreserved only when [`Self::remove_code`] is called. The size of the reserve"] + #[doc = "depends on the instrumented size of the the supplied `code`."] #[doc = ""] - #[doc = "and `address` matches the `dest` account."] + #[doc = "If the code already exists in storage it will still return `Ok` and upgrades"] + #[doc = "the in storage version to the current"] + #[doc = "[`InstructionWeights::version`](InstructionWeights)."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `dest`: The destination account to payout the claim."] - #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] - #[doc = " matching the format described above."] + #[doc = "- `determinism`: If this is set to any other value but [`Determinism::Deterministic`]"] + #[doc = " then the only way to use this code is to delegate call into it from an offchain"] + #[doc = " execution. Set to [`Determinism::Deterministic`] if in doubt."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = "# Note"] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn claim( + #[doc = "Anyone can instantiate a contract from any uploaded code and thus prevent its removal."] + #[doc = "To avoid this situation a constructor could employ access control so that it can"] + #[doc = "only be instantiated by permissioned entities. The same is true when uploading"] + #[doc = "through [`Self::instantiate_with_code`]."] + pub fn upload_code( &self, - dest: ::subxt::utils::AccountId32, - ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Claims", - "claim", - Claim { - dest, - ethereum_signature, + code: ::std::vec::Vec<::core::primitive::u8>, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + determinism: runtime_types::pallet_contracts::wasm::Determinism, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "upload_code", + UploadCode { + code, + storage_deposit_limit, + determinism, }, [ - 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, - 198u8, 250u8, 49u8, 106u8, 26u8, 109u8, 183u8, 33u8, 50u8, - 217u8, 28u8, 50u8, 107u8, 249u8, 80u8, 199u8, 10u8, 192u8, - 1u8, 54u8, 41u8, 146u8, 11u8, + 233u8, 137u8, 54u8, 111u8, 132u8, 124u8, 80u8, 213u8, 182u8, + 224u8, 144u8, 240u8, 6u8, 235u8, 148u8, 26u8, 65u8, 39u8, + 91u8, 151u8, 131u8, 10u8, 216u8, 101u8, 89u8, 115u8, 160u8, + 154u8, 44u8, 239u8, 142u8, 116u8, ], ) } - #[doc = "Mint a new claim to collect DOTs."] + #[doc = "Remove the code stored under `code_hash` and refund the deposit to its owner."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = "A code can only be removed by its original uploader (its owner) and only if it is"] + #[doc = "not used by any contract."] + pub fn remove_code( + &self, + code_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "remove_code", + RemoveCode { code_hash }, + [ + 43u8, 192u8, 198u8, 182u8, 108u8, 76u8, 21u8, 42u8, 169u8, + 41u8, 195u8, 73u8, 31u8, 179u8, 162u8, 56u8, 91u8, 5u8, 64u8, + 7u8, 252u8, 194u8, 255u8, 170u8, 67u8, 137u8, 143u8, 192u8, + 2u8, 149u8, 38u8, 180u8, + ], + ) + } + #[doc = "Privileged function that changes the code of an existing contract."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who`: The Ethereum address allowed to collect this claim."] - #[doc = "- `value`: The number of DOTs that will be claimed."] - #[doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] + #[doc = "This takes care of updating refcounts and all other necessary operations. Returns"] + #[doc = "an error if either the `code_hash` or `dest` do not exist."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = "# Note"] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn mint_claim( + #[doc = "This does **not** change the address of the contract in question. This means"] + #[doc = "that the contract address is no longer derived from its code hash after calling"] + #[doc = "this dispatchable."] + pub fn set_code( &self, - who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - value: ::core::primitive::u128, - vesting_schedule: ::core::option::Option<( - ::core::primitive::u128, - ::core::primitive::u128, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, - )>, - statement: ::core::option::Option< - runtime_types::polkadot_runtime_common::claims::StatementKind, >, - ) -> ::subxt::tx::StaticTxPayload { + code_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Claims", - "mint_claim", - MintClaim { - who, - value, - vesting_schedule, - statement, - }, + "Contracts", + "set_code", + SetCode { dest, code_hash }, [ - 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, - 93u8, 246u8, 21u8, 37u8, 244u8, 166u8, 132u8, 208u8, 18u8, - 86u8, 195u8, 156u8, 9u8, 220u8, 120u8, 40u8, 183u8, 28u8, - 103u8, 84u8, 163u8, 153u8, 110u8, + 87u8, 240u8, 9u8, 107u8, 114u8, 69u8, 236u8, 184u8, 154u8, + 179u8, 251u8, 25u8, 177u8, 13u8, 199u8, 181u8, 166u8, 219u8, + 217u8, 11u8, 98u8, 167u8, 45u8, 214u8, 212u8, 208u8, 110u8, + 91u8, 8u8, 65u8, 232u8, 11u8, ], ) } - #[doc = "Make a claim to collect your DOTs by signing a statement."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _None_."] + #[doc = "Makes a call to an account, optionally transferring some balance."] #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] - #[doc = "the expected signed message of:"] + #[doc = "# Parameters"] #[doc = ""] - #[doc = "> Ethereum Signed Message:"] - #[doc = "> (configured prefix string)(address)(statement)"] + #[doc = "* `dest`: Address of the contract to call."] + #[doc = "* `value`: The balance to transfer from the `origin` to `dest`."] + #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] + #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the"] + #[doc = " caller to pay for the storage consumed."] + #[doc = "* `data`: The input data to pass to the contract."] #[doc = ""] - #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] - #[doc = "expected according to your purchase arrangement."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `dest`: The destination account to payout the claim."] - #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] - #[doc = " matching the format described above."] - #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] - #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn claim_attest( + #[doc = "* If the account is a smart-contract account, the associated code will be"] + #[doc = "executed and any value will be transferred."] + #[doc = "* If the account is a regular account, any value will be transferred."] + #[doc = "* If no account exists and the call value is not less than `existential_deposit`,"] + #[doc = "a regular account will be created and any value will be transferred."] + pub fn call( &self, - dest: ::subxt::utils::AccountId32, - ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, - statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + data: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Claims", - "claim_attest", - ClaimAttest { + "Contracts", + "call", + Call { dest, - ethereum_signature, - statement, + value, + gas_limit, + storage_deposit_limit, + data, }, [ - 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, - 82u8, 213u8, 95u8, 203u8, 145u8, 224u8, 113u8, 92u8, 141u8, - 31u8, 54u8, 218u8, 47u8, 218u8, 239u8, 211u8, 206u8, 77u8, - 176u8, 19u8, 176u8, 175u8, 135u8, + 196u8, 11u8, 91u8, 234u8, 7u8, 74u8, 48u8, 20u8, 202u8, 48u8, + 234u8, 203u8, 148u8, 60u8, 217u8, 84u8, 219u8, 41u8, 230u8, + 150u8, 158u8, 153u8, 160u8, 81u8, 59u8, 2u8, 170u8, 20u8, + 252u8, 97u8, 6u8, 173u8, ], ) } - #[doc = "Attest to a statement, needed to finalize the claims process."] + #[doc = "Instantiates a new contract from the supplied `code` optionally transferring"] + #[doc = "some balance."] #[doc = ""] - #[doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] + #[doc = "This dispatchable has the same effect as calling [`Self::upload_code`] +"] + #[doc = "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please"] + #[doc = "also check the documentation of [`Self::upload_code`]."] #[doc = ""] - #[doc = "Unsigned Validation:"] - #[doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] - #[doc = "and provides a `statement` which is expected for the account."] + #[doc = "# Parameters"] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] + #[doc = "* `value`: The balance to transfer from the `origin` to the newly created contract."] + #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] + #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved"] + #[doc = " from the caller to pay for the storage consumed."] + #[doc = "* `code`: The contract code to deploy in raw bytes."] + #[doc = "* `data`: The input data to pass to the contract constructor."] + #[doc = "* `salt`: Used for the address derivation. See [`Pallet::contract_address`]."] #[doc = ""] - #[doc = ""] - #[doc = "The weight of this call is invariant over the input parameters."] - #[doc = "Weight includes logic to do pre-validation on `attest` call."] + #[doc = "Instantiation is executed as follows:"] #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = ""] - pub fn attest( + #[doc = "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that"] + #[doc = " code."] + #[doc = "- If the `code_hash` already exists on the chain the underlying `code` will be shared."] + #[doc = "- The destination address is computed based on the sender, code_hash and the salt."] + #[doc = "- The smart-contract account is created at the computed address."] + #[doc = "- The `value` is transferred to the new account."] + #[doc = "- The `deploy` function is executed in the context of the newly-created account."] + pub fn instantiate_with_code( &self, - statement: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code: ::std::vec::Vec<::core::primitive::u8>, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Claims", - "attest", - Attest { statement }, + "Contracts", + "instantiate_with_code", + InstantiateWithCode { + value, + gas_limit, + storage_deposit_limit, + code, + data, + salt, + }, [ - 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, - 244u8, 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, - 22u8, 52u8, 223u8, 224u8, 83u8, 21u8, 218u8, 248u8, 100u8, - 107u8, 58u8, 247u8, 10u8, + 94u8, 238u8, 175u8, 86u8, 230u8, 186u8, 94u8, 60u8, 201u8, + 35u8, 117u8, 236u8, 221u8, 10u8, 180u8, 191u8, 140u8, 79u8, + 203u8, 134u8, 240u8, 21u8, 31u8, 63u8, 9u8, 17u8, 134u8, + 30u8, 244u8, 95u8, 171u8, 164u8, ], ) } - pub fn move_claim( + #[doc = "Instantiates a contract from a previously deployed wasm binary."] + #[doc = ""] + #[doc = "This function is identical to [`Self::instantiate_with_code`] but without the"] + #[doc = "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary"] + #[doc = "must be supplied."] + pub fn instantiate( &self, - old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, - maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Claims", - "move_claim", - MoveClaim { - old, - new, - maybe_preclaim, + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code_hash: ::subxt::utils::H256, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Contracts", + "instantiate", + Instantiate { + value, + gas_limit, + storage_deposit_limit, + code_hash, + data, + salt, }, [ - 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, - 185u8, 230u8, 161u8, 202u8, 11u8, 223u8, 15u8, 57u8, 181u8, - 34u8, 131u8, 235u8, 168u8, 227u8, 152u8, 157u8, 4u8, 192u8, - 243u8, 194u8, 120u8, 130u8, 202u8, + 251u8, 49u8, 158u8, 1u8, 138u8, 29u8, 106u8, 187u8, 68u8, + 135u8, 44u8, 196u8, 230u8, 237u8, 88u8, 244u8, 170u8, 168u8, + 11u8, 91u8, 185u8, 11u8, 45u8, 86u8, 113u8, 79u8, 92u8, + 248u8, 113u8, 47u8, 141u8, 10u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; + pub type Event = runtime_types::pallet_contracts::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -13846,249 +14029,419 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Someone claimed some DOTs."] - pub struct Claimed { - pub who: ::subxt::utils::AccountId32, - pub ethereum_address: - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub amount: ::core::primitive::u128, + #[doc = "Contract deployed by address at the specified address."] + pub struct Instantiated { + pub deployer: ::subxt::utils::AccountId32, + pub contract: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "Claims"; - const EVENT: &'static str = "Claimed"; + impl ::subxt::events::StaticEvent for Instantiated { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "Instantiated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contract has been removed."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "The only way for a contract to be removed and emitting this event is by calling"] + #[doc = "`seal_terminate`."] + pub struct Terminated { + pub contract: ::subxt::utils::AccountId32, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Terminated { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "Terminated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Code with the specified hash has been stored."] + pub struct CodeStored { + pub code_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for CodeStored { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "CodeStored"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A custom event emitted by the contract."] + pub struct ContractEmitted { + pub contract: ::subxt::utils::AccountId32, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::events::StaticEvent for ContractEmitted { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "ContractEmitted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A code with the specified hash was removed."] + pub struct CodeRemoved { + pub code_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for CodeRemoved { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "CodeRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A contract's code was updated."] + pub struct ContractCodeUpdated { + pub contract: ::subxt::utils::AccountId32, + pub new_code_hash: ::subxt::utils::H256, + pub old_code_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for ContractCodeUpdated { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "ContractCodeUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A contract was called either by a plain account or another contract."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "Please keep in mind that like all events this is only emitted for successful"] + #[doc = "calls. This is because on failure all storage changes including events are"] + #[doc = "rolled back."] + pub struct Called { + pub caller: ::subxt::utils::AccountId32, + pub contract: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Called { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "Called"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A contract delegate called a code hash."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "Please keep in mind that like all events this is only emitted for successful"] + #[doc = "calls. This is because on failure all storage changes including events are"] + #[doc = "rolled back."] + pub struct DelegateCalled { + pub contract: ::subxt::utils::AccountId32, + pub code_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for DelegateCalled { + const PALLET: &'static str = "Contracts"; + const EVENT: &'static str = "DelegateCalled"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - pub fn claims( + #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."] + pub fn pristine_code( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Claims", + "Contracts", + "PristineCode", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ - 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, - 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, - 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, - 253u8, 91u8, 60u8, 88u8, 182u8, + 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8, + 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8, + 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8, + 78u8, 62u8, 170u8, 27u8, 105u8, ], ) } - pub fn claims_root( + #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."] + pub fn pristine_code_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Claims", + "Contracts", + "PristineCode", Vec::new(), [ - 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, - 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, - 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, - 253u8, 91u8, 60u8, 88u8, 182u8, - ], - ) - } - pub fn total( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Total", - vec![], - [ - 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, - 166u8, 174u8, 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, 171u8, - 36u8, 10u8, 6u8, 23u8, 19u8, 202u8, 3u8, 189u8, 29u8, 169u8, - 144u8, 187u8, 235u8, 77u8, + 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8, + 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8, + 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8, + 78u8, 62u8, 170u8, 27u8, 105u8, ], ) } - #[doc = " Vesting schedule for a claim."] - #[doc = " First balance is the total amount that should be held for vesting."] - #[doc = " Second balance is how much should be unlocked per block."] - #[doc = " The block number is when the vesting should start."] - pub fn vesting( + #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."] + pub fn code_storage( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - )>, + runtime_types::pallet_contracts::wasm::PrefabWasmModule, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Vesting", + "Contracts", + "CodeStorage", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ - 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, - 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, - 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, - 208u8, 80u8, 53u8, 25u8, 205u8, + 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8, + 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8, + 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8, + 80u8, 121u8, 46u8, 149u8, 48u8, ], ) } - #[doc = " Vesting schedule for a claim."] - #[doc = " First balance is the total amount that should be held for vesting."] - #[doc = " Second balance is how much should be unlocked per block."] - #[doc = " The block number is when the vesting should start."] - pub fn vesting_root( + #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."] + pub fn code_storage_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u128, - ::core::primitive::u128, - ::core::primitive::u32, - )>, + runtime_types::pallet_contracts::wasm::PrefabWasmModule, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Vesting", + "Contracts", + "CodeStorage", Vec::new(), [ - 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, - 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, - 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, - 208u8, 80u8, 53u8, 25u8, 205u8, + 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8, + 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8, + 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8, + 80u8, 121u8, 46u8, 149u8, 48u8, ], ) } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing( + #[doc = " A mapping between an original code hash and its owner information."] + pub fn owner_info_of( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, + runtime_types::pallet_contracts::wasm::OwnerInfo, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Signing", + "Contracts", + "OwnerInfoOf", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Identity, )], [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, - 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, - 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, - 17u8, 30u8, 125u8, 85u8, 107u8, + 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8, + 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8, + 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8, + 64u8, 71u8, 250u8, 202u8, 186u8, ], ) } - #[doc = " The statement kind that must be signed, if any."] - pub fn signing_root( + #[doc = " A mapping between an original code hash and its owner information."] + pub fn owner_info_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::claims::StatementKind, - >, + runtime_types::pallet_contracts::wasm::OwnerInfo, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Signing", + "Contracts", + "OwnerInfoOf", Vec::new(), [ - 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, - 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, - 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, - 17u8, 30u8, 125u8, 85u8, 107u8, + 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8, + 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8, + 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8, + 64u8, 71u8, 250u8, 202u8, 186u8, + ], + ) + } + #[doc = " This is a **monotonic** counter incremented on contract instantiation."] + #[doc = ""] + #[doc = " This is used in order to generate unique trie ids for contracts."] + #[doc = " The trie id of a new contract is calculated from hash(account_id, nonce)."] + #[doc = " The nonce is required because otherwise the following sequence would lead to"] + #[doc = " a possible collision of storage:"] + #[doc = ""] + #[doc = " 1. Create a new contract."] + #[doc = " 2. Terminate the contract."] + #[doc = " 3. Immediately recreate the contract with the same account_id."] + #[doc = ""] + #[doc = " This is bad because the contents of a trie are deleted lazily and there might be"] + #[doc = " storage of the old instantiation still in it when the new contract is created. Please"] + #[doc = " note that we can't replace the counter by the block number because the sequence above"] + #[doc = " can happen in the same block. We also can't keep the account counter in memory only"] + #[doc = " because storage is the only way to communicate across different extrinsics in the"] + #[doc = " same block."] + #[doc = ""] + #[doc = " # Note"] + #[doc = ""] + #[doc = " Do not use it to determine the number of contracts. It won't be decremented if"] + #[doc = " a contract is destroyed."] + pub fn nonce( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Contracts", + "Nonce", + vec![], + [ + 122u8, 169u8, 95u8, 131u8, 85u8, 32u8, 154u8, 114u8, 143u8, + 56u8, 12u8, 182u8, 64u8, 150u8, 241u8, 249u8, 254u8, 251u8, + 160u8, 235u8, 192u8, 41u8, 101u8, 232u8, 186u8, 108u8, 187u8, + 149u8, 210u8, 91u8, 179u8, 98u8, ], ) } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims( + #[doc = " The code associated with a given account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn contract_info_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + runtime_types::pallet_contracts::storage::ContractInfo, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Preclaims", + "Contracts", + "ContractInfoOf", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, + ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, - 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, - 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, - 184u8, 133u8, 214u8, 67u8, 95u8, + 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8, + 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8, + 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8, + 225u8, 242u8, 0u8, 171u8, 184u8, ], ) } - #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] - pub fn preclaims_root( + #[doc = " The code associated with a given account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn contract_info_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - >, + runtime_types::pallet_contracts::storage::ContractInfo, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Claims", - "Preclaims", + "Contracts", + "ContractInfoOf", Vec::new(), [ - 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, - 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, - 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, - 184u8, 133u8, 214u8, 67u8, 95u8, + 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8, + 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8, + 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8, + 225u8, 242u8, 0u8, 171u8, 184u8, + ], + ) + } + #[doc = " Evicted contracts that await child trie deletion."] + #[doc = ""] + #[doc = " Child trie deletion is a heavy operation depending on the amount of storage items"] + #[doc = " stored in said trie. Therefore this operation is performed lazily in `on_initialize`."] + pub fn deletion_queue( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_contracts::storage::DeletedContract, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Contracts", + "DeletionQueue", + vec![], + [ + 119u8, 169u8, 146u8, 210u8, 21u8, 216u8, 51u8, 225u8, 107u8, + 61u8, 42u8, 155u8, 169u8, 127u8, 140u8, 106u8, 255u8, 137u8, + 163u8, 199u8, 91u8, 137u8, 73u8, 61u8, 9u8, 167u8, 16u8, + 157u8, 183u8, 212u8, 35u8, 88u8, ], ) } @@ -14098,28 +14451,193 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn prefix( + #[doc = " Cost schedule and limits."] + pub fn schedule( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u8>, - >, + runtime_types::pallet_contracts::schedule::Schedule, + > { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "Schedule", + [ + 203u8, 98u8, 182u8, 130u8, 165u8, 6u8, 149u8, 28u8, 44u8, + 67u8, 79u8, 25u8, 47u8, 191u8, 183u8, 41u8, 65u8, 129u8, + 135u8, 29u8, 178u8, 224u8, 196u8, 247u8, 58u8, 215u8, 101u8, + 35u8, 77u8, 233u8, 60u8, 155u8, + ], + ) + } + #[doc = " The maximum number of contracts that can be pending for deletion."] + #[doc = ""] + #[doc = " When a contract is deleted by calling `seal_terminate` it becomes inaccessible"] + #[doc = " immediately, but the deletion of the storage items it has accumulated is performed"] + #[doc = " later. The contract is put into the deletion queue. This defines how many"] + #[doc = " contracts can be queued up at the same time. If that limit is reached `seal_terminate`"] + #[doc = " will fail. The action must be retried in a later block in that case."] + #[doc = ""] + #[doc = " The reasons for limiting the queue depth are:"] + #[doc = ""] + #[doc = " 1. The queue is in storage in order to be persistent between blocks. We want to limit"] + #[doc = " \tthe amount of storage that can be consumed."] + #[doc = " 2. The queue is stored in a vector and needs to be decoded as a whole when reading"] + #[doc = "\t\tit at the end of each block. Longer queues take more weight to decode and hence"] + #[doc = "\t\tlimit the amount of items that can be deleted per block."] + pub fn deletion_queue_depth( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "DeletionQueueDepth", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 weight that can be consumed per block for lazy trie removal."] + #[doc = ""] + #[doc = " The amount of weight that is dedicated per block to work on the deletion queue. Larger"] + #[doc = " values allow more trie keys to be deleted in each block but reduce the amount of"] + #[doc = " weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more"] + #[doc = " information about the deletion queue."] + pub fn deletion_weight_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, > { ::subxt::constants::StaticConstantAddress::new( - "Claims", - "Prefix", + "Contracts", + "DeletionWeightLimit", + [ + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, + ], + ) + } + #[doc = " The amount of balance a caller has to pay for each byte of storage."] + #[doc = ""] + #[doc = " # Note"] + #[doc = ""] + #[doc = " Changing this value for an existing chain might need a storage migration."] + pub fn deposit_per_byte( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "DepositPerByte", + [ + 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 balance a caller has to pay for each storage item."] + #[doc = ""] + #[doc = " # Note"] + #[doc = ""] + #[doc = " Changing this value for an existing chain might need a storage migration."] + pub fn deposit_per_item( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "DepositPerItem", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum length of a contract code in bytes. This limit applies to the instrumented"] + #[doc = " version of the code. Therefore `instantiate_with_code` can fail even when supplying"] + #[doc = " a wasm binary below this maximum size."] + pub fn max_code_len( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "MaxCodeLen", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 allowable length in bytes for storage keys."] + pub fn max_storage_key_len( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "MaxStorageKeyLen", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Make contract callable functions marked as `#[unstable]` available."] + #[doc = ""] + #[doc = " Contracts that use `#[unstable]` functions won't be able to be uploaded unless"] + #[doc = " this is set to `true`. This is only meant for testnets and dev nodes in order to"] + #[doc = " experiment with new features."] + #[doc = ""] + #[doc = " # Warning"] + #[doc = ""] + #[doc = " Do **not** set to `true` on productions chains."] + pub fn unsafe_unstable_interface( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::bool> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "UnsafeUnstableInterface", [ - 106u8, 50u8, 57u8, 116u8, 43u8, 202u8, 37u8, 248u8, 102u8, - 22u8, 62u8, 22u8, 242u8, 54u8, 152u8, 168u8, 107u8, 64u8, - 72u8, 172u8, 124u8, 40u8, 42u8, 110u8, 104u8, 145u8, 31u8, - 144u8, 242u8, 189u8, 145u8, 208u8, + 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 = " The maximum length of the debug buffer in bytes."] + pub fn max_debug_buffer_len( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Contracts", + "MaxDebugBufferLen", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, ], ) } } } } - pub mod vesting { + pub mod sudo { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -14136,7 +14654,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vest; + pub struct Sudo { + pub call: + ::std::boxed::Box, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14146,8 +14667,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestOther { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub struct SudoUncheckedWeight { + pub call: + ::std::boxed::Box, + pub weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14158,10 +14681,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestedTransfer { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, + pub struct SetKey { + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, } @@ -14174,211 +14696,141 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceVestedTransfer { - pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, + pub struct SudoAs { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MergeSchedules { - pub schedule1_index: ::core::primitive::u32, - pub schedule2_index: ::core::primitive::u32, + pub call: + ::std::boxed::Box, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] #[doc = "# "] - pub fn vest(&self) -> ::subxt::tx::StaticTxPayload { + pub fn sudo( + &self, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Vesting", - "vest", - Vest {}, + "Sudo", + "sudo", + Sudo { + call: ::std::boxed::Box::new(call), + }, [ - 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, - 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, - 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8, - 34u8, 21u8, 167u8, 172u8, 54u8, + 39u8, 81u8, 239u8, 54u8, 9u8, 239u8, 228u8, 35u8, 29u8, + 162u8, 137u8, 26u8, 33u8, 209u8, 203u8, 217u8, 55u8, 198u8, + 146u8, 12u8, 90u8, 202u8, 8u8, 44u8, 59u8, 233u8, 248u8, + 65u8, 187u8, 25u8, 112u8, 104u8, ], ) } - #[doc = "Unlock any vested funds of a `target` account."] + #[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 = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] + #[doc = "- O(1)."] + #[doc = "- The weight of this call is defined by the caller."] #[doc = "# "] - pub fn vest_other( + pub fn sudo_unchecked_weight( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - ) -> ::subxt::tx::StaticTxPayload { + call: runtime_types::kitchensink_runtime::RuntimeCall, + weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Vesting", - "vest_other", - VestOther { target }, + "Sudo", + "sudo_unchecked_weight", + SudoUncheckedWeight { + call: ::std::boxed::Box::new(call), + weight, + }, [ - 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, - 81u8, 243u8, 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, - 128u8, 90u8, 117u8, 164u8, 111u8, 0u8, 251u8, 148u8, 250u8, - 248u8, 102u8, 79u8, 165u8, 175u8, + 110u8, 148u8, 238u8, 215u8, 33u8, 6u8, 33u8, 114u8, 136u8, + 252u8, 6u8, 249u8, 188u8, 144u8, 15u8, 91u8, 1u8, 2u8, 215u8, + 122u8, 91u8, 170u8, 165u8, 115u8, 151u8, 124u8, 114u8, 21u8, + 205u8, 219u8, 93u8, 166u8, ], ) } - #[doc = "Create a vested transfer."] + #[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 = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB change."] #[doc = "# "] - pub fn vested_transfer( + pub fn set_key( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Vesting", - "vested_transfer", - VestedTransfer { target, schedule }, + "Sudo", + "set_key", + SetKey { new }, [ - 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, - 252u8, 75u8, 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, - 71u8, 108u8, 126u8, 118u8, 49u8, 122u8, 249u8, 132u8, 19u8, - 2u8, 132u8, 160u8, 247u8, 195u8, + 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 = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + 10,000."] #[doc = "# "] - pub fn force_vested_transfer( + pub fn sudo_as( &self, - source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Vesting", - "force_vested_transfer", - ForceVestedTransfer { - source, - target, - schedule, - }, - [ - 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, - 237u8, 242u8, 32u8, 88u8, 48u8, 220u8, 101u8, 210u8, 212u8, - 27u8, 7u8, 186u8, 98u8, 28u8, 197u8, 148u8, 140u8, 77u8, - 59u8, 202u8, 166u8, 63u8, 97u8, - ], - ) - } - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - pub fn merge_schedules( - &self, - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Vesting", - "merge_schedules", - MergeSchedules { - schedule1_index, - schedule2_index, + "Sudo", + "sudo_as", + SudoAs { + who, + call: ::std::boxed::Box::new(call), }, [ - 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, - 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, - 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8, - 157u8, 75u8, 4u8, 110u8, 125u8, + 203u8, 61u8, 12u8, 31u8, 150u8, 94u8, 184u8, 82u8, 65u8, + 219u8, 24u8, 150u8, 243u8, 104u8, 254u8, 115u8, 108u8, 154u8, + 200u8, 64u8, 89u8, 10u8, 4u8, 210u8, 230u8, 102u8, 135u8, + 27u8, 55u8, 49u8, 86u8, 237u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_vesting::pallet::Event; + pub type Event = runtime_types::pallet_sudo::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -14390,15 +14842,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - pub struct VestingUpdated { - pub account: ::subxt::utils::AccountId32, - pub unvested: ::core::primitive::u128, + #[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 VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; + impl ::subxt::events::StaticEvent for Sudid { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "Sudid"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14409,147 +14860,62 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An \\[account\\] has become fully vested."] - pub struct VestingCompleted { - pub account: ::subxt::utils::AccountId32, + #[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 VestingCompleted { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingCompleted"; + impl ::subxt::events::StaticEvent for KeyChanged { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "SudoAsDone"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting( + #[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::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - >, - ::subxt::storage::address::Yes, - (), + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Vesting", - "Vesting", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, - 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, - 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, - 168u8, 239u8, 212u8, 36u8, - ], - ) - } - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, - >, (), (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Vesting", - "Vesting", - Vec::new(), - [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, - 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, - 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, - 168u8, 239u8, 212u8, 36u8, - ], - ) - } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " New networks start with latest version, as determined by the genesis build."] - pub fn storage_version( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_vesting::Releases, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Vesting", - "StorageVersion", + "Sudo", + "Key", vec![], [ - 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, - 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, - 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8, - 94u8, 189u8, 23u8, 45u8, 191u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount transferred to call `vested_transfer`."] - pub fn min_vested_transfer( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Vesting", - "MinVestedTransfer", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - pub fn max_vesting_schedules( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Vesting", - "MaxVestingSchedules", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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, ], ) } } } } - pub mod utility { + pub mod im_online { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -14566,22 +14932,51 @@ pub mod api { )] #[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, + 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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + 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, + ], + ) + } } + } + #[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 :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14591,8 +14986,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BatchAll { - pub calls: ::std::vec::Vec, + #[doc = "A new heartbeat was received from `AuthorityId`."] + pub struct HeartbeatReceived { + pub authority_id: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + } + impl ::subxt::events::StaticEvent for HeartbeatReceived { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "HeartbeatReceived"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14603,10 +15004,11 @@ pub mod api { )] #[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, + #[doc = "At the end of the session, no offence was committed."] + pub struct AllGood; + impl ::subxt::events::StaticEvent for AllGood { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "AllGood"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14617,239 +15019,284 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceBatch { - pub calls: ::std::vec::Vec, + #[doc = "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, + >, + )>, } - 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`)."] + impl ::subxt::events::StaticEvent for SomeOffline { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "SomeOffline"; + } + } + 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 = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] - #[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 will return `Ok` in all circumstances. To determine the success of the batch, an"] - #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] - #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] - #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] - #[doc = "event is deposited."] - pub fn batch( + #[doc = " 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, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "batch", - Batch { calls }, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ImOnline", + "HeartbeatAfter", + vec![], [ - 243u8, 245u8, 145u8, 160u8, 31u8, 99u8, 157u8, 224u8, 164u8, - 104u8, 116u8, 163u8, 209u8, 121u8, 149u8, 251u8, 122u8, 66u8, - 50u8, 7u8, 190u8, 93u8, 155u8, 159u8, 70u8, 132u8, 23u8, - 55u8, 47u8, 202u8, 146u8, 168u8, + 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, ], ) } - #[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( + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( &self, - index: ::core::primitive::u16, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "as_derivative", - AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ImOnline", + "Keys", + vec![], [ - 93u8, 108u8, 41u8, 206u8, 109u8, 149u8, 77u8, 161u8, 27u8, - 247u8, 177u8, 201u8, 245u8, 248u8, 46u8, 53u8, 207u8, 62u8, - 10u8, 174u8, 240u8, 59u8, 186u8, 0u8, 197u8, 135u8, 181u8, - 94u8, 1u8, 132u8, 60u8, 233u8, + 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, ], ) } - #[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( + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats( &self, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "batch_all", - BatchAll { calls }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, + ::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, + ), + ], [ - 234u8, 106u8, 151u8, 10u8, 11u8, 227u8, 168u8, 197u8, 187u8, - 69u8, 202u8, 14u8, 120u8, 94u8, 156u8, 128u8, 103u8, 185u8, - 26u8, 181u8, 146u8, 249u8, 108u8, 67u8, 142u8, 209u8, 140u8, - 208u8, 2u8, 185u8, 175u8, 223u8, + 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, ], ) } - #[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( + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats_root( &self, - as_origin: runtime_types::polkadot_runtime::OriginCaller, - call: runtime_types::polkadot_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), - }, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::frame_support::traits::misc::WrapperOpaque< + runtime_types::pallet_im_online::BoundedOpaqueNetworkState, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ImOnline", + "ReceivedHeartbeats", + Vec::new(), [ - 148u8, 0u8, 144u8, 26u8, 218u8, 140u8, 68u8, 101u8, 15u8, - 56u8, 160u8, 237u8, 202u8, 222u8, 125u8, 100u8, 209u8, 101u8, - 159u8, 117u8, 218u8, 192u8, 55u8, 235u8, 171u8, 54u8, 86u8, - 206u8, 126u8, 188u8, 143u8, 253u8, + 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, ], ) } - #[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( + #[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, - calls: ::std::vec::Vec, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Utility", - "force_batch", - ForceBatch { calls }, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::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, + ), + ], + [ + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ImOnline", + "AuthoredBlocks", + Vec::new(), [ - 221u8, 22u8, 196u8, 62u8, 193u8, 137u8, 221u8, 234u8, 195u8, - 7u8, 133u8, 191u8, 243u8, 204u8, 109u8, 46u8, 94u8, 254u8, - 31u8, 16u8, 188u8, 65u8, 160u8, 80u8, 58u8, 202u8, 215u8, - 11u8, 99u8, 31u8, 12u8, 66u8, + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, ], ) } } } - #[doc = "\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 { + pub mod constants { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - pub struct BatchInterrupted { - pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, - } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed fully with no error."] - pub struct BatchCompleted; - impl ::subxt::events::StaticEvent for BatchCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompleted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed but has errors."] - pub struct BatchCompletedWithErrors; - impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompletedWithErrors"; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A configuration for base priority of unsigned transactions."] + #[doc = ""] + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - pub struct ItemCompleted; - impl ::subxt::events::StaticEvent for ItemCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemCompleted"; + } + } + pub mod authority_discovery { + use super::root_mod; + use super::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::StaticStorageAddress< + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::sp_authority_discovery::app::Public, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AuthorityDiscovery", + "Keys", + 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, + ], + ) + } + #[doc = " Keys of the next authority set."] + pub fn next_keys( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + runtime_types::sp_authority_discovery::app::Public, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AuthorityDiscovery", + "NextKeys", + vec![], + [ + 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, + ], + ) + } } + } + } + pub mod offences { + use super::root_mod; + use super::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, @@ -14859,51 +15306,231 @@ pub mod api { )] #[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 ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; + #[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>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A call was dispatched."] - pub struct DispatchedAs { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + impl ::subxt::events::StaticEvent for Offence { + const PALLET: &'static str = "Offences"; + const EVENT: &'static str = "Offence"; } - impl ::subxt::events::StaticEvent for DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; + } + 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::StaticStorageAddress< + 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::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Offences", + "Reports", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + ], + ) + } + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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::StaticStorageAddress::new( + "Offences", + "Reports", + 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, + ], + ) + } + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::subxt::utils::H256>, + ::subxt::storage::address::Yes, + ::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, + ), + ], + [ + 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, + ], + ) + } + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::subxt::utils::H256>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Offences", + "ConcurrentReportsIndex", + Vec::new(), + [ + 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, + ], + ) + } + #[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( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::core::primitive::u8>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Offences", + "ReportsByKindIndex", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + ], + ) + } + #[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( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::core::primitive::u8>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Offences", + "ReportsByKindIndex", + Vec::new(), + [ + 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, + 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, + 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, + 136u8, 98u8, 215u8, 180u8, 145u8, + ], + ) + } } } - pub mod constants { + } + pub mod historical { + use super::root_mod; + use super::runtime_types; + } + pub mod randomness_collective_flip { + use super::root_mod; + use super::runtime_types; + pub mod storage { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The limit on the number of batched calls."] - pub fn batched_calls_limit( + pub struct StorageApi; + impl StorageApi { + #[doc = " Series of block headers from the last 81 blocks that acts as random seed material. This"] + #[doc = " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of"] + #[doc = " the oldest hash."] + pub fn random_material( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::H256, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), > { - ::subxt::constants::StaticConstantAddress::new( - "Utility", - "batched_calls_limit", + ::subxt::storage::address::StaticStorageAddress::new( + "RandomnessCollectiveFlip", + "RandomMaterial", + 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, + 152u8, 126u8, 73u8, 88u8, 54u8, 147u8, 6u8, 19u8, 214u8, + 40u8, 159u8, 30u8, 236u8, 61u8, 240u8, 65u8, 178u8, 94u8, + 146u8, 152u8, 135u8, 252u8, 160u8, 86u8, 123u8, 114u8, 251u8, + 140u8, 98u8, 143u8, 217u8, 242u8, ], ) } @@ -14928,8 +15555,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddRegistrar { - pub account: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15025,7 +15654,10 @@ pub mod api { pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, - pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15055,7 +15687,10 @@ pub mod api { pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -15071,7 +15706,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KillIdentity { - pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15083,7 +15721,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub data: runtime_types::pallet_identity::types::Data, } #[derive( @@ -15096,7 +15737,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RenameSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, pub data: runtime_types::pallet_identity::types::Data, } #[derive( @@ -15109,7 +15753,10 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveSub { - pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15140,7 +15787,7 @@ pub mod api { &self, account: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -15148,10 +15795,10 @@ pub mod api { "add_registrar", AddRegistrar { account }, [ - 157u8, 232u8, 252u8, 190u8, 203u8, 233u8, 127u8, 63u8, 111u8, - 16u8, 118u8, 200u8, 31u8, 234u8, 144u8, 111u8, 161u8, 224u8, - 217u8, 86u8, 179u8, 254u8, 162u8, 212u8, 248u8, 8u8, 125u8, - 89u8, 23u8, 195u8, 4u8, 231u8, + 96u8, 200u8, 92u8, 23u8, 3u8, 144u8, 56u8, 53u8, 245u8, + 210u8, 33u8, 36u8, 183u8, 233u8, 41u8, 1u8, 127u8, 2u8, 25u8, + 5u8, 15u8, 133u8, 4u8, 107u8, 206u8, 155u8, 114u8, 39u8, + 14u8, 235u8, 115u8, 172u8, ], ) } @@ -15384,17 +16031,20 @@ pub mod api { pub fn set_account_id( &self, index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", "set_account_id", SetAccountId { index, new }, [ - 13u8, 91u8, 36u8, 7u8, 88u8, 64u8, 151u8, 104u8, 94u8, 174u8, - 195u8, 99u8, 97u8, 181u8, 236u8, 251u8, 26u8, 236u8, 234u8, - 40u8, 183u8, 38u8, 220u8, 216u8, 48u8, 115u8, 7u8, 230u8, - 216u8, 28u8, 123u8, 11u8, + 14u8, 154u8, 84u8, 48u8, 59u8, 133u8, 45u8, 204u8, 255u8, + 85u8, 157u8, 88u8, 56u8, 207u8, 113u8, 184u8, 233u8, 139u8, + 129u8, 118u8, 59u8, 9u8, 211u8, 184u8, 32u8, 141u8, 126u8, + 208u8, 179u8, 4u8, 2u8, 95u8, ], ) } @@ -15453,7 +16103,10 @@ pub mod api { pub fn provide_judgement( &self, reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -15469,10 +16122,10 @@ pub mod api { identity, }, [ - 147u8, 66u8, 29u8, 90u8, 149u8, 65u8, 161u8, 115u8, 12u8, - 254u8, 188u8, 248u8, 165u8, 115u8, 191u8, 2u8, 167u8, 223u8, - 199u8, 169u8, 203u8, 64u8, 101u8, 217u8, 73u8, 185u8, 93u8, - 109u8, 22u8, 184u8, 146u8, 73u8, + 83u8, 253u8, 77u8, 208u8, 198u8, 25u8, 202u8, 213u8, 223u8, + 184u8, 231u8, 185u8, 186u8, 216u8, 54u8, 62u8, 3u8, 7u8, + 107u8, 152u8, 126u8, 195u8, 175u8, 221u8, 134u8, 169u8, + 199u8, 124u8, 232u8, 157u8, 67u8, 75u8, ], ) } @@ -15497,17 +16150,20 @@ pub mod api { #[doc = "# "] pub fn kill_identity( &self, - target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", "kill_identity", KillIdentity { target }, [ - 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, - 136u8, 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, - 127u8, 216u8, 205u8, 117u8, 224u8, 121u8, 240u8, 231u8, - 126u8, 181u8, 230u8, 68u8, 13u8, 174u8, + 65u8, 106u8, 116u8, 209u8, 219u8, 181u8, 185u8, 75u8, 146u8, + 194u8, 187u8, 170u8, 7u8, 34u8, 140u8, 87u8, 107u8, 112u8, + 229u8, 34u8, 65u8, 71u8, 58u8, 152u8, 74u8, 253u8, 137u8, + 69u8, 149u8, 214u8, 158u8, 19u8, ], ) } @@ -15520,7 +16176,10 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn add_sub( &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -15528,10 +16187,10 @@ pub mod api { "add_sub", AddSub { sub, data }, [ - 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, - 147u8, 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, - 162u8, 173u8, 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, - 101u8, 250u8, 242u8, 24u8, 17u8, 84u8, + 206u8, 112u8, 143u8, 96u8, 152u8, 12u8, 174u8, 226u8, 23u8, + 27u8, 154u8, 188u8, 195u8, 233u8, 185u8, 180u8, 246u8, 218u8, + 154u8, 129u8, 138u8, 52u8, 212u8, 109u8, 54u8, 211u8, 219u8, + 255u8, 39u8, 79u8, 154u8, 123u8, ], ) } @@ -15541,7 +16200,10 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn rename_sub( &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( @@ -15549,10 +16211,10 @@ pub mod api { "rename_sub", RenameSub { sub, data }, [ - 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, - 85u8, 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, - 15u8, 89u8, 59u8, 57u8, 252u8, 163u8, 9u8, 138u8, 216u8, - 189u8, 177u8, 42u8, 96u8, 34u8, + 110u8, 28u8, 134u8, 225u8, 44u8, 242u8, 20u8, 22u8, 197u8, + 49u8, 173u8, 178u8, 106u8, 181u8, 103u8, 90u8, 27u8, 73u8, + 102u8, 130u8, 2u8, 216u8, 172u8, 186u8, 124u8, 244u8, 128u8, + 6u8, 112u8, 128u8, 25u8, 245u8, ], ) } @@ -15565,17 +16227,20 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn remove_sub( &self, - sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( "Identity", "remove_sub", RemoveSub { sub }, [ - 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, - 46u8, 157u8, 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, - 224u8, 149u8, 154u8, 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, - 105u8, 69u8, 213u8, 141u8, 124u8, + 92u8, 201u8, 70u8, 170u8, 248u8, 110u8, 179u8, 186u8, 213u8, + 197u8, 150u8, 156u8, 156u8, 50u8, 19u8, 158u8, 186u8, 61u8, + 106u8, 64u8, 84u8, 38u8, 73u8, 134u8, 132u8, 233u8, 50u8, + 152u8, 40u8, 18u8, 212u8, 121u8, ], ) } @@ -15803,10 +16468,8 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >, + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), @@ -15833,10 +16496,8 @@ pub mod api { pub fn identity_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_identity::types::Registration< - ::core::primitive::u128, - >, + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, >, (), (), @@ -15860,10 +16521,10 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, - )>, + ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, @@ -15888,10 +16549,10 @@ pub mod api { pub fn super_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, - )>, + ), (), (), ::subxt::storage::address::Yes, @@ -15917,12 +16578,12 @@ pub mod api { &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, - )>, + ), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -15950,12 +16611,12 @@ pub mod api { pub fn subs_of_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( + ( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, - )>, + ), (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, @@ -15979,13 +16640,11 @@ pub mod api { pub fn registrars( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::option::Option< - runtime_types::pallet_identity::types::RegistrarInfo< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_identity::types::RegistrarInfo< + ::core::primitive::u128, + ::subxt::utils::AccountId32, >, >, >, @@ -16014,9 +16673,8 @@ pub mod api { #[doc = " The amount held on deposit for a registered identity"] pub fn basic_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "BasicDeposit", @@ -16031,9 +16689,8 @@ pub mod api { #[doc = " The amount held on deposit per additional field for a registered identity."] pub fn field_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "FieldDeposit", @@ -16050,9 +16707,8 @@ pub mod api { #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] pub fn sub_account_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "SubAccountDeposit", @@ -16067,9 +16723,8 @@ pub mod api { #[doc = " The maximum number of sub-accounts allowed per identified account."] pub fn max_sub_accounts( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxSubAccounts", @@ -16085,9 +16740,8 @@ pub mod api { #[doc = " required to access an identity, but can be pretty high."] pub fn max_additional_fields( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxAdditionalFields", @@ -16103,9 +16757,8 @@ pub mod api { #[doc = " of, e.g., updating judgements."] pub fn max_registrars( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( "Identity", "MaxRegistrars", @@ -16120,7 +16773,7 @@ pub mod api { } } } - pub mod proxy { + pub mod society { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -16129,6 +16782,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16137,13 +16791,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proxy { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub force_proxy_type: - ::core::option::Option, - pub call: ::std::boxed::Box, + pub struct Bid { + pub value: ::core::primitive::u128, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16152,11 +16804,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddProxy { - pub delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, + pub struct Unbid { + pub pos: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16167,13 +16816,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxy { - pub delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, + pub struct Vouch { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub value: ::core::primitive::u128, + pub tip: ::core::primitive::u128, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16182,7 +16834,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxies; + pub struct Unvouch { + pub pos: ::core::primitive::u32, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -16192,10 +16846,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreatePure { - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, - pub index: ::core::primitive::u16, + pub struct Vote { + pub candidate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub approve: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16206,15 +16862,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPure { - pub spawner: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub index: ::core::primitive::u16, - #[codec(compact)] - pub height: ::core::primitive::u32, - #[codec(compact)] - pub ext_index: ::core::primitive::u32, + pub struct DefenderVote { + pub approve: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16225,9 +16874,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announce { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, + pub struct Payout; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Found { + pub founder: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub max_members: ::core::primitive::u32, + pub rules: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16238,9 +16901,22 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveAnnouncement { - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, + pub struct Unfound; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct JudgeSuspendedMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub forgive: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16251,12 +16927,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectAnnouncement { - pub delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub call_hash: ::subxt::utils::H256, + pub struct JudgeSuspendedCandidate { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub judgement: runtime_types::pallet_society::Judgement, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16265,359 +16944,513 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyAnnounced { - pub delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub force_proxy_type: - ::core::option::Option, - pub call: ::std::boxed::Box, + pub struct SetMaxMembers { + pub max: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] - #[doc = "`add_proxy`."] + #[doc = "A user outside of the society can make a bid for entry."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[doc = "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned"] + #[doc = "when the bid becomes a member, or if the bid calls `unbid`."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy( + #[doc = "- `value`: A one time payment the bid would like to receive when joining the society."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)"] + #[doc = "- Storage Reads:"] + #[doc = "\t- One storage read to check for suspended candidate. O(1)"] + #[doc = "\t- One storage read to check for suspended member. O(1)"] + #[doc = "\t- One storage read to retrieve all current bids. O(B)"] + #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] + #[doc = "\t- One storage read to retrieve all members. O(M)"] + #[doc = "- Storage Writes:"] + #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] + #[doc = " w/ read)"] + #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] + #[doc = "- Notable Computation:"] + #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] + #[doc = "\t- O(log B) search to insert the new bid sorted."] + #[doc = "- External Pallet Operations:"] + #[doc = "\t- One balance reserve operation. O(X)"] + #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] + #[doc = "- Events:"] + #[doc = "\t- One event for new bid."] + #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] + #[doc = ""] + #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] + #[doc = "# "] + pub fn bid( &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + value: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "proxy", - Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, + "Society", + "bid", + Bid { value }, [ - 2u8, 110u8, 54u8, 249u8, 204u8, 49u8, 0u8, 174u8, 55u8, 97u8, - 168u8, 240u8, 133u8, 33u8, 119u8, 57u8, 207u8, 107u8, 9u8, - 58u8, 91u8, 16u8, 97u8, 49u8, 136u8, 119u8, 180u8, 187u8, - 105u8, 150u8, 228u8, 140u8, + 101u8, 242u8, 48u8, 240u8, 74u8, 51u8, 49u8, 61u8, 6u8, 7u8, + 47u8, 200u8, 185u8, 217u8, 176u8, 139u8, 44u8, 167u8, 131u8, + 23u8, 219u8, 69u8, 216u8, 213u8, 177u8, 50u8, 8u8, 213u8, + 130u8, 90u8, 81u8, 4u8, ], ) } - #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = "A bidder can remove their bid for entry into society."] + #[doc = "By doing so, they will have their candidate deposit returned or"] + #[doc = "they will unvouch their voucher."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Payment: The bid deposit is unreserved if the user made a bid."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a bidder."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] - #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - pub fn add_proxy( + #[doc = "- `pos`: Position in the `Bids` vector of the bid who wants to unbid."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), X (balance unreserve)"] + #[doc = "- One storage read and write to retrieve and update the bids. O(B)"] + #[doc = "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(B + X)"] + #[doc = "# "] + pub fn unbid( &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + pos: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "add_proxy", - AddProxy { - delegate, - proxy_type, - delay, - }, + "Society", + "unbid", + Unbid { pos }, [ - 4u8, 227u8, 81u8, 178u8, 130u8, 182u8, 247u8, 112u8, 127u8, - 90u8, 105u8, 143u8, 65u8, 137u8, 181u8, 63u8, 204u8, 92u8, - 140u8, 38u8, 153u8, 233u8, 186u8, 226u8, 8u8, 76u8, 228u8, - 206u8, 174u8, 54u8, 23u8, 238u8, + 255u8, 165u8, 200u8, 241u8, 93u8, 213u8, 155u8, 12u8, 178u8, + 108u8, 222u8, 14u8, 26u8, 226u8, 107u8, 129u8, 162u8, 151u8, + 81u8, 83u8, 39u8, 106u8, 151u8, 149u8, 19u8, 85u8, 28u8, + 222u8, 227u8, 9u8, 189u8, 39u8, ], ) } - #[doc = "Unregister a proxy account for the sender."] + #[doc = "As a member, vouch for someone to join society by placing a bid on their behalf."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "There is no deposit required to vouch for a new bid, but a member can only vouch for"] + #[doc = "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by"] + #[doc = "the suspension judgement origin, the member will be banned from vouching again."] + #[doc = ""] + #[doc = "As a vouching member, you can claim a tip if the candidate is accepted. This tip will"] + #[doc = "be paid as a portion of the reward the member will receive for joining the society."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] - #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] - pub fn remove_proxy( + #[doc = "- `who`: The user who you would like to vouch for."] + #[doc = "- `value`: The total reward to be paid between you and the candidate if they become"] + #[doc = "a member in the society."] + #[doc = "- `tip`: Your cut of the total `value` payout when the candidate is inducted into"] + #[doc = "the society. Tips larger than `value` will be saturated upon payout."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), C (len of candidates), M (len of members)"] + #[doc = "- Storage Reads:"] + #[doc = "\t- One storage read to retrieve all members. O(M)"] + #[doc = "\t- One storage read to check member is not already vouching. O(1)"] + #[doc = "\t- One storage read to check for suspended candidate. O(1)"] + #[doc = "\t- One storage read to check for suspended member. O(1)"] + #[doc = "\t- One storage read to retrieve all current bids. O(B)"] + #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] + #[doc = "- Storage Writes:"] + #[doc = "\t- One storage write to insert vouching status to the member. O(1)"] + #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] + #[doc = " w/ read)"] + #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] + #[doc = "- Notable Computation:"] + #[doc = "\t- O(log M) search to check sender is a member."] + #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] + #[doc = "\t- O(log B) search to insert the new bid sorted."] + #[doc = "- External Pallet Operations:"] + #[doc = "\t- One balance reserve operation. O(X)"] + #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] + #[doc = "- Events:"] + #[doc = "\t- One event for vouch."] + #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] + #[doc = ""] + #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] + #[doc = "# "] + pub fn vouch( &self, - delegate: ::subxt::utils::MultiAddress< + who: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + value: ::core::primitive::u128, + tip: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "remove_proxy", - RemoveProxy { - delegate, - proxy_type, - delay, - }, + "Society", + "vouch", + Vouch { who, value, tip }, [ - 227u8, 7u8, 240u8, 130u8, 4u8, 168u8, 145u8, 107u8, 6u8, - 146u8, 138u8, 235u8, 245u8, 178u8, 168u8, 85u8, 104u8, 133u8, - 28u8, 93u8, 232u8, 99u8, 163u8, 75u8, 100u8, 113u8, 40u8, - 16u8, 238u8, 123u8, 169u8, 218u8, + 237u8, 190u8, 123u8, 221u8, 175u8, 83u8, 96u8, 83u8, 152u8, + 207u8, 134u8, 176u8, 124u8, 32u8, 23u8, 249u8, 153u8, 220u8, + 79u8, 164u8, 214u8, 231u8, 82u8, 204u8, 185u8, 245u8, 164u8, + 163u8, 59u8, 254u8, 184u8, 105u8, ], ) } - #[doc = "Unregister all proxy accounts for the sender."] + #[doc = "As a vouching member, unvouch a bid. This only works while vouched user is"] + #[doc = "only a bidder (and not a candidate)."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Signed_ and a vouching member."] #[doc = ""] - #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] - #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] - pub fn remove_proxies( + #[doc = "Parameters:"] + #[doc = "- `pos`: Position in the `Bids` vector of the bid who should be unvouched."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids)"] + #[doc = "- One storage read O(1) to check the signer is a vouching member."] + #[doc = "- One storage mutate to retrieve and update the bids. O(B)"] + #[doc = "- One vouching storage removal. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(B)"] + #[doc = "# "] + pub fn unvouch( &self, - ) -> ::subxt::tx::StaticTxPayload { + pos: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "remove_proxies", - RemoveProxies {}, + "Society", + "unvouch", + Unvouch { pos }, [ - 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, - 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, - 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, - 19u8, 23u8, 121u8, 129u8, + 242u8, 181u8, 109u8, 170u8, 197u8, 53u8, 8u8, 241u8, 47u8, + 28u8, 1u8, 209u8, 142u8, 106u8, 136u8, 163u8, 42u8, 169u8, + 7u8, 1u8, 202u8, 38u8, 199u8, 232u8, 13u8, 111u8, 92u8, 69u8, + 237u8, 90u8, 134u8, 84u8, ], ) } - #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] - #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = "As a member, vote on a candidate."] #[doc = ""] - #[doc = "Requires a `Signed` origin."] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] #[doc = ""] - #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] - #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] - #[doc = "allow for maximum flexibility."] - #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] - #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] - #[doc = "want to use `0`."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] + #[doc = "Parameters:"] + #[doc = "- `candidate`: The candidate that the member would like to bid on."] + #[doc = "- `approve`: A boolean which says if the candidate should be approved (`true`) or"] + #[doc = " rejected (`false`)."] #[doc = ""] - #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] - #[doc = "same sender, with the same parameters."] + #[doc = "# "] + #[doc = "Key: C (len of candidates), M (len of members)"] + #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] + #[doc = "- One account lookup."] + #[doc = "- One storage read O(C) and O(C) search to check that user is a candidate."] + #[doc = "- One storage write to add vote to votes. O(1)"] + #[doc = "- One event."] #[doc = ""] - #[doc = "Fails if there are insufficient funds to pay for deposit."] - pub fn create_pure( + #[doc = "Total Complexity: O(M + logM + C)"] + #[doc = "# "] + pub fn vote( &self, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { + candidate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + approve: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "create_pure", - CreatePure { - proxy_type, - delay, - index, - }, + "Society", + "vote", + Vote { candidate, approve }, [ - 65u8, 120u8, 166u8, 57u8, 89u8, 119u8, 161u8, 93u8, 184u8, - 203u8, 190u8, 29u8, 64u8, 238u8, 70u8, 17u8, 151u8, 227u8, - 170u8, 84u8, 21u8, 161u8, 171u8, 180u8, 193u8, 175u8, 211u8, - 228u8, 246u8, 216u8, 152u8, 91u8, + 92u8, 101u8, 248u8, 64u8, 78u8, 158u8, 63u8, 91u8, 0u8, 8u8, + 182u8, 117u8, 209u8, 190u8, 92u8, 35u8, 131u8, 121u8, 123u8, + 129u8, 36u8, 188u8, 65u8, 104u8, 229u8, 77u8, 159u8, 24u8, + 216u8, 77u8, 117u8, 29u8, ], ) } - #[doc = "Removes a previously spawned pure proxy."] + #[doc = "As a member, vote on the defender."] #[doc = ""] - #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] - #[doc = "inaccessible."] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] #[doc = ""] - #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] - #[doc = "`pure` with corresponding parameters."] + #[doc = "Parameters:"] + #[doc = "- `approve`: A boolean which says if the candidate should be"] + #[doc = "approved (`true`) or rejected (`false`)."] #[doc = ""] - #[doc = "- `spawner`: The account that originally called `pure` to create this account."] - #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] - #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] - #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] - #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = "# "] + #[doc = "- Key: M (len of members)"] + #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] + #[doc = "- One storage write to add vote to votes. O(1)"] + #[doc = "- One event."] #[doc = ""] - #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] - #[doc = "account whose `pure` call has corresponding parameters."] - pub fn kill_pure( + #[doc = "Total Complexity: O(M + logM)"] + #[doc = "# "] + pub fn defender_vote( &self, - spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - index: ::core::primitive::u16, - height: ::core::primitive::u32, - ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + approve: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "kill_pure", - KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - }, + "Society", + "defender_vote", + DefenderVote { approve }, [ - 67u8, 233u8, 31u8, 138u8, 222u8, 70u8, 182u8, 77u8, 103u8, - 39u8, 195u8, 35u8, 39u8, 89u8, 50u8, 248u8, 187u8, 101u8, - 170u8, 188u8, 87u8, 143u8, 6u8, 180u8, 178u8, 181u8, 158u8, - 111u8, 19u8, 139u8, 222u8, 208u8, + 248u8, 232u8, 243u8, 44u8, 252u8, 68u8, 118u8, 143u8, 57u8, + 34u8, 196u8, 4u8, 71u8, 14u8, 28u8, 164u8, 139u8, 184u8, + 20u8, 71u8, 86u8, 227u8, 172u8, 84u8, 213u8, 221u8, 155u8, + 198u8, 56u8, 93u8, 209u8, 211u8, ], ) } - #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = "Transfer the first matured payout for the sender and remove it from the records."] #[doc = ""] - #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] - #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = "NOTE: This extrinsic needs to be called multiple times to claim multiple matured"] + #[doc = "payouts."] #[doc = ""] - #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = "Payment: The member will receive a payment equal to their first matured"] + #[doc = "payout to their free balance."] #[doc = ""] - #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] - #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = "The dispatch origin for this call must be _Signed_ and a member with"] + #[doc = "payouts remaining."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = "# "] + #[doc = "Key: M (len of members), P (number of payouts for a particular member)"] + #[doc = "- One storage read O(M) and O(log M) search to check signer is a member."] + #[doc = "- One storage read O(P) to get all payouts for a member."] + #[doc = "- One storage read O(1) to get the current block number."] + #[doc = "- One currency transfer call. O(X)"] + #[doc = "- One storage write or removal to update the member's payouts. O(P)"] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + P + X)"] + #[doc = "# "] + pub fn payout(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Society", + "payout", + Payout {}, + [ + 255u8, 171u8, 227u8, 58u8, 244u8, 95u8, 239u8, 127u8, 129u8, + 211u8, 131u8, 191u8, 154u8, 234u8, 85u8, 69u8, 173u8, 135u8, + 179u8, 83u8, 17u8, 41u8, 34u8, 137u8, 174u8, 251u8, 127u8, + 62u8, 74u8, 255u8, 19u8, 234u8, + ], + ) + } + #[doc = "Found the society."] + #[doc = ""] + #[doc = "This is done as a discrete action in order to allow for the"] + #[doc = "pallet to be included into a running chain and can only be done once."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _FounderSetOrigin_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn announce( + #[doc = "- `founder` - The first member and head of the newly founded society."] + #[doc = "- `max_members` - The initial max number of members for the society."] + #[doc = "- `rules` - The rules of this society concerning membership."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Two storage mutates to set `Head` and `Founder`. O(1)"] + #[doc = "- One storage write to add the first member to society. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + pub fn found( &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { + founder: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + max_members: ::core::primitive::u32, + rules: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "announce", - Announce { real, call_hash }, + "Society", + "found", + Found { + founder, + max_members, + rules, + }, [ - 235u8, 116u8, 208u8, 53u8, 128u8, 91u8, 100u8, 68u8, 255u8, - 254u8, 119u8, 253u8, 108u8, 130u8, 88u8, 56u8, 113u8, 99u8, - 105u8, 179u8, 16u8, 143u8, 131u8, 203u8, 234u8, 76u8, 199u8, - 191u8, 35u8, 158u8, 130u8, 209u8, + 68u8, 18u8, 181u8, 102u8, 113u8, 16u8, 129u8, 67u8, 101u8, + 164u8, 35u8, 3u8, 182u8, 214u8, 181u8, 73u8, 42u8, 163u8, + 224u8, 110u8, 132u8, 185u8, 233u8, 239u8, 247u8, 143u8, 67u8, + 112u8, 116u8, 201u8, 236u8, 6u8, ], ) } - #[doc = "Remove a given announcement."] + #[doc = "Annul the founding of the society."] #[doc = ""] - #[doc = "May be called by a proxy account to remove a call they previously announced and return"] - #[doc = "the deposit."] + #[doc = "The dispatch origin for this call must be Signed, and the signing account must be both"] + #[doc = "the `Founder` and the `Head`. This implies that it may only be done when there is one"] + #[doc = "member."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "# "] + #[doc = "- Two storage reads O(1)."] + #[doc = "- Four storage removals O(1)."] + #[doc = "- One event."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn remove_announcement( - &self, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + pub fn unfound(&self) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "remove_announcement", - RemoveAnnouncement { real, call_hash }, + "Society", + "unfound", + Unfound {}, [ - 140u8, 186u8, 140u8, 129u8, 40u8, 124u8, 57u8, 61u8, 84u8, - 247u8, 123u8, 241u8, 148u8, 15u8, 94u8, 146u8, 121u8, 78u8, - 190u8, 68u8, 185u8, 125u8, 62u8, 49u8, 108u8, 131u8, 229u8, - 82u8, 68u8, 37u8, 184u8, 223u8, + 30u8, 120u8, 137u8, 175u8, 237u8, 121u8, 90u8, 9u8, 111u8, + 75u8, 51u8, 85u8, 86u8, 182u8, 6u8, 249u8, 62u8, 246u8, 21u8, + 150u8, 70u8, 148u8, 39u8, 14u8, 168u8, 250u8, 164u8, 235u8, + 23u8, 18u8, 164u8, 97u8, ], ) } - #[doc = "Remove the given announcement of a delegate."] + #[doc = "Allow suspension judgement origin to make judgement on a suspended member."] #[doc = ""] - #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] - #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = "If a suspended member is forgiven, we simply add them back as a member, not affecting"] + #[doc = "any of the existing storage items for that member."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "If a suspended member is rejected, remove all associated storage items, including"] + #[doc = "their payouts, and remove any vouched bids they currently have."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `delegate`: The account that previously announced the call."] - #[doc = "- `call_hash`: The hash of the call to be made."] - pub fn reject_announcement( + #[doc = "- `who` - The suspended member to be judged."] + #[doc = "- `forgive` - A boolean representing whether the suspension judgement origin forgives"] + #[doc = " (`true`) or rejects (`false`) a suspended member."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), M (len of members)"] + #[doc = "- One storage read to check `who` is a suspended member. O(1)"] + #[doc = "- Up to one storage write O(M) with O(log M) binary search to add a member back to"] + #[doc = " society."] + #[doc = "- Up to 3 storage removals O(1) to clean up a removed member."] + #[doc = "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids."] + #[doc = "- Up to one additional event if unvouch takes place."] + #[doc = "- One storage removal. O(1)"] + #[doc = "- One event for the judgement."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + B)"] + #[doc = "# "] + pub fn judge_suspended_member( &self, - delegate: ::subxt::utils::MultiAddress< + who: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { + forgive: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "reject_announcement", - RejectAnnouncement { - delegate, - call_hash, - }, + "Society", + "judge_suspended_member", + JudgeSuspendedMember { who, forgive }, [ - 225u8, 198u8, 31u8, 173u8, 157u8, 141u8, 121u8, 51u8, 226u8, - 170u8, 219u8, 86u8, 14u8, 131u8, 122u8, 157u8, 161u8, 200u8, - 157u8, 37u8, 43u8, 97u8, 143u8, 97u8, 46u8, 206u8, 204u8, - 42u8, 78u8, 33u8, 85u8, 127u8, + 230u8, 85u8, 37u8, 61u8, 138u8, 230u8, 105u8, 230u8, 248u8, + 209u8, 167u8, 1u8, 176u8, 226u8, 83u8, 166u8, 141u8, 232u8, + 186u8, 86u8, 222u8, 227u8, 229u8, 84u8, 113u8, 58u8, 13u8, + 45u8, 246u8, 132u8, 60u8, 82u8, ], ) } - #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] - #[doc = "`add_proxy`."] + #[doc = "Allow suspended judgement origin to make judgement on a suspended candidate."] #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[doc = "If the judgement is `Approve`, we add them to society as a member with the appropriate"] + #[doc = "payment for joining society."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back"] + #[doc = "to the society treasury, or we ban the voucher from vouching again."] + #[doc = ""] + #[doc = "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go"] + #[doc = "through the induction process again."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy_announced( + #[doc = "- `who` - The suspended candidate to be judged."] + #[doc = "- `judgement` - `Approve`, `Reject`, or `Rebid`."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), M (len of members), X (balance action)"] + #[doc = "- One storage read to check `who` is a suspended candidate."] + #[doc = "- One storage removal of the suspended candidate."] + #[doc = "- Approve Logic"] + #[doc = "\t- One storage read to get the available pot to pay users with. O(1)"] + #[doc = "\t- One storage write to update the available pot. O(1)"] + #[doc = "\t- One storage read to get the current block number. O(1)"] + #[doc = "\t- One storage read to get all members. O(M)"] + #[doc = "\t- Up to one unreserve currency action."] + #[doc = "\t- Up to two new storage writes to payouts."] + #[doc = "\t- Up to one storage write with O(log M) binary search to add a member to society."] + #[doc = "- Reject Logic"] + #[doc = "\t- Up to one repatriate reserved currency action. O(X)"] + #[doc = "\t- Up to one storage write to ban the vouching member from vouching again."] + #[doc = "- Rebid Logic"] + #[doc = "\t- Storage mutate with O(log B) binary search to place the user back into bids."] + #[doc = "- Up to one additional event if unvouch takes place."] + #[doc = "- One storage removal."] + #[doc = "- One event for the judgement."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + B + X)"] + #[doc = "# "] + pub fn judge_suspended_candidate( &self, - delegate: ::subxt::utils::MultiAddress< + who: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), - >, - real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, >, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + judgement: runtime_types::pallet_society::Judgement, + ) -> ::subxt::tx::StaticTxPayload + { ::subxt::tx::StaticTxPayload::new( - "Proxy", - "proxy_announced", - ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, + "Society", + "judge_suspended_candidate", + JudgeSuspendedCandidate { who, judgement }, + [ + 233u8, 241u8, 151u8, 219u8, 217u8, 131u8, 112u8, 172u8, + 227u8, 93u8, 244u8, 214u8, 14u8, 183u8, 133u8, 74u8, 174u8, + 141u8, 235u8, 189u8, 52u8, 146u8, 62u8, 254u8, 248u8, 60u8, + 129u8, 109u8, 164u8, 54u8, 37u8, 237u8, + ], + ) + } + #[doc = "Allows root origin to change the maximum number of members in society."] + #[doc = "Max membership count must be greater than 1."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from _ROOT_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `max` - The maximum number of members for the society."] + #[doc = ""] + #[doc = "# "] + #[doc = "- One storage write to update the max. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + pub fn set_max_members( + &self, + max: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Society", + "set_max_members", + SetMaxMembers { max }, [ - 201u8, 208u8, 101u8, 152u8, 52u8, 146u8, 71u8, 255u8, 2u8, - 250u8, 225u8, 24u8, 117u8, 32u8, 113u8, 251u8, 230u8, 233u8, - 30u8, 187u8, 194u8, 116u8, 65u8, 51u8, 142u8, 106u8, 91u8, - 178u8, 193u8, 170u8, 150u8, 118u8, + 4u8, 120u8, 194u8, 207u8, 5u8, 93u8, 40u8, 12u8, 1u8, 151u8, + 127u8, 162u8, 218u8, 228u8, 1u8, 249u8, 148u8, 139u8, 124u8, + 171u8, 94u8, 151u8, 40u8, 164u8, 171u8, 122u8, 65u8, 233u8, + 27u8, 82u8, 74u8, 67u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_proxy::pallet::Event; + pub type Event = runtime_types::pallet_society::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -16629,14 +17462,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was executed correctly, with the given."] - pub struct ProxyExecuted { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "The society is founded by the given identity."] + pub struct Founded { + pub founder: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ProxyExecuted { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyExecuted"; + impl ::subxt::events::StaticEvent for Founded { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Founded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16647,17 +17479,123 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - pub struct PureCreated { - pub pure: ::subxt::utils::AccountId32, + #[doc = "A membership bid just happened. The given account is the candidate's ID and their offer"] + #[doc = "is the second."] + pub struct Bid { + pub candidate_id: ::subxt::utils::AccountId32, + pub offer: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Bid { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Bid"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A membership bid just happened by vouching. The given account is the candidate's ID and"] + #[doc = "their offer is the second. The vouching party is the third."] + pub struct Vouch { + pub candidate_id: ::subxt::utils::AccountId32, + pub offer: ::core::primitive::u128, + pub vouching: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Vouch { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Vouch"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was dropped (due to an excess of bids in the system)."] + pub struct AutoUnbid { + pub candidate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for AutoUnbid { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "AutoUnbid"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was dropped (by their request)."] + pub struct Unbid { + pub candidate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Unbid { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Unbid"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A candidate was dropped (by request of who vouched for them)."] + pub struct Unvouch { + pub candidate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Unvouch { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Unvouch"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A group of candidates have been inducted. The batch's primary is the first value, the"] + #[doc = "batch in full is the second."] + pub struct Inducted { + pub primary: ::subxt::utils::AccountId32, + pub candidates: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for Inducted { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Inducted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A suspended member has been judged."] + pub struct SuspendedMemberJudgement { pub who: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, + pub judged: ::core::primitive::bool, } - impl ::subxt::events::StaticEvent for PureCreated { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "PureCreated"; + impl ::subxt::events::StaticEvent for SuspendedMemberJudgement { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "SuspendedMemberJudgement"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16668,15 +17606,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An announcement was placed to make a call in the future."] - pub struct Announced { - pub real: ::subxt::utils::AccountId32, - pub proxy: ::subxt::utils::AccountId32, - pub call_hash: ::subxt::utils::H256, + #[doc = "A candidate has been suspended"] + pub struct CandidateSuspended { + pub candidate: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Announced { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "Announced"; + impl ::subxt::events::StaticEvent for CandidateSuspended { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "CandidateSuspended"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16687,16 +17623,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was added."] - pub struct ProxyAdded { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, + #[doc = "A member has been suspended"] + pub struct MemberSuspended { + pub member: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ProxyAdded { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyAdded"; + impl ::subxt::events::StaticEvent for MemberSuspended { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "MemberSuspended"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16707,149 +17640,647 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was removed."] - pub struct ProxyRemoved { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::polkadot_runtime::ProxyType, - pub delay: ::core::primitive::u32, + #[doc = "A member has been challenged"] + pub struct Challenged { + pub member: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ProxyRemoved { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyRemoved"; + impl ::subxt::events::StaticEvent for Challenged { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Challenged"; } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies( + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A vote has been placed"] + pub struct Vote { + pub candidate: ::subxt::utils::AccountId32, + pub voter: ::subxt::utils::AccountId32, + pub vote: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Vote { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Vote"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A vote has been placed for a defending member"] + pub struct DefenderVote { + pub voter: ::subxt::utils::AccountId32, + pub vote: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for DefenderVote { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "DefenderVote"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new \\[max\\] member count has been set"] + pub struct NewMaxMembers { + pub max: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for NewMaxMembers { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "NewMaxMembers"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Society is unfounded."] + pub struct Unfounded { + pub founder: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Unfounded { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Unfounded"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some funds were deposited into the society account."] + pub struct Deposit { + pub value: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Deposit { + const PALLET: &'static str = "Society"; + const EVENT: &'static str = "Deposit"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The first member."] + pub fn founder( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Founder", + vec![], + [ + 50u8, 222u8, 149u8, 14u8, 31u8, 163u8, 129u8, 123u8, 150u8, + 220u8, 16u8, 136u8, 150u8, 245u8, 171u8, 231u8, 75u8, 203u8, + 249u8, 123u8, 86u8, 43u8, 208u8, 65u8, 41u8, 111u8, 114u8, + 254u8, 131u8, 13u8, 26u8, 43u8, + ], + ) + } + #[doc = " A hash of the rules of this society concerning membership. Can only be set once and"] + #[doc = " only by the founder."] + pub fn rules( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Rules", + vec![], + [ + 10u8, 206u8, 100u8, 24u8, 227u8, 138u8, 82u8, 125u8, 247u8, + 160u8, 124u8, 121u8, 148u8, 98u8, 252u8, 214u8, 215u8, 232u8, + 160u8, 204u8, 23u8, 95u8, 240u8, 16u8, 201u8, 245u8, 13u8, + 178u8, 99u8, 61u8, 247u8, 137u8, + ], + ) + } + #[doc = " The current set of candidates; bidders that are attempting to become members."] + pub fn candidates( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec< + runtime_types::pallet_society::Bid< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Candidates", + vec![], + [ + 88u8, 231u8, 247u8, 115u8, 122u8, 18u8, 106u8, 195u8, 238u8, + 219u8, 174u8, 23u8, 179u8, 228u8, 82u8, 26u8, 141u8, 190u8, + 206u8, 46u8, 177u8, 218u8, 123u8, 152u8, 208u8, 79u8, 57u8, + 68u8, 3u8, 208u8, 174u8, 193u8, + ], + ) + } + #[doc = " The set of suspended candidates."] + pub fn suspended_candidates( &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_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, + ( + ::core::primitive::u128, + runtime_types::pallet_society::BidKind< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "SuspendedCandidates", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8, + 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8, + 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8, + 168u8, 148u8, 154u8, 57u8, 70u8, + ], + ) + } + #[doc = " The set of suspended candidates."] + pub fn suspended_candidates_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( ::core::primitive::u128, - )>, + runtime_types::pallet_society::BidKind< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ), + (), + (), ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "SuspendedCandidates", + Vec::new(), + [ + 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8, + 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8, + 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8, + 168u8, 148u8, 154u8, 57u8, 70u8, + ], + ) + } + #[doc = " Amount of our account balance that is specifically for the next round's bid(s)."] + pub fn pot( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Proxies", + "Society", + "Pot", + vec![], + [ + 242u8, 124u8, 22u8, 252u8, 4u8, 178u8, 161u8, 120u8, 8u8, + 185u8, 182u8, 177u8, 205u8, 205u8, 192u8, 248u8, 42u8, 8u8, + 216u8, 92u8, 194u8, 219u8, 74u8, 248u8, 135u8, 105u8, 210u8, + 207u8, 159u8, 24u8, 149u8, 190u8, + ], + ) + } + #[doc = " The most primary from the most recently approved members."] + pub fn head( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Head", + vec![], + [ + 162u8, 185u8, 82u8, 237u8, 221u8, 60u8, 77u8, 96u8, 89u8, + 41u8, 162u8, 7u8, 174u8, 251u8, 121u8, 247u8, 196u8, 118u8, + 57u8, 24u8, 142u8, 129u8, 142u8, 106u8, 166u8, 7u8, 86u8, + 54u8, 108u8, 110u8, 118u8, 75u8, + ], + ) + } + #[doc = " The current set of members, ordered."] + pub fn members( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Members", + vec![], + [ + 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, + 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, + 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, + 71u8, 125u8, 56u8, 129u8, 222u8, + ], + ) + } + #[doc = " The set of suspended members."] + pub fn suspended_members( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "SuspendedMembers", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, - 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, - 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, - 67u8, 161u8, 103u8, 248u8, 14u8, + 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8, + 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8, + 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8, + 53u8, 79u8, 163u8, 65u8, 57u8, ], ) } - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies_root( + #[doc = " The set of suspended members."] + pub fn suspended_members_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::polkadot_runtime::ProxyType, - ::core::primitive::u32, - >, + ::core::primitive::bool, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "SuspendedMembers", + Vec::new(), + [ + 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8, + 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8, + 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8, + 53u8, 79u8, 163u8, 65u8, 57u8, + ], + ) + } + #[doc = " The current bids, stored ordered by the value of the bid."] + pub fn bids( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec< + runtime_types::pallet_society::Bid< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, - ::core::primitive::u128, - )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Bids", + vec![], + [ + 8u8, 152u8, 107u8, 47u8, 7u8, 45u8, 86u8, 149u8, 230u8, 81u8, + 253u8, 110u8, 255u8, 83u8, 16u8, 168u8, 169u8, 70u8, 196u8, + 167u8, 168u8, 98u8, 36u8, 122u8, 124u8, 77u8, 61u8, 245u8, + 248u8, 48u8, 224u8, 125u8, + ], + ) + } + #[doc = " Members currently vouching or banned from vouching again"] + pub fn vouching( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::VouchingStatus, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Proxies", + "Society", + "Vouching", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8, + 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8, + 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8, + 223u8, 15u8, 56u8, 223u8, 96u8, + ], + ) + } + #[doc = " Members currently vouching or banned from vouching again"] + pub fn vouching_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::VouchingStatus, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Vouching", Vec::new(), [ - 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, - 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, - 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, - 67u8, 161u8, 103u8, 248u8, 14u8, + 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8, + 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8, + 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8, + 223u8, 15u8, 56u8, 223u8, 96u8, ], ) } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements( + #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."] + pub fn payouts( &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_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - )>, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Announcements", + "Society", + "Payouts", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, - 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, - 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, - 237u8, 103u8, 217u8, 53u8, + 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8, + 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8, + 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8, + 229u8, 69u8, 181u8, 196u8, 202u8, ], ) } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements_root( + #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."] + pub fn payouts_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - )>, + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Announcements", + "Society", + "Payouts", Vec::new(), [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, - 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, - 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, - 237u8, 103u8, 217u8, 53u8, + 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8, + 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8, + 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8, + 229u8, 69u8, 181u8, 196u8, 202u8, + ], + ) + } + #[doc = " The ongoing number of losing votes cast by the member."] + pub fn strikes( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Strikes", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8, + 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8, + 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8, + 238u8, 109u8, 255u8, 64u8, 135u8, + ], + ) + } + #[doc = " The ongoing number of losing votes cast by the member."] + pub fn strikes_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Strikes", + Vec::new(), + [ + 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8, + 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8, + 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8, + 238u8, 109u8, 255u8, 64u8, 135u8, + ], + ) + } + #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."] + pub fn votes( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::Vote, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Votes", + 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, + ), + ], + [ + 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8, + 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8, + 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8, + 136u8, 245u8, 150u8, 102u8, 77u8, + ], + ) + } + #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."] + pub fn votes_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::Vote, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Votes", + Vec::new(), + [ + 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8, + 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8, + 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8, + 136u8, 245u8, 150u8, 102u8, 77u8, + ], + ) + } + #[doc = " The defending member currently being challenged."] + pub fn defender( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "Defender", + vec![], + [ + 116u8, 251u8, 243u8, 93u8, 242u8, 69u8, 62u8, 163u8, 154u8, + 55u8, 243u8, 204u8, 205u8, 210u8, 205u8, 5u8, 202u8, 177u8, + 153u8, 199u8, 126u8, 142u8, 248u8, 65u8, 88u8, 226u8, 101u8, + 116u8, 74u8, 170u8, 93u8, 146u8, + ], + ) + } + #[doc = " Votes for the defender."] + pub fn defender_votes( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::Vote, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "DefenderVotes", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8, + 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8, + 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8, + 218u8, 47u8, 145u8, 163u8, 245u8, + ], + ) + } + #[doc = " Votes for the defender."] + pub fn defender_votes_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_society::Vote, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "DefenderVotes", + Vec::new(), + [ + 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8, + 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8, + 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8, + 218u8, 47u8, 145u8, 163u8, 245u8, + ], + ) + } + #[doc = " The max number of members for the society at one time."] + pub fn max_members( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Society", + "MaxMembers", + vec![], + [ + 54u8, 113u8, 4u8, 248u8, 5u8, 42u8, 67u8, 237u8, 91u8, 159u8, + 63u8, 239u8, 3u8, 196u8, 202u8, 135u8, 182u8, 137u8, 204u8, + 58u8, 39u8, 11u8, 42u8, 79u8, 129u8, 85u8, 37u8, 154u8, + 178u8, 189u8, 123u8, 184u8, ], ) } @@ -16859,18 +18290,31 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a proxy."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] - pub fn proxy_deposit_base( + #[doc = " The societies's pallet id"] + pub fn pallet_id( &self, ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + runtime_types::frame_support::PalletId, > { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "ProxyDepositBase", + "Society", + "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, + ], + ) + } + #[doc = " The minimum amount of a deposit required for a bid to be made."] + pub fn candidate_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Society", + "CandidateDeposit", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -16879,19 +18323,15 @@ pub mod api { ], ) } - #[doc = " The amount of currency needed per proxy added."] - #[doc = ""] - #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] - #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] - #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] - pub fn proxy_deposit_factor( + #[doc = " The amount of the unpaid reward that gets deducted in the case that either a skeptic"] + #[doc = " doesn't vote or someone votes in the wrong way."] + pub fn wrong_side_deduction( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "ProxyDepositFactor", + "Society", + "WrongSideDeduction", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -16900,15 +18340,15 @@ pub mod api { ], ) } - #[doc = " The maximum amount of proxies allowed for a single account."] - pub fn max_proxies( + #[doc = " The number of times a member may vote the wrong way (or not at all, when they are a"] + #[doc = " skeptic) before they become suspended."] + pub fn max_strikes( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "MaxProxies", + "Society", + "MaxStrikes", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -16917,15 +18357,30 @@ pub mod api { ], ) } - #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] - pub fn max_pending( + #[doc = " The amount of incentive paid within each period. Doesn't include VoterTip."] + pub fn period_spend( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "MaxPending", + "Society", + "PeriodSpend", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The number of blocks between candidate/membership rotation periods."] + pub fn rotation_period( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Society", + "RotationPeriod", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -16934,51 +18389,59 @@ pub mod api { ], ) } - #[doc = " The base amount of currency needed to reserve for creating an announcement."] - #[doc = ""] - #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] - #[doc = " bytes)."] - pub fn announcement_deposit_base( + #[doc = " The maximum duration of the payout lock."] + pub fn max_lock_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "AnnouncementDepositBase", + "Society", + "MaxLockDuration", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, ], ) } - #[doc = " The amount of currency needed per announcement made."] - #[doc = ""] - #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] - #[doc = " into a pre-existing storage value."] - pub fn announcement_deposit_factor( + #[doc = " The number of blocks between membership challenges."] + pub fn challenge_period( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "AnnouncementDepositFactor", + "Society", + "ChallengePeriod", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, ], ) } - } - } - } - pub mod multisig { - use super::root_mod; + #[doc = " The maximum number of candidates that we accept per round."] + pub fn max_candidate_intake( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Society", + "MaxCandidateIntake", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 recovery { + use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub mod calls { @@ -16994,9 +18457,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMultiThreshold1 { - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub call: ::std::boxed::Box, + pub struct AsRecovered { + pub account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub call: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17007,14 +18474,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub struct SetRecovered { + pub lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - pub call: ::std::boxed::Box, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17025,14 +18493,25 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveAsMulti { + pub struct CreateRecovery { + pub friends: ::std::vec::Vec<::subxt::utils::AccountId32>, 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 delay_period: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct InitiateRecovery { + pub account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17043,243 +18522,352 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub call_hash: [::core::primitive::u8; 32usize], + pub struct VouchRecovery { + pub lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimRecovery { + pub account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseRecovery { + pub rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveRecovery; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelRecovered { + pub account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } 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 = "Send a call through a recovered account."] #[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 = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] #[doc = ""] - #[doc = "# "] - #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi_threshold_1( + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] + #[doc = "- `call`: The call you want to make with the recovered account."] + pub fn as_recovered( &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::polkadot_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Multisig", - "as_multi_threshold_1", - AsMultiThreshold1 { - other_signatories, + "Recovery", + "as_recovered", + AsRecovered { + account, call: ::std::boxed::Box::new(call), }, [ - 147u8, 128u8, 190u8, 162u8, 129u8, 151u8, 240u8, 184u8, 12u8, - 100u8, 188u8, 81u8, 25u8, 140u8, 46u8, 215u8, 52u8, 135u8, - 134u8, 207u8, 40u8, 221u8, 114u8, 48u8, 102u8, 107u8, 173u8, - 90u8, 74u8, 56u8, 147u8, 238u8, + 199u8, 66u8, 182u8, 13u8, 27u8, 192u8, 252u8, 154u8, 31u8, + 100u8, 135u8, 160u8, 11u8, 125u8, 251u8, 47u8, 211u8, 6u8, + 200u8, 81u8, 22u8, 111u8, 129u8, 161u8, 167u8, 62u8, 47u8, + 202u8, 99u8, 9u8, 23u8, 237u8, ], ) } - #[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 = "Allow ROOT to bypass the recovery process and set an a rescuer account"] + #[doc = "for a lost account directly."] #[doc = ""] - #[doc = "If there are enough, then dispatch the call."] + #[doc = "The dispatch origin for this call must be _ROOT_."] #[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 = "Parameters:"] + #[doc = "- `lost`: The \"lost account\" to be recovered."] + #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] + pub fn set_recovered( + &self, + lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Recovery", + "set_recovered", + SetRecovered { lost, rescuer }, + [ + 149u8, 123u8, 98u8, 179u8, 7u8, 149u8, 38u8, 221u8, 25u8, + 244u8, 176u8, 243u8, 202u8, 6u8, 228u8, 39u8, 248u8, 32u8, + 146u8, 140u8, 235u8, 21u8, 181u8, 18u8, 105u8, 44u8, 15u8, + 221u8, 82u8, 233u8, 133u8, 51u8, + ], + ) + } + #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] + #[doc = ""] + #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] + #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] + #[doc = "in full when the user calls `remove_recovery`."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "- `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 = "Parameters:"] + #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] + #[doc = " ordered and contain no duplicate values."] + #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] + #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] + #[doc = " friends."] + #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] + #[doc = " needs to pass before the account can be recovered."] + pub fn create_recovery( + &self, + friends: ::std::vec::Vec<::subxt::utils::AccountId32>, + threshold: ::core::primitive::u16, + delay_period: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Recovery", + "create_recovery", + CreateRecovery { + friends, + threshold, + delay_period, + }, + [ + 80u8, 233u8, 68u8, 224u8, 181u8, 127u8, 8u8, 35u8, 135u8, + 121u8, 73u8, 25u8, 255u8, 192u8, 177u8, 140u8, 67u8, 113u8, + 112u8, 35u8, 63u8, 96u8, 1u8, 138u8, 93u8, 27u8, 219u8, 52u8, + 74u8, 251u8, 65u8, 96u8, + ], + ) + } + #[doc = "Initiate the process for recovering a recoverable account."] #[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 = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] + #[doc = "recovery process. This deposit will always be repatriated to the account"] + #[doc = "trying to be recovered. See `close_recovery`."] #[doc = ""] - #[doc = "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 = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S + Z + Call)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- The weight of the `call`."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Reads: Multisig Storage, [Caller Account]"] - #[doc = " - Writes: Multisig Storage, [Caller Account]"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi( + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] + #[doc = " recoverable (i.e. have a recovery configuration)."] + pub fn initiate_recovery( &self, - 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>, + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - call: runtime_types::polkadot_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Multisig", - "as_multi", - AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call: ::std::boxed::Box::new(call), - max_weight, - }, + "Recovery", + "initiate_recovery", + InitiateRecovery { account }, [ - 223u8, 45u8, 132u8, 89u8, 48u8, 61u8, 93u8, 46u8, 76u8, 28u8, - 217u8, 194u8, 89u8, 170u8, 245u8, 6u8, 76u8, 50u8, 12u8, - 133u8, 230u8, 10u8, 56u8, 231u8, 29u8, 202u8, 60u8, 50u8, - 181u8, 144u8, 238u8, 151u8, + 140u8, 244u8, 135u8, 122u8, 61u8, 107u8, 212u8, 100u8, 212u8, + 11u8, 216u8, 47u8, 113u8, 155u8, 121u8, 232u8, 158u8, 26u8, + 229u8, 82u8, 231u8, 193u8, 225u8, 2u8, 112u8, 220u8, 40u8, + 104u8, 36u8, 17u8, 164u8, 124u8, ], ) } - #[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 = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] + #[doc = "process for that account."] #[doc = ""] - #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] - #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] - #[doc = "is cancelled."] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] + #[doc = "for the recoverable account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Parameters:"] + #[doc = "- `lost`: The lost account that you want to recover."] + #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] #[doc = ""] - #[doc = "- `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 = "The combination of these two parameters must point to an active recovery"] + #[doc = "process."] + pub fn vouch_recovery( + &self, + lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Recovery", + "vouch_recovery", + VouchRecovery { lost, rescuer }, + [ + 188u8, 113u8, 2u8, 31u8, 149u8, 123u8, 248u8, 46u8, 211u8, + 88u8, 121u8, 207u8, 227u8, 92u8, 198u8, 199u8, 29u8, 216u8, + 84u8, 140u8, 169u8, 154u8, 240u8, 183u8, 140u8, 203u8, 223u8, + 82u8, 222u8, 187u8, 20u8, 21u8, + ], + ) + } + #[doc = "Allow a successful rescuer to claim their recovered account."] #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] + #[doc = "who has successfully completed the account recovery process: collected"] + #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] - #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] - #[doc = "- One event."] - #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] - #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account]"] - #[doc = " - Write: Multisig Storage, [Caller Account]"] - #[doc = "# "] - pub fn approve_as_multi( + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] + #[doc = " you."] + pub fn claim_recovery( &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>, + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - call_hash: [::core::primitive::u8; 32usize], - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Multisig", - "approve_as_multi", - ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, - }, + "Recovery", + "claim_recovery", + ClaimRecovery { account }, [ - 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, + 60u8, 49u8, 116u8, 129u8, 138u8, 95u8, 243u8, 120u8, 231u8, + 20u8, 149u8, 37u8, 56u8, 209u8, 196u8, 177u8, 186u8, 175u8, + 58u8, 203u8, 226u8, 89u8, 80u8, 212u8, 12u8, 17u8, 119u8, + 163u8, 74u8, 164u8, 180u8, 187u8, ], ) } - #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] - #[doc = "for this operation will be unreserved on success."] + #[doc = "As the controller of a recoverable account, close an active recovery"] + #[doc = "process for your account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Payment: By calling this function, the recoverable account will receive"] + #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] #[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 = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account with an active recovery process for it."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- One event."] - #[doc = "- I/O: 1 read `O(S)`, one remove."] - #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] - pub fn cancel_as_multi( + #[doc = "Parameters:"] + #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] + pub fn close_recovery( &self, - threshold: ::core::primitive::u16, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - timepoint: runtime_types::pallet_multisig::Timepoint< + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, >, - call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Multisig", - "cancel_as_multi", - CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, - }, + "Recovery", + "close_recovery", + CloseRecovery { rescuer }, [ - 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, + 61u8, 242u8, 216u8, 157u8, 103u8, 149u8, 121u8, 151u8, 132u8, + 247u8, 95u8, 157u8, 178u8, 27u8, 100u8, 222u8, 72u8, 188u8, + 168u8, 64u8, 63u8, 135u8, 248u8, 133u8, 177u8, 15u8, 205u8, + 146u8, 98u8, 79u8, 135u8, 157u8, + ], + ) + } + #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] + #[doc = ""] + #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] + #[doc = "recovery attempts before calling this function else it will fail."] + #[doc = ""] + #[doc = "Payment: By calling this function the recoverable account will unreserve"] + #[doc = "their recovery configuration deposit."] + #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account (i.e. has a recovery configuration)."] + pub fn remove_recovery( + &self, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Recovery", + "remove_recovery", + RemoveRecovery {}, + [ + 14u8, 1u8, 44u8, 24u8, 242u8, 16u8, 67u8, 192u8, 79u8, 206u8, + 104u8, 233u8, 91u8, 202u8, 253u8, 100u8, 48u8, 78u8, 233u8, + 24u8, 124u8, 176u8, 211u8, 87u8, 63u8, 110u8, 2u8, 7u8, + 231u8, 53u8, 177u8, 196u8, + ], + ) + } + #[doc = "Cancel the ability to use `as_recovered` for `account`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] + pub fn cancel_recovered( + &self, + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Recovery", + "cancel_recovered", + CancelRecovered { account }, + [ + 153u8, 253u8, 13u8, 12u8, 200u8, 69u8, 113u8, 49u8, 75u8, + 61u8, 10u8, 209u8, 18u8, 192u8, 233u8, 158u8, 241u8, 24u8, + 243u8, 0u8, 136u8, 55u8, 43u8, 179u8, 43u8, 113u8, 130u8, + 99u8, 146u8, 132u8, 193u8, 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_multisig::pallet::Event; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_recovery::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -17291,15 +18879,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new multisig operation has begun."] - pub struct NewMultisig { - pub approving: ::subxt::utils::AccountId32, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + #[doc = "A recovery process has been set up for an account."] + pub struct RecoveryCreated { + pub account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for NewMultisig { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "NewMultisig"; + impl ::subxt::events::StaticEvent for RecoveryCreated { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryCreated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17310,17 +18896,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been approved by someone."] - pub struct MultisigApproval { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + #[doc = "A recovery process has been initiated for lost account by rescuer account."] + pub struct RecoveryInitiated { + pub lost_account: ::subxt::utils::AccountId32, + pub rescuer_account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for MultisigApproval { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigApproval"; + impl ::subxt::events::StaticEvent for RecoveryInitiated { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryInitiated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17331,19 +18914,15 @@ pub mod api { )] #[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>, + #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] + pub struct RecoveryVouched { + pub lost_account: ::subxt::utils::AccountId32, + pub rescuer_account: ::subxt::utils::AccountId32, + pub sender: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for MultisigExecuted { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigExecuted"; + impl ::subxt::events::StaticEvent for RecoveryVouched { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryVouched"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17354,33 +18933,64 @@ pub mod api { )] #[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], + #[doc = "A recovery process for lost account by rescuer account has been closed."] + pub struct RecoveryClosed { + pub lost_account: ::subxt::utils::AccountId32, + pub rescuer_account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for MultisigCancelled { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigCancelled"; + impl ::subxt::events::StaticEvent for RecoveryClosed { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryClosed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Lost account has been successfully recovered by rescuer account."] + pub struct AccountRecovered { + pub lost_account: ::subxt::utils::AccountId32, + pub rescuer_account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for AccountRecovered { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "AccountRecovered"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A recovery process has been removed for an account."] + pub struct RecoveryRemoved { + pub lost_account: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for RecoveryRemoved { + const PALLET: &'static str = "Recovery"; + const EVENT: &'static str = "RecoveryRemoved"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of open multisig operations."] - pub fn multisigs( + #[doc = " The set of recoverable accounts and their recovery configuration."] + pub fn recoverable( &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, + runtime_types::pallet_recovery::RecoveryConfig< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -17388,16 +18998,29 @@ pub mod api { (), ::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)] , [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 ,]) + ::subxt::storage::address::StaticStorageAddress::new( + "Recovery", + "Recoverable", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8, + 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8, + 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8, + 197u8, 212u8, 20u8, 167u8, 142u8, + ], + ) } - #[doc = " The set of open multisig operations."] - pub fn multisigs_root( + #[doc = " The set of recoverable accounts and their recovery configuration."] + pub fn recoverable_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, + runtime_types::pallet_recovery::RecoveryConfig< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, >, @@ -17406,73 +19029,196 @@ pub mod api { ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Multisig", - "Multisigs", + "Recovery", + "Recoverable", 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, + 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8, + 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8, + 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8, + 197u8, 212u8, 20u8, 167u8, 142u8, ], ) } - } - } - 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 = " Active recovery attempts."] #[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 = " First account is the account to be recovered, and the second account"] + #[doc = " is the user trying to recover the account."] + pub fn active_recoveries( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_recovery::ActiveRecovery< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "Multisig", - "DepositBase", + ::subxt::storage::address::StaticStorageAddress::new( + "Recovery", + "ActiveRecoveries", + 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, + ), + ], [ - 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, + 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8, + 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8, + 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8, + 60u8, 228u8, 44u8, 103u8, 39u8, ], ) } - #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] + #[doc = " Active recovery attempts."] #[doc = ""] - #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] - pub fn deposit_factor( + #[doc = " First account is the account to be recovered, and the second account"] + #[doc = " is the user trying to recover the account."] + pub fn active_recoveries_root( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_recovery::ActiveRecovery< + ::core::primitive::u32, + ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, + >, + >, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "Multisig", - "DepositFactor", + ::subxt::storage::address::StaticStorageAddress::new( + "Recovery", + "ActiveRecoveries", + Vec::new(), [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8, + 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8, + 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8, + 60u8, 228u8, 44u8, 103u8, 39u8, ], ) } - #[doc = " The maximum amount of signatories allowed in the multisig."] - pub fn max_signatories( + #[doc = " The list of allowed proxy accounts."] + #[doc = ""] + #[doc = " Map from the user who can access it to the recovered account."] + pub fn proxy( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Recovery", + "Proxy", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8, + 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8, + 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8, + 165u8, 108u8, 172u8, 70u8, 108u8, + ], + ) + } + #[doc = " The list of allowed proxy accounts."] + #[doc = ""] + #[doc = " Map from the user who can access it to the recovered account."] + pub fn proxy_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + (), + (), + ::subxt::storage::address::Yes, > { + ::subxt::storage::address::StaticStorageAddress::new( + "Recovery", + "Proxy", + Vec::new(), + [ + 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8, + 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8, + 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8, + 165u8, 108u8, 172u8, 70u8, 108u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a recovery configuration."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `2 + sizeof(BlockNumber, Balance)` bytes."] + pub fn config_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "Multisig", - "MaxSignatories", + "Recovery", + "ConfigDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per additional user when creating a recovery"] + #[doc = " configuration."] + #[doc = ""] + #[doc = " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage"] + #[doc = " value."] + pub fn friend_deposit_factor( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Recovery", + "FriendDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum amount of friends allowed in a recovery configuration."] + #[doc = ""] + #[doc = " NOTE: The threshold programmed in this Pallet uses u16, so it does"] + #[doc = " not really make sense to have a limit here greater than u16::MAX."] + #[doc = " But also, that is a lot more than you should probably set this value"] + #[doc = " to anyway..."] + pub fn max_friends( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Recovery", + "MaxFriends", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -17481,10 +19227,32 @@ pub mod api { ], ) } + #[doc = " The base amount of currency needed to reserve for starting a recovery."] + #[doc = ""] + #[doc = " This is primarily held for deterring malicious recovery attempts, and should"] + #[doc = " have a value large enough that a bad actor would choose not to place this"] + #[doc = " deposit. It also acts to fund additional storage item whose value size is"] + #[doc = " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable"] + #[doc = " threshold."] + pub fn recovery_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Recovery", + "RecoveryDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } } } } - pub mod bounties { + pub mod vesting { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -17501,67 +19269,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeBounty { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub curator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub fee: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - } + pub struct Vest; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -17571,11 +19279,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub beneficiary: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub struct VestOther { + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17586,9 +19294,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, + pub struct VestedTransfer { + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17599,9 +19313,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, + pub struct ForceVestedTransfer { + pub source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17612,276 +19336,209 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExtendBountyExpiry { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub remark: ::std::vec::Vec<::core::primitive::u8>, + pub struct MergeSchedules { + pub schedule1_index: ::core::primitive::u32, + pub schedule2_index: ::core::primitive::u32, } 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 = "Unlock any vested funds of the sender account."] #[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::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "propose_bounty", - ProposeBounty { value, description }, - [ - 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, - 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, - 59u8, 114u8, 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, - 201u8, 128u8, 102u8, 219u8, - ], - ) - } - #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] - #[doc = "and the original deposit will be returned."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 2 Reads, 2 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = "# "] - pub fn approve_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + pub fn vest(&self) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Bounties", - "approve_bounty", - ApproveBounty { bounty_id }, + "Vesting", + "vest", + Vest {}, [ - 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, + 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, + 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, + 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8, + 34u8, 21u8, 167u8, 172u8, 54u8, ], ) } - #[doc = "Assign a curator to a funded bounty."] + #[doc = "Unlock any vested funds of a `target` account."] #[doc = ""] - #[doc = "May only be called from `T::ApproveOrigin`."] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] #[doc = "# "] - pub fn propose_curator( + pub fn vest_other( &self, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< + target: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Bounties", - "propose_curator", - ProposeCurator { - bounty_id, - curator, - fee, - }, + "Vesting", + "vest_other", + VestOther { target }, [ - 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, - 30u8, 171u8, 48u8, 193u8, 200u8, 197u8, 147u8, 111u8, 88u8, - 14u8, 242u8, 66u8, 175u8, 241u8, 208u8, 95u8, 151u8, 41u8, - 46u8, 213u8, 188u8, 65u8, 196u8, + 243u8, 97u8, 222u8, 101u8, 143u8, 17u8, 184u8, 191u8, 208u8, + 162u8, 31u8, 121u8, 22u8, 88u8, 2u8, 36u8, 9u8, 22u8, 27u8, + 117u8, 236u8, 82u8, 83u8, 218u8, 166u8, 154u8, 49u8, 141u8, + 95u8, 127u8, 63u8, 13u8, ], ) } - #[doc = "Unassign curator from a bounty."] + #[doc = "Create a vested transfer."] #[doc = ""] - #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[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 = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] #[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 = "Emits `VestingCreated`."] #[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 = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] #[doc = "# "] - pub fn unassign_curator( + pub fn vested_transfer( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Bounties", - "unassign_curator", - UnassignCurator { bounty_id }, + "Vesting", + "vested_transfer", + VestedTransfer { target, schedule }, [ - 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, + 157u8, 78u8, 209u8, 131u8, 29u8, 102u8, 180u8, 61u8, 212u8, + 154u8, 28u8, 3u8, 150u8, 236u8, 22u8, 116u8, 8u8, 142u8, + 174u8, 35u8, 37u8, 167u8, 5u8, 200u8, 189u8, 227u8, 122u8, + 55u8, 188u8, 213u8, 59u8, 206u8, ], ) } - #[doc = "Accept the curator role for a bounty."] - #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = "Force a vested transfer."] #[doc = ""] - #[doc = "May only be called from the curator."] + #[doc = "The dispatch origin for this call must be _Root_."] #[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 = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "Emits `VestingCreated`."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to award."] - #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 4 Reads, 4 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] #[doc = "# "] - pub fn award_bounty( + pub fn force_vested_transfer( &self, - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< + source: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Bounties", - "award_bounty", - AwardBounty { - bounty_id, - beneficiary, + "Vesting", + "force_vested_transfer", + ForceVestedTransfer { + source, + target, + schedule, }, [ - 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, - 136u8, 29u8, 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, - 223u8, 20u8, 168u8, 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, - 25u8, 209u8, 155u8, 170u8, 68u8, - ], - ) - } - #[doc = "Claim the payout from an awarded bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] - #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to claim."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn claim_bounty( - &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Bounties", - "claim_bounty", - ClaimBounty { bounty_id }, - [ - 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, - 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, - 48u8, 64u8, 115u8, 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, - 68u8, 37u8, 59u8, 85u8, + 181u8, 47u8, 44u8, 166u8, 243u8, 122u8, 51u8, 81u8, 136u8, + 192u8, 248u8, 150u8, 149u8, 49u8, 208u8, 203u8, 156u8, 100u8, + 56u8, 133u8, 22u8, 53u8, 241u8, 237u8, 145u8, 210u8, 25u8, + 48u8, 61u8, 184u8, 112u8, 253u8, ], ) } - #[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 = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] #[doc = ""] - #[doc = "# "] - #[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 = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn extend_bounty_expiry( + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub fn merge_schedules( &self, - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Bounties", - "extend_bounty_expiry", - ExtendBountyExpiry { bounty_id, remark }, + "Vesting", + "merge_schedules", + MergeSchedules { + schedule1_index, + schedule2_index, + }, [ - 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, + 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, + 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, + 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8, + 157u8, 75u8, 4u8, 110u8, 125u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bounties::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -17890,13 +19547,15 @@ pub mod api { )] #[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, + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + pub struct VestingUpdated { + pub account: ::subxt::utils::AccountId32, + pub unvested: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for BountyProposed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyProposed"; + impl ::subxt::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17907,140 +19566,26 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal was rejected; funds were slashed."] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for BountyRejected { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyRejected"; + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: ::subxt::utils::AccountId32, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal is funded and became active."] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyBecameActive { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyBecameActive"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is awarded to a beneficiary."] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyAwarded { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyAwarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is claimed by beneficiary."] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyClaimed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyClaimed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is cancelled."] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyCanceled { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyCanceled"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty expiry is extended."] - pub struct BountyExtended { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyExtended { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyExtended"; + impl ::subxt::events::StaticEvent for VestingCompleted { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCompleted"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Number of bounty proposals that have been made."] - pub fn bounty_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( - "Bounties", - "BountyCount", - vec![], - [ - 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, - 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, - 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, - 31u8, 31u8, 213u8, 23u8, 118u8, - ], - ) - } - #[doc = " Bounties that have been made."] - pub fn bounties( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -18050,27 +19595,26 @@ pub mod api { ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "Bounties", + "Vesting", + "Vesting", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 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, + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties_root( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -18080,93 +19624,37 @@ pub mod api { ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "Bounties", - Vec::new(), - [ - 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, - 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, - 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, - 11u8, 99u8, 126u8, 225u8, 208u8, - ], - ) - } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::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( - "Bounties", - "BountyDescriptions", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions_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( - "Bounties", - "BountyDescriptions", + "Vesting", + "Vesting", 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, + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, ], ) } - #[doc = " Bounty indices that have been approved but not yet funded."] - pub fn bounty_approvals( + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " New networks start with latest version, as determined by the genesis build."] + pub fn storage_version( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - >, + runtime_types::pallet_vesting::Releases, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyApprovals", + "Vesting", + "StorageVersion", 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, + 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, + 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, + 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8, + 94u8, 189u8, 23u8, 45u8, 191u8, ], ) } @@ -18176,143 +19664,14 @@ pub mod api { 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, - ], - ) - } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = " The minimum amount transferred to call `vested_transfer`."] + pub fn min_vested_transfer( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "DataDepositPerByte", + "Vesting", + "MinVestedTransfer", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -18321,17 +19680,13 @@ pub mod api { ], ) } - #[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( + pub fn max_vesting_schedules( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "MaximumReasonLength", + "Vesting", + "MaxVestingSchedules", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -18343,7 +19698,7 @@ pub mod api { } } } - pub mod child_bounties { + pub mod scheduler { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -18360,31 +19715,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub curator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub fee: ::core::primitive::u128, + 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, @@ -18395,11 +19734,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub struct Cancel { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18410,11 +19747,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + 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, @@ -18425,13 +19767,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub struct CancelNamed { + pub id: [::core::primitive::u8; 32usize], } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18442,11 +19779,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub struct 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, @@ -18457,314 +19798,182 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub struct 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 = "Add a new child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of parent"] - #[doc = "bounty and the parent bounty must be in \"active\" state."] - #[doc = ""] - #[doc = "Child-bounty gets added successfully & fund gets transferred from"] - #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] - #[doc = "funds, else the call fails."] - #[doc = ""] - #[doc = "Upper bound to maximum number of active child bounties that can be"] - #[doc = "added are managed via runtime trait config"] - #[doc = "[`Config::MaxActiveChildBountyCount`]."] - #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] - #[doc = "- `value`: Value for executing the proposal."] - #[doc = "- `description`: Text description for the child-bounty."] - pub fn add_child_bounty( + #[doc = "Anonymously schedule a task."] + pub fn schedule( &self, - parent_bounty_id: ::core::primitive::u32, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "add_child_bounty", - AddChildBounty { - parent_bounty_id, - value, - description, + "Scheduler", + "schedule", + Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ - 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, - 45u8, 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, - 203u8, 122u8, 77u8, 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, - 176u8, 102u8, 68u8, 188u8, 8u8, + 98u8, 125u8, 33u8, 230u8, 221u8, 22u8, 212u8, 99u8, 75u8, + 58u8, 1u8, 92u8, 167u8, 200u8, 124u8, 173u8, 182u8, 38u8, + 79u8, 16u8, 194u8, 99u8, 222u8, 180u8, 102u8, 74u8, 44u8, + 239u8, 80u8, 203u8, 50u8, 251u8, ], ) } - #[doc = "Propose curator for funded child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be curator of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `curator`: Address of child-bounty curator."] - #[doc = "- `fee`: payment fee to child-bounty curator for execution."] - pub fn propose_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "propose_curator", - ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }, - [ - 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, - 107u8, 157u8, 110u8, 147u8, 236u8, 17u8, 138u8, 161u8, 153u8, - 119u8, 177u8, 225u8, 22u8, 83u8, 5u8, 123u8, 38u8, 30u8, - 240u8, 134u8, 208u8, 183u8, 247u8, - ], - ) - } - #[doc = "Accept the curator role for the child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this"] - #[doc = "child-bounty."] - #[doc = ""] - #[doc = "A deposit will be reserved from the curator and refund upon"] - #[doc = "successful payout or cancellation."] - #[doc = ""] - #[doc = "Fee for curator is deducted from curator fee of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] - #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn accept_curator( + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "accept_curator", - AcceptCurator { - parent_bounty_id, - child_bounty_id, - }, + "Scheduler", + "cancel", + Cancel { when, index }, [ - 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, - 228u8, 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, - 234u8, 142u8, 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, - 123u8, 125u8, 207u8, 10u8, 52u8, + 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 = "Unassign curator from a child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] - #[doc = "the curator of the parent bounty, or any signed origin."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] - #[doc = "curator, parent bounty must be in active state, for this call to"] - #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] - #[doc = "this call irrespective of the parent bounty state."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin` or the"] - #[doc = "parent bounty curator, we assume that the child-bounty curator is"] - #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] - #[doc = "slashed."] - #[doc = ""] - #[doc = "If the origin is the child-bounty curator, we take this as a sign"] - #[doc = "that they are unable to do their job, and are willingly giving up."] - #[doc = "We could slash the deposit, but for now we allow them to unreserve"] - #[doc = "their deposit and exit without issue. (We may want to change this if"] - #[doc = "it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] - #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] - #[doc = "inactive state of child-bounty curator."] - #[doc = ""] - #[doc = "This allows anyone in the community to call out that a child-bounty"] - #[doc = "curator is not doing their due diligence, and we should pick a new"] - #[doc = "one. In this case the child-bounty curator deposit is slashed."] - #[doc = ""] - #[doc = "State of child-bounty is moved to Added state on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn unassign_curator( + #[doc = "Schedule a named task."] + pub fn schedule_named( &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + 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::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "unassign_curator", - UnassignCurator { - parent_bounty_id, - child_bounty_id, + "Scheduler", + "schedule_named", + ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ - 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, - 86u8, 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, - 89u8, 72u8, 203u8, 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, - 169u8, 118u8, 128u8, 13u8, 211u8, + 232u8, 10u8, 38u8, 63u8, 203u8, 187u8, 176u8, 60u8, 49u8, + 124u8, 34u8, 1u8, 6u8, 56u8, 151u8, 12u8, 196u8, 23u8, 106u8, + 52u8, 85u8, 11u8, 60u8, 153u8, 47u8, 116u8, 126u8, 10u8, + 25u8, 43u8, 15u8, 196u8, ], ) } - #[doc = "Award child-bounty to a beneficiary."] - #[doc = ""] - #[doc = "The beneficiary will be able to claim the funds after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the parent curator or"] - #[doc = "curator of this child-bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in active state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `beneficiary`: Beneficiary account."] - pub fn award_child_bounty( + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::StaticTxPayload { + id: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "award_child_bounty", - AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }, + "Scheduler", + "cancel_named", + CancelNamed { id }, [ - 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, - 194u8, 151u8, 21u8, 127u8, 239u8, 78u8, 45u8, 27u8, 252u8, - 119u8, 23u8, 71u8, 140u8, 137u8, 209u8, 189u8, 128u8, 126u8, - 247u8, 13u8, 42u8, 68u8, 134u8, + 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, + 230u8, 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, + 11u8, 246u8, 37u8, 192u8, 207u8, 90u8, 157u8, 171u8, 93u8, + 233u8, 189u8, 64u8, 180u8, ], ) } - #[doc = "Claim the payout from an awarded child-bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call may be any signed origin."] - #[doc = ""] - #[doc = "Call works independent of parent bounty state, No need for parent"] - #[doc = "bounty to be in active state."] - #[doc = ""] - #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] - #[doc = "paid & curator deposit is unreserved."] - #[doc = ""] - #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] - #[doc = "call. And instance of child-bounty is removed from the state on"] - #[doc = "successful call completion."] + #[doc = "Anonymously schedule a task after a delay."] #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn claim_child_bounty( + #[doc = "# "] + #[doc = "Same as [`schedule`]."] + #[doc = "# "] + pub fn schedule_after( &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "claim_child_bounty", - ClaimChildBounty { - parent_bounty_id, - child_bounty_id, + "Scheduler", + "schedule_after", + ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ - 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, - 124u8, 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, - 234u8, 171u8, 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, - 107u8, 65u8, 92u8, 41u8, 45u8, + 182u8, 119u8, 100u8, 145u8, 141u8, 215u8, 50u8, 137u8, 147u8, + 154u8, 95u8, 21u8, 248u8, 202u8, 69u8, 10u8, 52u8, 203u8, + 142u8, 233u8, 24u8, 205u8, 197u8, 132u8, 253u8, 94u8, 189u8, + 139u8, 184u8, 129u8, 170u8, 244u8, ], ) } - #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] - #[doc = "are transferred to parent bounty account. The child-bounty curator"] - #[doc = "deposit may be unreserved if possible."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be either parent curator or"] - #[doc = "`T::RejectOrigin`."] - #[doc = ""] - #[doc = "If the state of child-bounty is `Active`, curator deposit is"] - #[doc = "unreserved."] - #[doc = ""] - #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] - #[doc = "returns `PendingPayout` error."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] - #[doc = "active state, for this child-bounty call to work. For origin"] - #[doc = "T::RejectOrigin execution is forced."] - #[doc = ""] - #[doc = "Instance of child-bounty is removed from the state on successful"] - #[doc = "call completion."] + #[doc = "Schedule a named task after a delay."] #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn close_child_bounty( + #[doc = "# "] + #[doc = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "# "] + pub fn schedule_named_after( &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + 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::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "ChildBounties", - "close_child_bounty", - CloseChildBounty { - parent_bounty_id, - child_bounty_id, + "Scheduler", + "schedule_named_after", + ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), }, [ - 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, - 240u8, 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, - 96u8, 142u8, 68u8, 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, - 213u8, 249u8, 222u8, 22u8, + 94u8, 228u8, 144u8, 37u8, 248u8, 50u8, 217u8, 196u8, 84u8, + 132u8, 17u8, 101u8, 158u8, 11u8, 94u8, 220u8, 122u8, 42u8, + 234u8, 237u8, 33u8, 0u8, 93u8, 117u8, 135u8, 148u8, 95u8, + 229u8, 226u8, 86u8, 118u8, 11u8, ], ) } } } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_child_bounties::pallet::Event; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -18776,14 +19985,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is added."] - pub struct Added { + #[doc = "Scheduled some task."] + pub struct Scheduled { + pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Added { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Added"; + impl ::subxt::events::StaticEvent for Scheduled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Scheduled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18794,15 +20003,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is awarded to a beneficiary."] - pub struct Awarded { + #[doc = "Canceled some task."] + pub struct Canceled { + pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Awarded"; + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Canceled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18813,16 +20021,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is claimed by beneficiary."] - pub struct Claimed { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, + #[doc = "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 Claimed { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Claimed"; + impl ::subxt::events::StaticEvent for Dispatched { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Dispatched"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18833,269 +20041,229 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is cancelled."] - pub struct Canceled { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, + #[doc = "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 Canceled { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Canceled"; + impl ::subxt::events::StaticEvent for CallUnavailable { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallUnavailable"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + pub struct PeriodicFailed { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PeriodicFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PeriodicFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The given task can never be executed since it is overweight."] + pub struct PermanentlyOverweight { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for PermanentlyOverweight { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PermanentlyOverweight"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Number of total child bounties."] - pub fn child_bounty_count( + pub fn incomplete_since( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBountyCount", + "Scheduler", + "IncompleteSince", vec![], [ - 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, - 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, - 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, - 93u8, 89u8, 26u8, 30u8, 95u8, + 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, + 56u8, 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, + 153u8, 31u8, 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, + 73u8, 222u8, 168u8, 193u8, 227u8, ], ) } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties( + #[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<::core::primitive::u32>, + 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::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::kitchensink_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ParentChildBounties", + "Scheduler", + "Agenda", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, - 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, - 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, - 250u8, 77u8, 49u8, 76u8, 188u8, + 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8, + 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8, + 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8, + 158u8, 218u8, 90u8, 183u8, 109u8, ], ) } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties_root( + #[doc = " 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<::core::primitive::u32>, + 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::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::kitchensink_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, + >, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ParentChildBounties", + "Scheduler", + "Agenda", Vec::new(), [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, - 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, - 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, - 250u8, 77u8, 49u8, 76u8, 188u8, + 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8, + 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8, + 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8, + 158u8, 218u8, 90u8, 183u8, 109u8, ], ) } - #[doc = " Child bounties that have been added."] - pub fn child_bounties( + #[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>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, + (::core::primitive::u32, ::core::primitive::u32), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBounties", - 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, - ), - ], + "Scheduler", + "Lookup", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, - 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, - 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, - 116u8, 219u8, 186u8, 165u8, 91u8, + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, + 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, + 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, + 211u8, 158u8, 250u8, 103u8, 243u8, ], ) } - #[doc = " Child bounties that have been added."] - pub fn child_bounties_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_child_bounties::ChildBounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - >, + (::core::primitive::u32, ::core::primitive::u32), (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBounties", + "Scheduler", + "Lookup", Vec::new(), [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, - 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, - 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, - 116u8, 219u8, 186u8, 165u8, 91u8, + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, + 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, + 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, + 211u8, 158u8, 250u8, 103u8, 243u8, ], ) } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions( + } + } + 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, - _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::StaticStorageAddress::new( - "ChildBounties", - "ChildBountyDescriptions", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, - 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, - 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, - 93u8, 207u8, 212u8, 141u8, 74u8, - ], - ) - } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions_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( - "ChildBounties", - "ChildBountyDescriptions", - Vec::new(), - [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, - 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, - 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, - 93u8, 207u8, 212u8, 141u8, 74u8, - ], - ) - } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildrenCuratorFees", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, - 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, - 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, - 211u8, 121u8, 168u8, 0u8, 216u8, - ], - ) - } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildrenCuratorFees", - Vec::new(), + ::subxt::constants::StaticConstantAddress::new( + "Scheduler", + "MaximumWeight", [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, - 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, - 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, - 211u8, 121u8, 168u8, 0u8, 216u8, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum number of child bounties that can be added to a parent bounty."] - pub fn max_active_child_bounty_count( + #[doc = " The maximum number of scheduled calls in the queue for a single block."] + pub fn max_scheduled_per_block( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "ChildBounties", - "MaxActiveChildBountyCount", + "Scheduler", + "MaxScheduledPerBlock", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -19104,27 +20272,10 @@ pub mod api { ], ) } - #[doc = " Minimum value for a child-bounty."] - pub fn child_bounty_value_minimum( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ChildBounties", - "ChildBountyValueMinimum", - [ - 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 tips { + pub mod preimage { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -19141,36 +20292,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportAwesome { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RetractTip { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TipNew { - pub reason: ::std::vec::Vec<::core::primitive::u8>, - pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19181,10 +20304,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tip { + pub struct UnnotePreimage { pub hash: ::subxt::utils::H256, - #[codec(compact)] - pub tip_value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19195,7 +20316,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseTip { + pub struct RequestPreimage { pub hash: ::subxt::utils::H256, } #[derive( @@ -19207,231 +20328,96 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SlashTip { + pub struct UnrequestPreimage { pub hash: ::subxt::utils::H256, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] - #[doc = "`DataDepositPerByte` for each byte in `reason`."] - #[doc = ""] - #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] - #[doc = " a UTF-8-encoded URL."] - #[doc = "- `who`: The account which should be credited for the tip."] - #[doc = ""] - #[doc = "Emits `NewTip` if successful."] - #[doc = ""] - #[doc = "# "] - #[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, ()>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Tips", - "report_awesome", - ReportAwesome { reason, who }, - [ - 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, - 254u8, 157u8, 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, - 98u8, 209u8, 150u8, 11u8, 240u8, 177u8, 106u8, 93u8, 191u8, - 31u8, 62u8, 11u8, 223u8, 79u8, - ], - ) - } - #[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::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, - ], - ) - } - #[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 = "Register a preimage on-chain."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."] - #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"] - #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"] - #[doc = " `T::Tippers`."] - #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"] - #[doc = "- DbReads: `Tippers`, `Reasons`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - pub fn tip_new( + #[doc = "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, - reason: ::std::vec::Vec<::core::primitive::u8>, - who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { + bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Tips", - "tip_new", - TipNew { - reason, - who, - tip_value, - }, + "Preimage", + "note_preimage", + NotePreimage { bytes }, [ - 217u8, 15u8, 70u8, 80u8, 193u8, 110u8, 212u8, 110u8, 212u8, - 45u8, 197u8, 150u8, 43u8, 116u8, 115u8, 231u8, 148u8, 102u8, - 202u8, 28u8, 55u8, 88u8, 166u8, 238u8, 11u8, 238u8, 229u8, - 189u8, 89u8, 115u8, 196u8, 95u8, + 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, + 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, + 35u8, 17u8, 125u8, 130u8, 31u8, 206u8, 106u8, 83u8, 163u8, + 192u8, 81u8, 23u8, 232u8, 230u8, ], ) } - #[doc = "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 = "Clear an unrequested preimage from the runtime storage."] #[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 = "If `len` is provided, then it will be a much cheaper operation."] #[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( + #[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, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Tips", - "tip", - Tip { hash, tip_value }, + "Preimage", + "unnote_preimage", + UnnotePreimage { hash }, [ - 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, + 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, + 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, + 147u8, 116u8, 27u8, 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, + 8u8, 19u8, 242u8, 207u8, 17u8, ], ) } - #[doc = "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 = "Request a preimage be uploaded to the chain without paying any fees or deposits."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] - #[doc = "# "] - pub fn close_tip( + #[doc = "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::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Tips", - "close_tip", - CloseTip { hash }, + "Preimage", + "request_preimage", + RequestPreimage { 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, + 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, + 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, + 170u8, 169u8, 127u8, 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, + 228u8, 141u8, 83u8, 162u8, 233u8, ], ) } - #[doc = "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 = "Clear a previously made request for a preimage."] #[doc = ""] - #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] - #[doc = "# "] - pub fn slash_tip( + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Tips", - "slash_tip", - SlashTip { hash }, + "Preimage", + "unrequest_preimage", + UnrequestPreimage { 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, + 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, + 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, + 105u8, 152u8, 69u8, 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, + 130u8, 11u8, 113u8, 187u8, 108u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_tips::pallet::Event; + pub type Event = runtime_types::pallet_preimage::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -19443,49 +20429,13 @@ pub mod api { )] #[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, - } - impl ::subxt::events::StaticEvent for NewTip { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "NewTip"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has reached threshold and is closing."] - pub struct TipClosing { - pub tip_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for TipClosing { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosing"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been closed."] - pub struct TipClosed { - pub tip_hash: ::subxt::utils::H256, - pub who: ::subxt::utils::AccountId32, - pub payout: ::core::primitive::u128, + #[doc = "A preimage has been noted."] + pub struct Noted { + pub hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for TipClosed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosed"; + impl ::subxt::events::StaticEvent for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19496,13 +20446,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been retracted."] - pub struct TipRetracted { - pub tip_hash: ::subxt::utils::H256, + #[doc = "A preimage has been requested."] + pub struct Requested { + pub hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for TipRetracted { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipRetracted"; + impl ::subxt::events::StaticEvent for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19513,236 +20463,124 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip suggestion has been slashed."] - pub struct TipSlashed { - pub tip_hash: ::subxt::utils::H256, - pub finder: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, + #[doc = "A preimage has ben cleared."] + pub struct Cleared { + pub hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for TipSlashed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipSlashed"; + impl ::subxt::events::StaticEvent for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " 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 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_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Tips", + "Preimage", + "StatusFor", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Identity, )], [ - 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, + 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 = " 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 request status of a given hash."] + pub fn status_for_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, - >, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Tips", + "Preimage", + "StatusFor", Vec::new(), [ - 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, - 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, - 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, - 38u8, 142u8, 36u8, 66u8, 0u8, + 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 = " 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( + 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< - ::std::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Reasons", + "Preimage", + "PreimageFor", vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), + &(_0.borrow(), _1.borrow()), ::subxt::storage::address::StorageHasher::Identity, )], [ - 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, + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, + 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, + 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, + 185u8, 234u8, 131u8, 124u8, ], ) } - #[doc = " 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( + pub fn preimage_for_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Reasons", + "Preimage", + "PreimageFor", Vec::new(), [ - 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, - 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, - 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, - 194u8, 166u8, 91u8, 189u8, 134u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[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::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, - ], - ) - } - #[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::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "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::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, - ], - ) - } - #[doc = " The percent of the final tip which goes to the original reporter of the tip."] - pub fn tip_finders_fee( - &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, - ], - ) - } - #[doc = " The amount held on deposit for placing a tip report."] - pub fn tip_report_deposit_base( - &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, + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, + 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, + 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, + 185u8, 234u8, 131u8, 124u8, ], ) } } } } - pub mod election_provider_multi_phase { + pub mod proxy { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -19759,20 +20597,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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< - runtime_types::sp_npos_elections::ElectionScore, + pub struct Proxy { + pub real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, + pub force_proxy_type: + ::core::option::Option, + pub call: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19783,29 +20616,13 @@ pub mod api { )] #[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<( + pub struct AddProxy { + pub delegate: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub raw_solution: ::std::boxed::Box< - runtime_types::pallet_election_provider_multi_phase::RawSolution< - runtime_types::polkadot_runtime::NposCompactSolution16, - >, + ::core::primitive::u32, >, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub delay: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19816,158 +20633,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GovernanceFallback { - pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Submit a solution for the unsigned phase."] - #[doc = ""] - #[doc = "The dispatch origin fo this call must be __none__."] - #[doc = ""] - #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] - #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] - #[doc = "that only active validators can submit this transaction when authoring a block (similar"] - #[doc = "to an inherent)."] - #[doc = ""] - #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] - #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] - #[doc = "putting their authoring reward at risk."] - #[doc = ""] - #[doc = "No deposit or reward is associated with this submission."] - pub fn submit_unsigned( - &self, - raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, - witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::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, - ], - ) - } - #[doc = "Set a new value for `MinimumUntrustedScore`."] - #[doc = ""] - #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] - #[doc = ""] - #[doc = "This check can be turned off by setting the value to `None`."] - pub fn set_minimum_untrusted_score( - &self, - maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "set_minimum_untrusted_score", - SetMinimumUntrustedScore { maybe_next_score }, - [ - 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, - 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, - 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, - 76u8, 4u8, 67u8, 81u8, - ], - ) - } - #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] - #[doc = "call to `ElectionProvider::elect`."] - #[doc = ""] - #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] - #[doc = ""] - #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] - #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] - #[doc = "memory/weight constrains)."] - pub fn set_emergency_election_result( - &self, - supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - )>, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "set_emergency_election_result", - SetEmergencyElectionResult { supports }, - [ - 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, - 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, - 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8, - 250u8, 151u8, 5u8, 44u8, 133u8, - ], - ) - } - #[doc = "Submit a solution for the signed phase."] - #[doc = ""] - #[doc = "The dispatch origin fo this call must be __signed__."] - #[doc = ""] - #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] - #[doc = "of the signed phase."] - #[doc = ""] - #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] - #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] - pub fn submit( - &self, - raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "submit", - Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), - }, - [ - 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, - 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, - 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, - 225u8, 241u8, 58u8, 193u8, 134u8, - ], - ) - } - #[doc = "Trigger the governance fallback."] - #[doc = ""] - #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] - #[doc = "calling [`Call::set_emergency_election_result`]."] - pub fn governance_fallback( - &self, - maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ElectionProviderMultiPhase", - "governance_fallback", - GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - }, - [ - 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, - 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, - 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8, - 190u8, 53u8, 226u8, 142u8, 182u8, - ], - ) - } + pub struct RemoveProxy { + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub delay: ::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_election_provider_multi_phase::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -19977,21 +20650,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A solution was stored with the given compute."] - #[doc = ""] - #[doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] - #[doc = "solution is unsigned, this means that it has also been processed."] - #[doc = ""] - #[doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] - pub struct SolutionStored { - pub compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub prev_ejected: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for SolutionStored { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SolutionStored"; - } + pub struct RemoveProxies; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -20001,15 +20660,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The election has been finalized, with the given computation and score."] - pub struct ElectionFinalized { - pub compute: - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - pub score: runtime_types::sp_npos_elections::ElectionScore, - } - impl ::subxt::events::StaticEvent for ElectionFinalized { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFinalized"; + pub struct CreatePure { + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub delay: ::core::primitive::u32, + pub index: ::core::primitive::u16, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20020,13 +20674,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An election failed."] - #[doc = ""] - #[doc = "Not much can be said about which computes failed in the process."] - pub struct ElectionFailed; - impl ::subxt::events::StaticEvent for ElectionFailed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFailed"; + pub struct KillPure { + pub spawner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub index: ::core::primitive::u16, + #[codec(compact)] + pub height: ::core::primitive::u32, + #[codec(compact)] + pub ext_index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20037,14 +20695,12 @@ pub mod api { )] #[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 PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Rewarded"; + pub struct Announce { + pub real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20055,17 +20711,14 @@ pub mod api { )] #[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 PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Slashed"; + pub struct RemoveAnnouncement { + pub real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub call_hash: ::subxt::utils::H256, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20074,16 +20727,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The signed phase of the given round has started."] - pub struct SignedPhaseStarted { - pub round: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for SignedPhaseStarted { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SignedPhaseStarted"; + pub struct RejectAnnouncement { + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub call_hash: ::subxt::utils::H256, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -20092,487 +20743,629 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The unsigned phase of the given round has started."] - pub struct UnsignedPhaseStarted { - pub round: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for UnsignedPhaseStarted { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "UnsignedPhaseStarted"; + pub struct ProxyAnnounced { + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub force_proxy_type: + ::core::option::Option, + pub call: + ::std::boxed::Box, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Internal counter for the number of rounds."] + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] #[doc = ""] - #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] - #[doc = " diagnostics of the pallet."] + #[doc = "Removes any corresponding announcement(s)."] #[doc = ""] - #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] - pub fn round( + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy( &self, - ) -> ::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![], + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::kitchensink_runtime::ProxyType, + >, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "proxy", + Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, [ - 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, + 174u8, 224u8, 133u8, 111u8, 6u8, 94u8, 65u8, 3u8, 82u8, 61u8, + 181u8, 56u8, 24u8, 77u8, 159u8, 19u8, 206u8, 41u8, 143u8, + 41u8, 95u8, 42u8, 236u8, 60u8, 234u8, 176u8, 126u8, 246u8, + 61u8, 247u8, 72u8, 194u8, ], ) } - #[doc = " Current phase."] - pub fn current_phase( + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + pub fn add_proxy( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, - >, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "CurrentPhase", - vec![], + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "add_proxy", + AddProxy { + delegate, + proxy_type, + delay, + }, [ - 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, + 179u8, 225u8, 244u8, 52u8, 43u8, 253u8, 204u8, 37u8, 236u8, + 61u8, 140u8, 160u8, 140u8, 4u8, 198u8, 186u8, 91u8, 113u8, + 204u8, 15u8, 167u8, 9u8, 232u8, 208u8, 130u8, 202u8, 67u8, + 44u8, 30u8, 35u8, 113u8, 152u8, ], ) } - #[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![], - [ - 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, - 250u8, 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, - 159u8, 251u8, 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, - 71u8, 136u8, 173u8, 145u8, 236u8, - ], - ) - } - #[doc = " Snapshot data of the round."] + #[doc = "Unregister a proxy account for the sender."] #[doc = ""] - #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] pub fn snapshot (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot > , :: subxt :: storage :: address :: Yes , () , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "Snapshot", - vec![], + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + pub fn remove_proxy( + &self, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_proxy", + RemoveProxy { + delegate, + proxy_type, + delay, + }, [ - 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, + 207u8, 163u8, 188u8, 238u8, 61u8, 133u8, 145u8, 118u8, 223u8, + 169u8, 11u8, 101u8, 38u8, 135u8, 194u8, 141u8, 84u8, 194u8, + 65u8, 159u8, 215u8, 210u8, 109u8, 7u8, 46u8, 31u8, 92u8, + 233u8, 50u8, 224u8, 57u8, 8u8, ], ) } - #[doc = " Desired number of targets to elect for this round."] + #[doc = "Unregister all proxy accounts for the sender."] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn desired_targets( + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + pub fn remove_proxies( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "DesiredTargets", - vec![], + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_proxies", + RemoveProxies {}, [ - 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, + 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, + 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, + 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, + 19u8, 23u8, 121u8, 129u8, ], ) } - #[doc = " The metadata of the [`RoundSnapshot`]"] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: storage :: address :: Yes , () , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SnapshotMetadata", - vec![], + #[doc = "Requires a `Signed` origin."] + #[doc = ""] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + #[doc = ""] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] + #[doc = ""] + #[doc = "Fails if there are insufficient funds to pay for deposit."] + pub fn create_pure( + &self, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "create_pure", + CreatePure { + proxy_type, + delay, + index, + }, [ - 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, + 46u8, 194u8, 136u8, 133u8, 111u8, 12u8, 51u8, 219u8, 148u8, + 227u8, 22u8, 236u8, 91u8, 15u8, 73u8, 48u8, 222u8, 219u8, + 133u8, 157u8, 65u8, 136u8, 119u8, 76u8, 116u8, 13u8, 33u8, + 215u8, 138u8, 211u8, 195u8, 157u8, ], ) } - #[doc = " The next index to be assigned to an incoming signed submission."] + #[doc = "Removes a previously spawned pure proxy."] #[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 = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] #[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 = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] + #[doc = ""] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = ""] + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + pub fn kill_pure( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionNextIndex", - vec![], + spawner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + index: ::core::primitive::u16, + height: ::core::primitive::u32, + ext_index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "kill_pure", + KillPure { + spawner, + proxy_type, + index, + height, + ext_index, + }, [ - 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, + 76u8, 246u8, 203u8, 222u8, 54u8, 155u8, 53u8, 188u8, 243u8, + 178u8, 173u8, 59u8, 31u8, 188u8, 152u8, 209u8, 211u8, 139u8, + 65u8, 150u8, 18u8, 5u8, 75u8, 223u8, 112u8, 196u8, 45u8, + 157u8, 111u8, 92u8, 106u8, 255u8, ], ) } - #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] - #[doc = " value in `SignedSubmissions`."] + #[doc = "Publish the hash of a proxy-call that will be made in the future."] #[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 = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn announce( &self, - ) -> ::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, - )>, + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionIndices", - vec![], + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "announce", + Announce { real, call_hash }, [ - 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, + 226u8, 252u8, 69u8, 50u8, 248u8, 212u8, 209u8, 225u8, 201u8, + 236u8, 51u8, 136u8, 56u8, 85u8, 36u8, 130u8, 233u8, 84u8, + 44u8, 192u8, 174u8, 119u8, 245u8, 62u8, 150u8, 78u8, 217u8, + 90u8, 167u8, 154u8, 228u8, 141u8, ], ) } - #[doc = " Unchecked, signed solutions."] + #[doc = "Remove a given announcement."] #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] #[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 :: polkadot_runtime :: NposCompactSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn remove_announcement( + &self, + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "remove_announcement", + RemoveAnnouncement { real, call_hash }, [ - 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, + 251u8, 236u8, 113u8, 182u8, 125u8, 244u8, 31u8, 144u8, 66u8, + 28u8, 65u8, 97u8, 67u8, 94u8, 225u8, 210u8, 46u8, 143u8, + 242u8, 124u8, 120u8, 93u8, 23u8, 165u8, 83u8, 177u8, 250u8, + 171u8, 58u8, 66u8, 70u8, 64u8, ], ) } - #[doc = " Unchecked, signed solutions."] + #[doc = "Remove the given announcement of a delegate."] #[doc = ""] - #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] - #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] #[doc = ""] - #[doc = " 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 :: polkadot_runtime :: NposCompactSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - Vec::new(), + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + pub fn reject_announcement( + &self, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "reject_announcement", + RejectAnnouncement { + delegate, + call_hash, + }, [ - 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, + 122u8, 165u8, 114u8, 85u8, 209u8, 197u8, 11u8, 96u8, 211u8, + 93u8, 201u8, 42u8, 1u8, 131u8, 254u8, 177u8, 191u8, 212u8, + 229u8, 13u8, 28u8, 163u8, 133u8, 200u8, 113u8, 28u8, 132u8, + 45u8, 105u8, 177u8, 82u8, 206u8, ], ) } - #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] - #[doc = " feasible."] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] #[doc = ""] - #[doc = " Can be set via `set_minimum_untrusted_score`."] - pub fn minimum_untrusted_score( + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy_announced( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_npos_elections::ElectionScore, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "MinimumUntrustedScore", - vec![], + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::kitchensink_runtime::ProxyType, + >, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Proxy", + "proxy_announced", + ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, [ - 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, + 184u8, 169u8, 61u8, 234u8, 13u8, 72u8, 155u8, 252u8, 196u8, + 100u8, 250u8, 86u8, 49u8, 152u8, 151u8, 233u8, 58u8, 192u8, + 216u8, 178u8, 238u8, 92u8, 240u8, 142u8, 252u8, 32u8, 81u8, + 229u8, 116u8, 135u8, 131u8, 133u8, ], ) } } } - 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_proxy::pallet::Event; + pub mod events { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Duration of the unsigned phase."] - pub fn unsigned_phase( + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proxy was executed correctly, with the given."] + pub struct ProxyExecuted { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for ProxyExecuted { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyExecuted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + pub struct PureCreated { + pub pure: ::subxt::utils::AccountId32, + pub who: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub disambiguation_index: ::core::primitive::u16, + } + impl ::subxt::events::StaticEvent for PureCreated { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "PureCreated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An announcement was placed to make a call in the future."] + pub struct Announced { + pub real: ::subxt::utils::AccountId32, + pub proxy: ::subxt::utils::AccountId32, + pub call_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Announced { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "Announced"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proxy was added."] + pub struct ProxyAdded { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ProxyAdded { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyAdded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proxy was removed."] + pub struct ProxyRemoved { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::kitchensink_runtime::ProxyType, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "UnsignedPhase", + ::subxt::storage::address::StaticStorageAddress::new( + "Proxy", + "Proxies", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8, + 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8, + 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8, + 18u8, 89u8, 96u8, 108u8, 55u8, 47u8, ], ) } - #[doc = " Duration of the signed phase."] - pub fn signed_phase( + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies_root( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::kitchensink_runtime::ProxyType, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedPhase", + ::subxt::storage::address::StaticStorageAddress::new( + "Proxy", + "Proxies", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 35u8, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8, + 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8, + 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8, + 18u8, 89u8, 96u8, 108u8, 55u8, 47u8, ], ) } - #[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 = " The announcements made by the proxy (key)."] + pub fn announcements( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - > { - ::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, - ], - ) - } - #[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::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_arithmetic::per_things::Perbill, - >, - > { - ::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, - ], - ) - } - #[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, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "OffchainRepeat", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] - pub fn miner_tx_priority( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerTxPriority", + ::subxt::storage::address::StaticStorageAddress::new( + "Proxy", + "Announcements", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], [ - 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, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, ], ) } - #[doc = " 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 announcements made by the proxy (key)."] + pub fn announcements_root( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxSubmissions", + ::subxt::storage::address::StaticStorageAddress::new( + "Proxy", + "Announcements", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, ], ) } - #[doc = " Maximum weight of a signed solution."] + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a proxy."] #[doc = ""] - #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] - #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] - #[doc = " this value."] - pub fn signed_max_weight( - &self, - ) -> ::subxt::constants::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, - ], - ) - } - #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] - pub fn signed_max_refunds( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::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, - ], - ) - } - #[doc = " Base reward for a signed solution"] - pub fn signed_reward_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedRewardBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Base deposit for a signed solution."] - pub fn signed_deposit_base( - &self, - ) -> ::subxt::constants::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( + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] + pub fn proxy_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositByte", + "Proxy", + "ProxyDepositBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -20581,15 +21374,18 @@ pub mod api { ], ) } - #[doc = " Per-weight deposit for a signed solution."] - pub fn signed_deposit_weight( + #[doc = " The amount of currency needed per proxy added."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] + #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] + #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] + pub fn proxy_deposit_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositWeight", + "Proxy", + "ProxyDepositFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -20598,54 +21394,14 @@ pub mod api { ], ) } - #[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, - ], - ) - } - #[doc = " The maximum number of electable targets to put in the snapshot."] - pub fn max_electable_targets( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u16>, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxElectableTargets", - [ - 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, - 227u8, 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, - 184u8, 72u8, 169u8, 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, - 123u8, 128u8, 193u8, 29u8, 70u8, - ], - ) - } - #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] - #[doc = " implementation."] - #[doc = ""] - #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] - pub fn max_winners( + #[doc = " The maximum amount of proxies allowed for a single account."] + pub fn max_proxies( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxWinners", + "Proxy", + "MaxProxies", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -20654,14 +21410,14 @@ pub mod api { ], ) } - pub fn miner_max_length( + #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] + pub fn max_pending( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxLength", + "Proxy", + "MaxPending", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -20670,44 +21426,48 @@ pub mod api { ], ) } - pub fn miner_max_weight( + #[doc = " The base amount of currency needed to reserve for creating an announcement."] + #[doc = ""] + #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] + #[doc = " bytes)."] + pub fn announcement_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_weights::weight_v2::Weight, - >, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxWeight", + "Proxy", + "AnnouncementDepositBase", [ - 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, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } - pub fn miner_max_votes_per_voter( + #[doc = " The amount of currency needed per announcement made."] + #[doc = ""] + #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] + #[doc = " into a pre-existing storage value."] + pub fn announcement_deposit_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxVotesPerVoter", + "Proxy", + "AnnouncementDepositFactor", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } } } } - pub mod voter_list { + pub mod multisig { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -20724,9 +21484,10 @@ pub mod api { )] #[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, ()>, + pub struct AsMultiThreshold1 { + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub call: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20737,74 +21498,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PutInFrontOf { - pub lighter: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] - #[doc = "changed its score that it should properly fall into a different bag than its current"] - #[doc = "one."] - #[doc = ""] - #[doc = "Anyone can call this function about any potentially dislocated account."] - #[doc = ""] - #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] - #[doc = "`ScoreProvider`."] - #[doc = ""] - #[doc = "If `dislocated` does not exists, it returns an error."] - pub fn rebag( - &self, - dislocated: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "VoterList", - "rebag", - Rebag { dislocated }, - [ - 35u8, 182u8, 31u8, 22u8, 190u8, 187u8, 31u8, 138u8, 60u8, - 48u8, 236u8, 16u8, 191u8, 143u8, 52u8, 110u8, 228u8, 43u8, - 116u8, 13u8, 171u8, 108u8, 112u8, 123u8, 252u8, 231u8, 132u8, - 97u8, 195u8, 148u8, 252u8, 241u8, - ], - ) - } - #[doc = "Move the caller's Id directly in front of `lighter`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] - #[doc = "the account going in front of `lighter`."] - #[doc = ""] - #[doc = "Only works if"] - #[doc = "- both nodes are within the same bag,"] - #[doc = "- and `origin` has a greater `Score` than `lighter`."] - pub fn put_in_front_of( - &self, - lighter: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "VoterList", - "put_in_front_of", - PutInFrontOf { lighter }, - [ - 184u8, 194u8, 39u8, 91u8, 28u8, 220u8, 76u8, 199u8, 64u8, - 252u8, 233u8, 241u8, 74u8, 19u8, 246u8, 190u8, 108u8, 227u8, - 77u8, 162u8, 225u8, 230u8, 101u8, 72u8, 159u8, 217u8, 133u8, - 107u8, 84u8, 83u8, 81u8, 227u8, - ], - ) - } + pub struct AsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call: + ::std::boxed::Box, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } - } - #[doc = "\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, @@ -20814,15 +21517,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Moved an account from one bag to another."] - pub struct Rebagged { - pub who: ::subxt::utils::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for Rebagged { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "Rebagged"; + pub struct ApproveAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + pub call_hash: [::core::primitive::u8; 32usize], + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20833,227 +21535,245 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Updated the score of some account to the given amount."] - pub struct ScoreUpdated { - pub who: ::subxt::utils::AccountId32, - pub new_score: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for ScoreUpdated { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "ScoreUpdated"; + pub struct CancelAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub call_hash: [::core::primitive::u8; 32usize], } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " A single node, within some bag."] + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] #[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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bags_list::list::Node, - >, - ::subxt::storage::address::Yes, - (), - ::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 = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes_root( + #[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, - ) -> ::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(), + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "as_multi_threshold_1", + AsMultiThreshold1 { + other_signatories, + call: ::std::boxed::Box::new(call), + }, [ - 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, + 192u8, 229u8, 190u8, 143u8, 151u8, 56u8, 139u8, 214u8, 206u8, + 1u8, 35u8, 185u8, 226u8, 105u8, 103u8, 12u8, 86u8, 2u8, 84u8, + 220u8, 192u8, 3u8, 171u8, 237u8, 167u8, 49u8, 158u8, 95u8, + 244u8, 208u8, 99u8, 147u8, ], ) } - #[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, - ], - ) - } - #[doc = " A bag stored in storage."] + #[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 = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags( + #[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, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bags_list::list::Bag, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - ::subxt::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, - )], + call: runtime_types::kitchensink_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, + }, [ - 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, + 182u8, 136u8, 199u8, 91u8, 225u8, 217u8, 87u8, 151u8, 32u8, + 214u8, 96u8, 223u8, 109u8, 203u8, 57u8, 206u8, 196u8, 156u8, + 228u8, 22u8, 114u8, 166u8, 37u8, 129u8, 154u8, 241u8, 51u8, + 253u8, 172u8, 181u8, 179u8, 186u8, ], ) } - #[doc = " A bag stored in storage."] + #[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 = " Stores a `Bag` struct, which stores head and tail pointers to itself."] - pub fn list_bags_root( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_bags_list::list::Bag, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "VoterList", - "ListBags", - Vec::new(), + 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, + }, [ - 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, + 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, ], ) } - } - } - 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 = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] #[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 = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = " # Migration"] + #[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 = " In the event that this list ever changes, a copy of the old bags list must be retained."] - #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] - pub fn bag_thresholds( + #[doc = "# "] + #[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, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u64>, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + timepoint: runtime_types::pallet_multisig::Timepoint< + ::core::primitive::u32, >, - > { - ::subxt::constants::StaticConstantAddress::new( - "VoterList", - "BagThresholds", + call_hash: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Multisig", + "cancel_as_multi", + CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, + }, [ - 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, + 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, ], ) } } } - } - pub mod nomination_pools { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[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; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -21063,10 +21783,15 @@ pub mod api { )] #[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, + #[doc = "A new multisig operation has begun."] + pub struct NewMultisig { + pub approving: ::subxt::utils::AccountId32, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for NewMultisig { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "NewMultisig"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21077,10 +21802,17 @@ pub mod api { )] #[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, - >, + #[doc = "A multisig operation has been approved by someone."] + pub struct MultisigApproval { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for MultisigApproval { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigApproval"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21091,7 +21823,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimPayout; + #[doc = "A multisig operation has been executed."] + pub struct MultisigExecuted { + pub approving: ::subxt::utils::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for MultisigExecuted { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigExecuted"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -21101,12 +21846,137 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbond { - pub member_account: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - pub unbonding_points: ::core::primitive::u128, + #[doc = "A multisig operation has been cancelled."] + pub struct MultisigCancelled { + pub cancelling: ::subxt::utils::AccountId32, + pub timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub multisig: ::subxt::utils::AccountId32, + pub call_hash: [::core::primitive::u8; 32usize], + } + impl ::subxt::events::StaticEvent for MultisigCancelled { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigCancelled"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of open multisig operations."] + pub fn multisigs( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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 :: 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)] , [69u8 , 153u8 , 186u8 , 204u8 , 117u8 , 95u8 , 119u8 , 182u8 , 220u8 , 87u8 , 8u8 , 15u8 , 123u8 , 83u8 , 5u8 , 188u8 , 115u8 , 121u8 , 163u8 , 96u8 , 218u8 , 3u8 , 106u8 , 44u8 , 44u8 , 187u8 , 46u8 , 238u8 , 80u8 , 203u8 , 175u8 , 155u8 ,]) + } + #[doc = " The set of open multisig operations."] + pub fn multisigs_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_multisig::Multisig< + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Multisig", + "Multisigs", + Vec::new(), + [ + 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, + 87u8, 8u8, 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, + 163u8, 96u8, 218u8, 3u8, 106u8, 44u8, 44u8, 187u8, 46u8, + 238u8, 80u8, 203u8, 175u8, 155u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] + #[doc = " store a dispatch call for later."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] + #[doc = " `32 + sizeof(AccountId)` bytes."] + pub fn deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } + #[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::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "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::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Multisig", + "MaxSignatories", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } } + } + } + pub mod bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -21116,9 +21986,10 @@ pub mod api { )] #[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, + pub struct ProposeBounty { + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21129,10 +22000,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithdrawUnbonded { - pub member_account: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub num_slashing_spans: ::core::primitive::u32, + pub struct ApproveBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21143,14 +22013,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { + pub struct ProposeCurator { #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub nominator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub 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, @@ -21161,15 +22032,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreateWithPoolId { + pub struct UnassignCurator { #[codec(compact)] - pub amount: ::core::primitive::u128, - pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub nominator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - pub pool_id: ::core::primitive::u32, + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21180,9 +22045,9 @@ pub mod api { )] #[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 struct AcceptCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21193,9 +22058,13 @@ pub mod api { )] #[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, + 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, @@ -21206,9 +22075,9 @@ pub mod api { )] #[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>, + pub struct ClaimBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21219,23 +22088,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetConfigs { - pub min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members_per_pool: - runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, + pub struct CloseBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21246,493 +22101,276 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdateRoles { - pub pool_id: ::core::primitive::u32, - pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill { - pub pool_id: ::core::primitive::u32, + pub struct ExtendBountyExpiry { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub remark: ::std::vec::Vec<::core::primitive::u8>, } 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 = "Propose a new bounty."] #[doc = ""] - #[doc = "# Note"] + #[doc = "The dispatch origin for this call must be _Signed_."] #[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 = "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, - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "join", - Join { amount, pool_id }, + "Bounties", + "propose_bounty", + ProposeBounty { value, description }, [ - 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, + 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, + 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, + 59u8, 114u8, 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, + 201u8, 128u8, 102u8, 219u8, ], ) } - #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[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 = "Additional funds can come from either the free balance of the account, of from the"] - #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = "May only be called from `T::SpendOrigin`."] #[doc = ""] - #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] - pub fn bond_extra( + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn approve_bounty( &self, - extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - ) -> ::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, - ], - ) - } - #[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 { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "claim_payout", - ClaimPayout {}, + "Bounties", + "approve_bounty", + ApproveBounty { bounty_id }, [ - 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, + 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, + 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, + 68u8, 48u8, 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, + 198u8, 183u8, 173u8, ], ) } - #[doc = "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 = "Assign a curator to a funded bounty."] #[doc = ""] - #[doc = "# Note"] + #[doc = "May only be called from `T::SpendOrigin`."] #[doc = ""] - #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If"] - #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] - #[doc = "`NoMoreChunks` error from the staking system."] - pub fn unbond( + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn propose_curator( &self, - member_account: ::subxt::utils::MultiAddress< + bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "unbond", - Unbond { - member_account, - unbonding_points, - }, - [ - 78u8, 15u8, 37u8, 18u8, 129u8, 63u8, 31u8, 3u8, 68u8, 10u8, - 12u8, 12u8, 166u8, 179u8, 38u8, 232u8, 97u8, 1u8, 83u8, 53u8, - 26u8, 59u8, 42u8, 219u8, 176u8, 246u8, 169u8, 28u8, 35u8, - 67u8, 139u8, 81u8, - ], - ) - } - #[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::StaticTxPayload { + fee: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "pool_withdraw_unbonded", - PoolWithdrawUnbonded { - pool_id, - num_slashing_spans, + "Bounties", + "propose_curator", + ProposeCurator { + bounty_id, + curator, + fee, }, [ - 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, + 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, ], ) } - #[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 = "Unassign curator from a bounty."] #[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 = "This function can only be called by the `RejectOrigin` a signed origin."] #[doc = ""] - #[doc = "# Conditions for permissioned dispatch"] + #[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 = "* The caller is the target and they are not the depositor."] + #[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 = "# Note"] + #[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 = "If the target is the depositor, the pool will be destroyed."] - pub fn withdraw_unbonded( + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn unassign_curator( &self, - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "withdraw_unbonded", - WithdrawUnbonded { - member_account, - num_slashing_spans, - }, + "Bounties", + "unassign_curator", + UnassignCurator { bounty_id }, [ - 61u8, 216u8, 214u8, 166u8, 59u8, 42u8, 186u8, 141u8, 47u8, - 50u8, 135u8, 236u8, 166u8, 88u8, 90u8, 244u8, 57u8, 106u8, - 193u8, 211u8, 215u8, 131u8, 203u8, 33u8, 195u8, 120u8, 213u8, - 94u8, 213u8, 66u8, 79u8, 140u8, + 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, + 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, + 63u8, 223u8, 28u8, 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, + 27u8, 207u8, 247u8, 207u8, 213u8, ], ) } - #[doc = "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 = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] #[doc = ""] - #[doc = "# Note"] + #[doc = "May only be called from the curator."] #[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 = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn accept_curator( &self, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - state_toggler: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - ) -> ::subxt::tx::StaticTxPayload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "create", - Create { - amount, - root, - nominator, - state_toggler, - }, + "Bounties", + "accept_curator", + AcceptCurator { bounty_id }, [ - 176u8, 210u8, 154u8, 87u8, 218u8, 250u8, 117u8, 90u8, 80u8, - 191u8, 252u8, 146u8, 29u8, 228u8, 36u8, 15u8, 125u8, 102u8, - 87u8, 50u8, 146u8, 108u8, 96u8, 145u8, 135u8, 189u8, 18u8, - 159u8, 21u8, 74u8, 165u8, 33u8, + 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 = "Create a new delegation pool with a previously used pool id"] + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] #[doc = ""] - #[doc = "# Arguments"] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] #[doc = ""] - #[doc = "same as `create` with the inclusion of"] - #[doc = "* `pool_id` - `A valid PoolId."] - pub fn create_with_pool_id( + #[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, - amount: ::core::primitive::u128, - root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - nominator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - (), - >, - state_toggler: ::subxt::utils::MultiAddress< + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - (), + ::core::primitive::u32, >, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "create_with_pool_id", - CreateWithPoolId { - amount, - root, - nominator, - state_toggler, - pool_id, + "Bounties", + "award_bounty", + AwardBounty { + bounty_id, + beneficiary, }, [ - 234u8, 228u8, 116u8, 171u8, 77u8, 41u8, 166u8, 254u8, 20u8, - 78u8, 38u8, 28u8, 144u8, 58u8, 2u8, 64u8, 11u8, 27u8, 124u8, - 215u8, 8u8, 10u8, 172u8, 189u8, 118u8, 131u8, 102u8, 191u8, - 251u8, 208u8, 167u8, 103u8, + 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, ], ) } - #[doc = "Nominate on behalf of the pool."] + #[doc = "Claim the payout from an awarded bounty after payout delay."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] - #[doc = "root role."] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] #[doc = ""] - #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] - #[doc = "account."] - pub fn nominate( + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn claim_bounty( &self, - pool_id: ::core::primitive::u32, - validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "nominate", - Nominate { - pool_id, - validators, - }, + "Bounties", + "claim_bounty", + ClaimBounty { bounty_id }, [ - 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, + 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, + 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, + 48u8, 64u8, 115u8, 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, + 68u8, 37u8, 59u8, 85u8, ], ) } - #[doc = "Set a new state for the pool."] + #[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 = "If a pool is already in the `Destroying` state, then under no condition can its state"] - #[doc = "change again."] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] #[doc = ""] - #[doc = "The dispatch origin of this call must be either:"] + #[doc = "- `bounty_id`: Bounty ID to cancel."] #[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 = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn close_bounty( &self, - pool_id: ::core::primitive::u32, - state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::StaticTxPayload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "set_state", - SetState { pool_id, state }, + "Bounties", + "close_bounty", + CloseBounty { bounty_id }, [ - 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, + 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 = "Set a new metadata for the pool."] + #[doc = "Extend the expiry time of an active bounty."] #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the state toggler, or the root role"] - #[doc = "of the pool."] - pub fn set_metadata( - &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 }, - [ - 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, - 81u8, 31u8, 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, - 7u8, 8u8, 115u8, 158u8, 151u8, 30u8, 211u8, 52u8, 177u8, - 234u8, 87u8, 125u8, 127u8, - ], - ) - } - #[doc = "Update configurations for the nomination pools. The origin for this call must be"] - #[doc = "Root."] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] #[doc = ""] - #[doc = "# Arguments"] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] #[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 = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn extend_bounty_expiry( &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 { + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::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, - }, + "Bounties", + "extend_bounty_expiry", + ExtendBountyExpiry { bounty_id, remark }, [ - 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, - ], - ) - } - #[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::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "NominationPools", - "update_roles", - UpdateRoles { - pool_id, - new_root, - new_nominator, - new_state_toggler, - }, - [ - 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, - ], - ) - } - #[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, + 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, + 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, + 63u8, 138u8, 100u8, 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, + 60u8, 87u8, 40u8, 80u8, 202u8, ], ) } } } - #[doc = "Events of this pallet."] - pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_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, @@ -21741,84 +22379,13 @@ pub mod api { )] #[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 PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Created"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has became bonded in a pool."] - pub struct Bonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub bonded: ::core::primitive::u128, - pub joined: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Bonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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 PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PaidOut"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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, + #[doc = "New bounty proposal."] + pub struct BountyProposed { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Unbonded"; + impl ::subxt::events::StaticEvent for BountyProposed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyProposed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21829,21 +22396,14 @@ pub mod api { )] #[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, + #[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 Withdrawn { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Withdrawn"; + impl ::subxt::events::StaticEvent for BountyRejected { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyRejected"; } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -21855,31 +22415,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pool has been destroyed."] - pub struct Destroyed { - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Destroyed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + #[doc = "A bounty proposal is funded and became active."] + pub struct BountyBecameActive { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for StateChanged { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "StateChanged"; + impl ::subxt::events::StaticEvent for BountyBecameActive { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyBecameActive"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21890,16 +22432,14 @@ pub mod api { )] #[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, + #[doc = "A bounty is awarded to a beneficiary."] + pub struct BountyAwarded { + pub index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "MemberRemoved"; + impl ::subxt::events::StaticEvent for BountyAwarded { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyAwarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21910,18 +22450,18 @@ pub mod api { )] #[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>, + #[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 RolesUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "RolesUpdated"; + impl ::subxt::events::StaticEvent for BountyClaimed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyClaimed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -21930,16 +22470,16 @@ pub mod api { )] #[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, + #[doc = "A bounty is cancelled."] + pub struct BountyCanceled { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for PoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolSlashed"; + impl ::subxt::events::StaticEvent for BountyCanceled { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyCanceled"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -21948,649 +22488,329 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] - pub struct UnbondingPoolSlashed { - pub pool_id: ::core::primitive::u32, - pub era: ::core::primitive::u32, - pub balance: ::core::primitive::u128, + #[doc = "A bounty expiry is extended."] + pub struct BountyExtended { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "UnbondingPoolSlashed"; + impl ::subxt::events::StaticEvent for BountyExtended { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyExtended"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Minimum amount to bond to join a pool."] - pub fn min_join_bond( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinJoinBond", - vec![], - [ - 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, - 58u8, 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, - 247u8, 97u8, 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, - 212u8, 217u8, 84u8, 240u8, 91u8, - ], - ) - } - #[doc = " Minimum bond required to create a pool."] - #[doc = ""] - #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] - #[doc = " indication of \"skin in the game\"."] - #[doc = ""] - #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] - #[doc = " while all other accounts leave."] - pub fn min_create_bond( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinCreateBond", - vec![], - [ - 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, - 210u8, 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, - 111u8, 181u8, 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, - 16u8, 222u8, 219u8, 67u8, - ], - ) - } - #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] - #[doc = " pools can exist."] - pub fn max_pools( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPools", - vec![], - [ - 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, - 195u8, 23u8, 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, - 68u8, 215u8, 162u8, 255u8, 217u8, 173u8, 141u8, 27u8, 72u8, - 199u8, 7u8, 240u8, 25u8, 34u8, - ], - ) - } - #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] - #[doc = " members are not bound on a system wide basis."] - pub fn max_pool_members( + #[doc = " Number of bounty proposals that have been made."] + pub fn bounty_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembers", - vec![], - [ - 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, - 233u8, 59u8, 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, - 166u8, 89u8, 120u8, 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, - 88u8, 206u8, 41u8, 242u8, 62u8, - ], - ) - } - #[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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, (), - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembersPerPool", + "Bounties", + "BountyCount", vec![], [ - 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, - 30u8, 55u8, 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, - 239u8, 195u8, 147u8, 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, - 248u8, 169u8, 186u8, 48u8, + 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, + 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, + 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, + 31u8, 31u8, 213u8, 23u8, 118u8, ], ) } - #[doc = " Active members."] - pub fn pool_members( + #[doc = " Bounties that have been made."] + pub fn bounties( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::PoolMember, + 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::StaticStorageAddress::new( - "NominationPools", - "PoolMembers", + "Bounties", + "Bounties", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 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, + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, ], ) } - #[doc = " Active members."] - pub fn pool_members_root( + #[doc = " Bounties that have been made."] + pub fn bounties_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::PoolMember, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "PoolMembers", + "Bounties", + "Bounties", Vec::new(), [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, - 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, - 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, - 31u8, 60u8, 120u8, 100u8, 249u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_pool_members( - &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![], - [ - 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, + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, ], ) } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools( + #[doc = " The description of each bounty."] + pub fn bounty_descriptions( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::BondedPoolInner, + 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", - "BondedPools", + "Bounties", + "BountyDescriptions", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 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, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools_root( + #[doc = " The description of each bounty."] + pub fn bounty_descriptions_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::BondedPoolInner, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "BondedPools", + "Bounties", + "BountyDescriptions", 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, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_bonded_pools( + #[doc = " Bounty indices that have been approved but not yet funded."] + pub fn bounty_approvals( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForBondedPools", + "Bounties", + "BountyApprovals", 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, + 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, ], ) } - #[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( + } + } + 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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::RewardPool, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "RewardPools", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "BountyDepositBase", [ - 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, + 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 = " Reward pools. This is where there rewards for each pool accumulate. When a members payout"] - #[doc = " is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] - pub fn reward_pools_root( + #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] + pub fn bounty_deposit_payout_delay( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::RewardPool, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "RewardPools", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "BountyDepositPayoutDelay", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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_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![], - [ - 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, - 23u8, 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, - 45u8, 205u8, 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, - 49u8, 143u8, 135u8, 201u8, 81u8, - ], - ) - } - #[doc = " 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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::SubPools, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[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::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_nomination_pools::SubPools, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", - 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, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_sub_pools_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( - "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, - ], - ) - } - #[doc = " Metadata for the pool."] - pub fn metadata( - &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( + #[doc = " Bounty duration in blocks."] + pub fn bounty_update_period( &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![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "BountyUpdatePeriod", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Ever increasing number of all pools created so far."] - pub fn last_pool_id( + #[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::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Permill, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "LastPoolId", - vec![], + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMultiplier", [ - 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, + 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 = " 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( + #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_max( &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::constants::StaticConstantAddress< + ::core::option::Option<::core::primitive::u128>, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "ReversePoolIdLookup", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMax", [ - 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, + 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 = " 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( + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::constants::StaticConstantAddress< + ::core::option::Option<::core::primitive::u128>, > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "ReversePoolIdLookup", - Vec::new(), + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMin", [ - 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, + 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 = "Counter for the related counted storage map"] - pub fn counter_for_reverse_pool_id_lookup( + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( &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![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "BountyValueMinimum", [ - 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, + 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 constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The nomination pool's pallet id."] - pub fn pallet_id( + #[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::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::PalletId, - >, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "NominationPools", - "PalletId", + "Bounties", + "DataDepositPerByte", [ - 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, + 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 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 = " Maximum acceptable reason length."] #[doc = ""] - #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] - #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] - pub fn max_points_to_balance( + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u8>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "NominationPools", - "MaxPointsToBalance", + "Bounties", + "MaximumReasonLength", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 fast_unstake { + pub mod tips { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -22607,130 +22827,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegisterFastUnstake; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Control { - pub unchecked_eras_to_check: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register oneself for fast-unstake."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] - #[doc = "`staking::unbond`."] - #[doc = ""] - #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] - #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] - #[doc = "to be checked in further blocks."] - #[doc = ""] - #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] - #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] - #[doc = ""] - #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] - #[doc = "unstaked."] - #[doc = ""] - #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] - #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] - #[doc = "the chain's resources."] - pub fn register_fast_unstake( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "FastUnstake", - "register_fast_unstake", - RegisterFastUnstake {}, - [ - 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, - 117u8, 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, - 180u8, 85u8, 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, - 184u8, 177u8, 129u8, 42u8, 122u8, - ], - ) - } - #[doc = "Deregister oneself from the fast-unstake."] - #[doc = ""] - #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] - #[doc = ""] - #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] - #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] - #[doc = "`Staking::rebond`."] - pub fn deregister(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "FastUnstake", - "deregister", - Deregister {}, - [ - 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, - 181u8, 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, - 242u8, 155u8, 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, - 144u8, 35u8, 252u8, 88u8, 21u8, - ], - ) - } - #[doc = "Control the operation of this pallet."] - #[doc = ""] - #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] - pub fn control( - &self, - unchecked_eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "FastUnstake", - "control", - Control { - unchecked_eras_to_check, - }, - [ - 134u8, 85u8, 43u8, 231u8, 209u8, 34u8, 248u8, 0u8, 238u8, - 73u8, 175u8, 105u8, 40u8, 128u8, 186u8, 40u8, 211u8, 106u8, - 107u8, 206u8, 124u8, 155u8, 220u8, 125u8, 143u8, 10u8, 162u8, - 20u8, 99u8, 142u8, 243u8, 5u8, - ], - ) - } - } - } - #[doc = "The events of this pallet."] - pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was unstaked."] - pub struct Unstaked { - pub stash: ::subxt::utils::AccountId32, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Unstaked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Unstaked"; + 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, @@ -22741,14 +22843,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] - pub struct Slashed { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Slashed"; + pub struct RetractTip { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22759,14 +22855,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] - #[doc = "consequence."] - pub struct Errored { - pub stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Errored { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Errored"; + 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, @@ -22777,11 +22873,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An internal error happened. Operations will be paused now."] - pub struct InternalError; - impl ::subxt::events::StaticEvent for InternalError { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "InternalError"; + pub struct Tip { + pub hash: ::subxt::utils::H256, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22792,13 +22887,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was partially checked for the given eras, but the process did not finish."] - pub struct BatchChecked { - pub eras: ::std::vec::Vec<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for BatchChecked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchChecked"; + pub struct CloseTip { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22809,157 +22899,240 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was terminated."] - #[doc = ""] - #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] - #[doc = "of the batch. A new batch will be created upon next block."] - pub struct BatchFinished; - impl ::subxt::events::StaticEvent for BatchFinished { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchFinished"; + pub struct SlashTip { + pub hash: ::subxt::utils::H256, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current \"head of the queue\" being unstaked."] - pub fn head( + 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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_fast_unstake::types::UnstakeRequest, + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "Head", - vec![], + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "report_awesome", + ReportAwesome { reason, who }, [ - 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, - 110u8, 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, - 2u8, 213u8, 134u8, 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, - 42u8, 135u8, 212u8, 108u8, 177u8, + 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, ], ) } - #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - pub fn queue( + #[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, - _0: 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( - "FastUnstake", - "Queue", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "retract_tip", + RetractTip { hash }, [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, - 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, - 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, - 205u8, 173u8, 189u8, 230u8, 71u8, + 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, + 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, + 137u8, 227u8, 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, + 184u8, 187u8, 65u8, 129u8, 131u8, ], ) } - #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - pub fn queue_root( + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"] + #[doc = "member of the `Tippers` set."] + #[doc = ""] + #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"] + #[doc = " a UTF-8-encoded URL."] + #[doc = "- `who`: The account which should be credited for the tip."] + #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"] + #[doc = " value of active tippers will be given to the `who`."] + #[doc = ""] + #[doc = "Emits `NewTip` if successful."] + #[doc = ""] + #[doc = "# "] + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "Queue", - Vec::new(), + 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, + }, [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, - 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, - 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, - 205u8, 173u8, 189u8, 230u8, 71u8, + 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, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_queue( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "CounterForQueue", - vec![], + hash: ::subxt::utils::H256, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "tip", + Tip { hash, tip_value }, [ - 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, - 63u8, 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, - 112u8, 5u8, 248u8, 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, - 237u8, 4u8, 138u8, 210u8, + 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 = " Number of eras to check per block."] + #[doc = "Close and payout a tip."] #[doc = ""] - #[doc = " If set to 0, this pallet does absolutely nothing."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] - #[doc = " nominator might be checked."] - pub fn eras_to_check_per_block( + #[doc = "The 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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "ErasToCheckPerBlock", - vec![], + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Tips", + "close_tip", + CloseTip { hash }, [ - 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, - 250u8, 203u8, 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, - 254u8, 23u8, 49u8, 140u8, 195u8, 116u8, 66u8, 124u8, 165u8, - 161u8, 151u8, 174u8, 37u8, 51u8, + 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, + 50u8, 81u8, 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, + 107u8, 114u8, 81u8, 200u8, 144u8, 175u8, 29u8, 142u8, 115u8, + 184u8, 102u8, 116u8, 156u8, 173u8, + ], + ) + } + #[doc = "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::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, ], ) } } } - } - pub mod parachains_origin { - use super::root_mod; - use super::runtime_types; - } - pub mod configuration { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_tips::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -22968,24 +23141,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeCooldown { - pub new: ::core::primitive::u32, + #[doc = "A new tip suggestion has been opened."] + pub struct NewTip { + pub tip_hash: ::subxt::utils::H256, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetValidationUpgradeDelay { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for NewTip { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "NewTip"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -22994,24 +23158,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCodeRetentionPeriod { - pub new: ::core::primitive::u32, + #[doc = "A tip suggestion has reached threshold and is closing."] + pub struct TipClosing { + pub tip_hash: ::subxt::utils::H256, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxCodeSize { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for TipClosing { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosing"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23020,24 +23175,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxPovSize { - pub new: ::core::primitive::u32, + #[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, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxHeadDataSize { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for TipClosed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosed"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23046,24 +23194,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadCores { - pub new: ::core::primitive::u32, + #[doc = "A tip suggestion has been retracted."] + pub struct TipRetracted { + pub tip_hash: ::subxt::utils::H256, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetParathreadRetries { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for TipRetracted { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipRetracted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23072,113 +23211,230 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetGroupRotationFrequency { - pub new: ::core::primitive::u32, + #[doc = "A tip suggestion has been slashed."] + pub struct TipSlashed { + pub tip_hash: ::subxt::utils::H256, + pub finder: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetChainAvailabilityPeriod { - pub new: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for TipSlashed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipSlashed"; } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetThreadAvailabilityPeriod { - pub new: ::core::primitive::u32, + } + 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( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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::StaticStorageAddress::new( + "Tips", + "Tips", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, + ], + ) + } + #[doc = " TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value."] + #[doc = " This has the insecure enumerable hash function since the key itself is already"] + #[doc = " guaranteed to be a secure hash."] + pub fn tips_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_tips::OpenTip< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::subxt::utils::H256, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Tips", + "Tips", + Vec::new(), + [ + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, + ], + ) + } + #[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::StaticStorageAddress< + ::std::vec::Vec<::core::primitive::u8>, + ::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, + )], + [ + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, + 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, + 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, + 194u8, 166u8, 91u8, 189u8, 134u8, + ], + ) + } + #[doc = " 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::StaticStorageAddress< + ::std::vec::Vec<::core::primitive::u8>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Tips", + "Reasons", + Vec::new(), + [ + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, + 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, + 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, + 194u8, 166u8, 91u8, 189u8, 134u8, + ], + ) + } } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSchedulingLookahead { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidatorsPerCore { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxValidators { - pub new: ::core::option::Option<::core::primitive::u32>, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputePostConclusionAcceptancePeriod { - pub new: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputeMaxSpamSlots { - pub new: ::core::primitive::u32, + } + 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::StaticConstantAddress<::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, + ], + ) + } + #[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::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "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::StaticConstantAddress<::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, + ], + ) + } + #[doc = " The percent of the final tip which goes to the original reporter of the tip."] + pub fn tip_finders_fee( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + 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, + ], + ) + } + #[doc = " The amount held on deposit for placing a tip report."] + pub fn tip_report_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } } + } + } + pub mod assets { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23187,11 +23443,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetDisputeConclusionByTimeOutPeriod { - pub new: ::core::primitive::u32, + pub struct Create { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub min_balance: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23200,11 +23461,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNoShowSlots { - pub new: ::core::primitive::u32, + pub struct ForceCreate { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub is_sufficient: ::core::primitive::bool, + #[codec(compact)] + pub min_balance: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23213,11 +23481,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNDelayTranches { - pub new: ::core::primitive::u32, + pub struct StartDestroy { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23226,11 +23494,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetZerothDelayTrancheWidth { - pub new: ::core::primitive::u32, + pub struct DestroyAccounts { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23239,11 +23507,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetNeededApprovals { - pub new: ::core::primitive::u32, + pub struct DestroyApprovals { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23252,11 +23520,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetRelayVrfModuloSamples { - pub new: ::core::primitive::u32, + pub struct FinishDestroy { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23265,11 +23533,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueCount { - pub new: ::core::primitive::u32, + pub struct Mint { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23278,11 +23552,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardQueueSize { - pub new: ::core::primitive::u32, + pub struct Burn { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23291,8 +23571,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxDownwardMessageSize { - pub new: ::core::primitive::u32, + pub struct Transfer { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23303,11 +23590,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUmpServiceTotalWeight { - pub new: runtime_types::sp_weights::weight_v2::Weight, + pub struct TransferKeepAlive { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23316,11 +23609,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageSize { - pub new: ::core::primitive::u32, + pub struct ForceTransfer { + #[codec(compact)] + pub id: ::core::primitive::u32, + 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 amount: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23329,11 +23632,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxUpwardMessageNumPerCandidate { - pub new: ::core::primitive::u32, + pub struct Freeze { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23342,11 +23649,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpOpenRequestTtl { - pub new: ::core::primitive::u32, + pub struct Thaw { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23355,11 +23666,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpSenderDeposit { - pub new: ::core::primitive::u128, + pub struct FreezeAsset { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23368,11 +23679,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpRecipientDeposit { - pub new: ::core::primitive::u128, + pub struct ThawAsset { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23381,11 +23692,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxCapacity { - pub new: ::core::primitive::u32, + pub struct TransferOwnership { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23394,11 +23709,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxTotalSize { - pub new: ::core::primitive::u32, + pub struct SetTeam { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23407,11 +23734,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainInboundChannels { - pub new: ::core::primitive::u32, + pub struct SetMetadata { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub name: ::std::vec::Vec<::core::primitive::u8>, + pub symbol: ::std::vec::Vec<::core::primitive::u8>, + pub decimals: ::core::primitive::u8, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23420,11 +23750,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadInboundChannels { - pub new: ::core::primitive::u32, + pub struct ClearMetadata { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23433,11 +23763,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpChannelMaxMessageSize { - pub new: ::core::primitive::u32, + pub struct ForceSetMetadata { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub name: ::std::vec::Vec<::core::primitive::u8>, + pub symbol: ::std::vec::Vec<::core::primitive::u8>, + pub decimals: ::core::primitive::u8, + pub is_frozen: ::core::primitive::bool, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23446,11 +23780,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParachainOutboundChannels { - pub new: ::core::primitive::u32, + pub struct ForceClearMetadata { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23459,11 +23793,31 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxParathreadOutboundChannels { - pub new: ::core::primitive::u32, + pub struct ForceAssetStatus { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub min_balance: ::core::primitive::u128, + pub is_sufficient: ::core::primitive::bool, + pub is_frozen: ::core::primitive::bool, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23472,8 +23826,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetHrmpMaxMessageNumPerCandidate { - pub new: ::core::primitive::u32, + pub struct ApproveTransfer { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23484,8 +23845,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUmpMaxIndividualWeight { - pub new: runtime_types::sp_weights::weight_v2::Weight, + pub struct CancelApproval { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23496,11 +23862,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfCheckingEnabled { - pub new: ::core::primitive::bool, + pub struct ForceCancelApproval { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23509,11 +23883,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPvfVotingTtl { - pub new: ::core::primitive::u32, + pub struct TransferApproved { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub destination: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23522,8 +23906,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinimumValidationUpgradeDelay { - pub new: ::core::primitive::u32, + pub struct Touch { + #[codec(compact)] + pub id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23534,980 +23919,1018 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetBypassConsistencyCheck { - pub new: ::core::primitive::bool, + pub struct Refund { + #[codec(compact)] + pub id: ::core::primitive::u32, + pub allow_burn: ::core::primitive::bool, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Set the validation upgrade cooldown."] - pub fn set_validation_upgrade_cooldown( + #[doc = "Issue a new class of fungible assets from a public origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "Funds of sender are reserved by `AssetDeposit`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset."] + #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] + #[doc = "member of the asset class's admin team."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn create( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + min_balance: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_validation_upgrade_cooldown", - SetValidationUpgradeCooldown { new }, + "Assets", + "create", + Create { + id, + admin, + min_balance, + }, [ - 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, - 190u8, 56u8, 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, - 230u8, 144u8, 42u8, 167u8, 175u8, 220u8, 102u8, 37u8, 60u8, - 10u8, 118u8, 79u8, 146u8, 203u8, + 197u8, 86u8, 72u8, 4u8, 104u8, 55u8, 113u8, 73u8, 86u8, 21u8, + 128u8, 40u8, 25u8, 91u8, 18u8, 246u8, 157u8, 168u8, 160u8, + 65u8, 101u8, 193u8, 120u8, 217u8, 245u8, 26u8, 194u8, 186u8, + 126u8, 231u8, 118u8, 176u8, ], ) } - #[doc = "Set the validation upgrade delay."] - pub fn set_validation_upgrade_delay( + #[doc = "Issue a new class of fungible assets from a privileged origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset."] + #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] + #[doc = "over this asset, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_create( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + is_sufficient: ::core::primitive::bool, + min_balance: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_validation_upgrade_delay", - SetValidationUpgradeDelay { new }, + "Assets", + "force_create", + ForceCreate { + id, + owner, + is_sufficient, + min_balance, + }, [ - 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, - 68u8, 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, - 62u8, 110u8, 76u8, 9u8, 218u8, 69u8, 55u8, 2u8, 233u8, 109u8, - 83u8, 117u8, 141u8, 253u8, + 152u8, 24u8, 39u8, 126u8, 101u8, 61u8, 147u8, 180u8, 121u8, + 52u8, 45u8, 205u8, 87u8, 32u8, 87u8, 7u8, 134u8, 168u8, 1u8, + 159u8, 191u8, 246u8, 90u8, 245u8, 80u8, 172u8, 185u8, 254u8, + 59u8, 37u8, 204u8, 162u8, ], ) } - #[doc = "Set the acceptance period for an included candidate."] - pub fn set_code_retention_period( + #[doc = "Start the process of destroying a fungible asset class."] + #[doc = ""] + #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] + #[doc = "destruction of an asset class."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "The asset class must be frozen before calling `start_destroy`."] + pub fn start_destroy( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_code_retention_period", - SetCodeRetentionPeriod { new }, + "Assets", + "start_destroy", + StartDestroy { id }, [ - 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, - 245u8, 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, - 12u8, 195u8, 27u8, 159u8, 96u8, 197u8, 145u8, 69u8, 241u8, - 59u8, 74u8, 220u8, 62u8, 205u8, + 83u8, 116u8, 245u8, 108u8, 180u8, 253u8, 0u8, 109u8, 9u8, + 206u8, 70u8, 95u8, 36u8, 80u8, 86u8, 186u8, 191u8, 161u8, + 227u8, 156u8, 162u8, 102u8, 82u8, 239u8, 124u8, 162u8, 128u8, + 121u8, 183u8, 120u8, 214u8, 136u8, ], ) } - #[doc = "Set the max validation code size for incoming upgrades."] - pub fn set_max_code_size( + #[doc = "Destroy all accounts associated with a given asset."] + #[doc = ""] + #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedAccounts` event."] + pub fn destroy_accounts( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_code_size", - SetMaxCodeSize { new }, + "Assets", + "destroy_accounts", + DestroyAccounts { id }, [ - 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, - 13u8, 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, - 73u8, 142u8, 115u8, 109u8, 132u8, 118u8, 194u8, 211u8, 82u8, - 20u8, 75u8, 55u8, 218u8, 46u8, + 35u8, 134u8, 147u8, 165u8, 201u8, 250u8, 221u8, 158u8, 216u8, + 147u8, 218u8, 79u8, 235u8, 188u8, 10u8, 101u8, 22u8, 48u8, + 1u8, 192u8, 176u8, 84u8, 111u8, 244u8, 99u8, 92u8, 254u8, + 49u8, 156u8, 24u8, 209u8, 180u8, ], ) } - #[doc = "Set the max POV block size for incoming upgrades."] - pub fn set_max_pov_size( + #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] + #[doc = ""] + #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedApprovals` event."] + pub fn destroy_approvals( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_pov_size", - SetMaxPovSize { new }, + "Assets", + "destroy_approvals", + DestroyApprovals { id }, [ - 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, - 194u8, 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, - 95u8, 10u8, 21u8, 33u8, 219u8, 234u8, 82u8, 122u8, 75u8, - 53u8, 14u8, 126u8, 218u8, 23u8, + 138u8, 31u8, 250u8, 93u8, 156u8, 239u8, 19u8, 43u8, 244u8, + 208u8, 159u8, 223u8, 143u8, 253u8, 235u8, 130u8, 159u8, + 117u8, 15u8, 79u8, 1u8, 205u8, 153u8, 36u8, 38u8, 23u8, 38u8, + 0u8, 193u8, 104u8, 140u8, 225u8, ], ) } - #[doc = "Set the max head data size for paras."] - pub fn set_max_head_data_size( + #[doc = "Complete destroying asset and unreserve currency."] + #[doc = ""] + #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] + #[doc = "hand."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each successful call emits the `Event::Destroyed` event."] + pub fn finish_destroy( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_head_data_size", - SetMaxHeadDataSize { new }, + "Assets", + "finish_destroy", + FinishDestroy { id }, [ - 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, - 112u8, 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, - 103u8, 39u8, 21u8, 125u8, 62u8, 177u8, 74u8, 25u8, 41u8, - 11u8, 200u8, 79u8, 139u8, 171u8, + 215u8, 16u8, 107u8, 60u8, 181u8, 1u8, 238u8, 172u8, 36u8, + 54u8, 187u8, 26u8, 159u8, 224u8, 161u8, 8u8, 115u8, 183u8, + 132u8, 121u8, 42u8, 165u8, 7u8, 193u8, 208u8, 124u8, 45u8, + 158u8, 100u8, 57u8, 117u8, 209u8, ], ) } - #[doc = "Set the number of parathread execution cores."] - pub fn set_parathread_cores( + #[doc = "Mint assets of a particular class."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount minted."] + #[doc = "- `beneficiary`: The account to be credited with the minted assets."] + #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] + pub fn mint( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_parathread_cores", - SetParathreadCores { new }, + "Assets", + "mint", + Mint { + id, + beneficiary, + amount, + }, [ - 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, - 99u8, 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, - 137u8, 132u8, 41u8, 106u8, 167u8, 81u8, 195u8, 172u8, 107u8, - 28u8, 138u8, 254u8, 180u8, 61u8, + 21u8, 30u8, 124u8, 32u8, 105u8, 231u8, 137u8, 139u8, 28u8, + 252u8, 232u8, 138u8, 197u8, 0u8, 109u8, 156u8, 102u8, 83u8, + 51u8, 128u8, 246u8, 186u8, 249u8, 144u8, 133u8, 127u8, 241u8, + 152u8, 201u8, 50u8, 41u8, 105u8, ], ) } - #[doc = "Set the number of retries for a particular parathread."] - pub fn set_parathread_retries( + #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] + #[doc = ""] + #[doc = "Bails with `NoAccount` if the `who` is already dead."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount burned."] + #[doc = "- `who`: The account to be debited from."] + #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] + #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] + pub fn burn( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_parathread_retries", - SetParathreadRetries { new }, + "Assets", + "burn", + Burn { id, who, amount }, [ - 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, - 133u8, 42u8, 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, - 153u8, 39u8, 161u8, 90u8, 4u8, 38u8, 167u8, 131u8, 237u8, - 42u8, 135u8, 37u8, 156u8, 108u8, + 104u8, 94u8, 68u8, 117u8, 145u8, 209u8, 149u8, 156u8, 131u8, + 137u8, 137u8, 93u8, 114u8, 237u8, 75u8, 56u8, 77u8, 65u8, + 18u8, 71u8, 19u8, 187u8, 76u8, 145u8, 24u8, 128u8, 62u8, + 234u8, 200u8, 247u8, 196u8, 45u8, ], ) } - #[doc = "Set the parachain validator-group rotation frequency"] - pub fn set_group_rotation_frequency( + #[doc = "Move some assets from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub fn transfer( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_group_rotation_frequency", - SetGroupRotationFrequency { new }, + "Assets", + "transfer", + Transfer { id, target, amount }, [ - 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, - 22u8, 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, - 188u8, 229u8, 150u8, 19u8, 12u8, 222u8, 25u8, 254u8, 48u8, - 218u8, 200u8, 208u8, 132u8, 251u8, + 132u8, 120u8, 134u8, 8u8, 238u8, 66u8, 45u8, 83u8, 151u8, + 8u8, 118u8, 62u8, 2u8, 163u8, 213u8, 255u8, 42u8, 211u8, + 125u8, 21u8, 150u8, 117u8, 177u8, 21u8, 105u8, 61u8, 3u8, + 2u8, 30u8, 70u8, 65u8, 145u8, ], ) } - #[doc = "Set the availability period for parachains."] - pub fn set_chain_availability_period( + #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub fn transfer_keep_alive( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_chain_availability_period", - SetChainAvailabilityPeriod { new }, + "Assets", + "transfer_keep_alive", + TransferKeepAlive { id, target, amount }, [ - 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, - 191u8, 193u8, 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, - 113u8, 28u8, 182u8, 75u8, 120u8, 208u8, 91u8, 125u8, 156u8, - 38u8, 56u8, 230u8, 24u8, 139u8, + 9u8, 46u8, 251u8, 191u8, 91u8, 192u8, 119u8, 203u8, 147u8, + 84u8, 76u8, 27u8, 237u8, 174u8, 67u8, 249u8, 185u8, 199u8, + 240u8, 122u8, 160u8, 111u8, 245u8, 247u8, 241u8, 197u8, + 238u8, 253u8, 75u8, 216u8, 41u8, 148u8, ], ) } - #[doc = "Set the availability period for parathreads."] - pub fn set_thread_availability_period( + #[doc = "Move some assets from one account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `source`: The account to be debited."] + #[doc = "- `dest`: The account to be credited."] + #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] + #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] + #[doc = "below the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] + #[doc = "`dest`."] + pub fn force_transfer( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_thread_availability_period", - SetThreadAvailabilityPeriod { new }, + "Assets", + "force_transfer", + ForceTransfer { + id, + source, + dest, + amount, + }, [ - 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, - 107u8, 236u8, 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, - 212u8, 129u8, 44u8, 19u8, 162u8, 172u8, 162u8, 46u8, 166u8, - 10u8, 67u8, 112u8, 206u8, 50u8, + 253u8, 100u8, 109u8, 66u8, 153u8, 140u8, 39u8, 85u8, 19u8, + 199u8, 68u8, 6u8, 124u8, 200u8, 250u8, 142u8, 104u8, 55u8, + 190u8, 25u8, 117u8, 180u8, 201u8, 245u8, 153u8, 192u8, 240u8, + 5u8, 176u8, 142u8, 106u8, 92u8, ], ) } - #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] - pub fn set_scheduling_lookahead( + #[doc = "Disallow further unprivileged transfers from an account."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_scheduling_lookahead", - SetSchedulingLookahead { new }, + "Assets", + "freeze", + Freeze { id, who }, [ - 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, - 119u8, 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, - 204u8, 167u8, 100u8, 199u8, 157u8, 186u8, 174u8, 40u8, 218u8, - 19u8, 230u8, 253u8, 7u8, + 191u8, 155u8, 214u8, 95u8, 125u8, 58u8, 207u8, 76u8, 99u8, + 15u8, 102u8, 189u8, 26u8, 232u8, 9u8, 73u8, 231u8, 114u8, + 199u8, 129u8, 110u8, 84u8, 22u8, 114u8, 108u8, 57u8, 83u8, + 246u8, 92u8, 0u8, 127u8, 53u8, ], ) } - #[doc = "Set the maximum number of validators to assign to any core."] - pub fn set_max_validators_per_core( + #[doc = "Allow unprivileged transfers from an account again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be unfrozen."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw( &self, - new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_validators_per_core", - SetMaxValidatorsPerCore { new }, + "Assets", + "thaw", + Thaw { id, who }, [ - 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, - 117u8, 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, - 163u8, 82u8, 248u8, 130u8, 32u8, 103u8, 225u8, 151u8, 145u8, - 36u8, 98u8, 158u8, 6u8, 245u8, + 52u8, 37u8, 227u8, 9u8, 177u8, 120u8, 93u8, 129u8, 81u8, + 35u8, 107u8, 22u8, 80u8, 58u8, 3u8, 98u8, 211u8, 65u8, 49u8, + 107u8, 184u8, 102u8, 185u8, 84u8, 160u8, 73u8, 12u8, 242u8, + 203u8, 233u8, 79u8, 117u8, ], ) } - #[doc = "Set the maximum number of validators to use in parachain consensus."] - pub fn set_max_validators( + #[doc = "Disallow further unprivileged transfers for the asset class."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze_asset( &self, - new: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_validators", - SetMaxValidators { new }, + "Assets", + "freeze_asset", + FreezeAsset { id }, [ - 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, - 76u8, 7u8, 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, - 1u8, 106u8, 180u8, 121u8, 20u8, 137u8, 169u8, 144u8, 77u8, - 38u8, 53u8, 243u8, 127u8, + 208u8, 101u8, 0u8, 73u8, 41u8, 192u8, 227u8, 44u8, 189u8, + 231u8, 40u8, 124u8, 189u8, 147u8, 136u8, 210u8, 76u8, 32u8, + 249u8, 183u8, 68u8, 58u8, 150u8, 136u8, 192u8, 47u8, 173u8, + 178u8, 225u8, 84u8, 110u8, 1u8, ], ) } - #[doc = "Set the dispute period, in number of sessions to keep for disputes."] - pub fn set_dispute_period( + #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw_asset( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_dispute_period", - SetDisputePeriod { new }, + "Assets", + "thaw_asset", + ThawAsset { id }, [ - 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, - 125u8, 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, - 152u8, 47u8, 75u8, 56u8, 63u8, 61u8, 33u8, 163u8, 151u8, - 97u8, 105u8, 99u8, 55u8, 180u8, + 18u8, 198u8, 141u8, 158u8, 182u8, 167u8, 160u8, 227u8, 20u8, + 74u8, 80u8, 164u8, 89u8, 46u8, 168u8, 139u8, 251u8, 83u8, + 155u8, 91u8, 91u8, 46u8, 205u8, 55u8, 171u8, 175u8, 167u8, + 188u8, 116u8, 155u8, 79u8, 117u8, ], ) } - #[doc = "Set the dispute post conclusion acceptance period."] - pub fn set_dispute_post_conclusion_acceptance_period( + #[doc = "Change the Owner of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_ownership( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_dispute_post_conclusion_acceptance_period", - SetDisputePostConclusionAcceptancePeriod { new }, + "Assets", + "transfer_ownership", + TransferOwnership { id, owner }, [ - 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, - 54u8, 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, - 61u8, 92u8, 97u8, 203u8, 20u8, 107u8, 50u8, 208u8, 250u8, - 208u8, 159u8, 225u8, 175u8, + 170u8, 94u8, 202u8, 42u8, 41u8, 156u8, 250u8, 63u8, 113u8, + 110u8, 166u8, 129u8, 90u8, 233u8, 35u8, 87u8, 123u8, 172u8, + 65u8, 108u8, 170u8, 237u8, 252u8, 70u8, 186u8, 12u8, 58u8, + 6u8, 173u8, 87u8, 161u8, 211u8, ], ) } - #[doc = "Set the maximum number of dispute spam slots."] - pub fn set_dispute_max_spam_slots( + #[doc = "Change the Issuer, Admin and Freezer of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_team( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_dispute_max_spam_slots", - SetDisputeMaxSpamSlots { new }, + "Assets", + "set_team", + SetTeam { + id, + issuer, + admin, + freezer, + }, [ - 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, - 171u8, 124u8, 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, - 142u8, 18u8, 121u8, 129u8, 196u8, 121u8, 25u8, 15u8, 252u8, - 229u8, 89u8, 230u8, 14u8, 68u8, + 30u8, 60u8, 182u8, 252u8, 64u8, 97u8, 6u8, 80u8, 159u8, + 204u8, 14u8, 227u8, 54u8, 20u8, 172u8, 100u8, 77u8, 59u8, + 164u8, 247u8, 122u8, 39u8, 129u8, 106u8, 87u8, 82u8, 77u8, + 165u8, 215u8, 232u8, 159u8, 29u8, ], ) } - #[doc = "Set the dispute conclusion by time out period."] - pub fn set_dispute_conclusion_by_time_out_period( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_dispute_conclusion_by_time_out_period", - SetDisputeConclusionByTimeOutPeriod { new }, - [ - 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, - 33u8, 36u8, 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, - 32u8, 19u8, 49u8, 40u8, 172u8, 41u8, 195u8, 182u8, 44u8, - 255u8, 136u8, 204u8, 250u8, 6u8, - ], - ) - } - #[doc = "Set the no show slots, in number of number of consensus slots."] - #[doc = "Must be at least 1."] - pub fn set_no_show_slots( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_no_show_slots", - SetNoShowSlots { new }, - [ - 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, - 16u8, 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, - 238u8, 115u8, 126u8, 140u8, 236u8, 17u8, 177u8, 192u8, 210u8, - 239u8, 126u8, 107u8, 117u8, 207u8, - ], - ) - } - #[doc = "Set the total number of delay tranches."] - pub fn set_n_delay_tranches( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_n_delay_tranches", - SetNDelayTranches { new }, - [ - 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, - 30u8, 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, - 108u8, 195u8, 65u8, 153u8, 30u8, 181u8, 181u8, 158u8, 252u8, - 120u8, 119u8, 36u8, 146u8, - ], - ) - } - #[doc = "Set the zeroth delay tranche width."] - pub fn set_zeroth_delay_tranche_width( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_zeroth_delay_tranche_width", - SetZerothDelayTrancheWidth { new }, - [ - 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, - 107u8, 91u8, 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, - 62u8, 78u8, 96u8, 231u8, 195u8, 29u8, 158u8, 113u8, 46u8, - 96u8, 29u8, 0u8, 154u8, 80u8, - ], - ) - } - #[doc = "Set the number of validators needed to approve a block."] - pub fn set_needed_approvals( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_needed_approvals", - SetNeededApprovals { new }, - [ - 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, - 227u8, 185u8, 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, - 104u8, 100u8, 26u8, 162u8, 65u8, 58u8, 162u8, 52u8, 211u8, - 66u8, 242u8, 177u8, 230u8, 98u8, - ], - ) - } - #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] - pub fn set_relay_vrf_modulo_samples( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_relay_vrf_modulo_samples", - SetRelayVrfModuloSamples { new }, - [ - 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, - 147u8, 166u8, 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, - 189u8, 120u8, 239u8, 131u8, 235u8, 35u8, 151u8, 15u8, 30u8, - 81u8, 0u8, 2u8, 64u8, 21u8, - ], - ) - } - #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] - pub fn set_max_upward_queue_count( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_upward_queue_count", - SetMaxUpwardQueueCount { new }, - [ - 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, - 122u8, 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, - 10u8, 149u8, 50u8, 183u8, 165u8, 32u8, 233u8, 105u8, 82u8, - 177u8, 120u8, 25u8, 44u8, 130u8, - ], - ) - } - #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] - pub fn set_max_upward_queue_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_upward_queue_size", - SetMaxUpwardQueueSize { new }, - [ - 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, - 9u8, 209u8, 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, - 59u8, 60u8, 30u8, 47u8, 22u8, 163u8, 119u8, 200u8, 197u8, - 192u8, 112u8, 243u8, 156u8, 12u8, - ], - ) - } - #[doc = "Set the critical downward message size."] - pub fn set_max_downward_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_downward_message_size", - SetMaxDownwardMessageSize { new }, - [ - 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, - 156u8, 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, - 239u8, 183u8, 68u8, 124u8, 55u8, 211u8, 186u8, 115u8, 70u8, - 195u8, 61u8, 151u8, 32u8, 218u8, - ], - ) - } - #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] - pub fn set_ump_service_total_weight( - &self, - new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_ump_service_total_weight", - SetUmpServiceTotalWeight { new }, - [ - 178u8, 63u8, 233u8, 183u8, 160u8, 109u8, 10u8, 162u8, 150u8, - 110u8, 66u8, 166u8, 197u8, 207u8, 91u8, 208u8, 137u8, 106u8, - 140u8, 184u8, 35u8, 85u8, 138u8, 49u8, 32u8, 15u8, 150u8, - 136u8, 50u8, 197u8, 21u8, 99u8, - ], - ) - } - #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] - pub fn set_max_upward_message_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_upward_message_size", - SetMaxUpwardMessageSize { new }, - [ - 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, - 115u8, 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, - 34u8, 73u8, 142u8, 94u8, 116u8, 151u8, 113u8, 92u8, 151u8, - 227u8, 116u8, 250u8, 101u8, 179u8, - ], - ) - } - #[doc = "Sets the maximum number of messages that a candidate can contain."] - pub fn set_max_upward_message_num_per_candidate( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_max_upward_message_num_per_candidate", - SetMaxUpwardMessageNumPerCandidate { new }, - [ - 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, - 196u8, 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, - 169u8, 87u8, 255u8, 211u8, 38u8, 142u8, 37u8, 74u8, 144u8, - 204u8, 75u8, 94u8, 154u8, 149u8, - ], - ) - } - #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] - pub fn set_hrmp_open_request_ttl( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_open_request_ttl", - SetHrmpOpenRequestTtl { new }, - [ - 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, - 207u8, 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, - 194u8, 180u8, 96u8, 129u8, 7u8, 138u8, 110u8, 14u8, 229u8, - 98u8, 71u8, 22u8, 229u8, 247u8, - ], - ) - } - #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] - pub fn set_hrmp_sender_deposit( - &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_sender_deposit", - SetHrmpSenderDeposit { new }, - [ - 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, - 54u8, 128u8, 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, - 105u8, 61u8, 96u8, 119u8, 16u8, 53u8, 115u8, 120u8, 152u8, - 122u8, 182u8, 171u8, 233u8, 48u8, - ], - ) - } - #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] - #[doc = "channel."] - pub fn set_hrmp_recipient_deposit( - &self, - new: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_recipient_deposit", - SetHrmpRecipientDeposit { new }, - [ - 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, - 150u8, 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, - 89u8, 43u8, 6u8, 173u8, 8u8, 235u8, 52u8, 18u8, 78u8, 129u8, - 227u8, 61u8, 74u8, 83u8, - ], - ) - } - #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] - pub fn set_hrmp_channel_max_capacity( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_channel_max_capacity", - SetHrmpChannelMaxCapacity { new }, - [ - 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, - 190u8, 60u8, 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, - 30u8, 197u8, 11u8, 33u8, 211u8, 224u8, 49u8, 165u8, 149u8, - 155u8, 197u8, 44u8, 6u8, 167u8, - ], - ) - } - #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] - pub fn set_hrmp_channel_max_total_size( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_channel_max_total_size", - SetHrmpChannelMaxTotalSize { new }, - [ - 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, - 34u8, 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, - 105u8, 64u8, 183u8, 235u8, 39u8, 133u8, 70u8, 77u8, 233u8, - 201u8, 222u8, 8u8, 43u8, 159u8, - ], - ) - } - #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] - pub fn set_hrmp_max_parachain_inbound_channels( - &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_max_parachain_inbound_channels", - SetHrmpMaxParachainInboundChannels { new }, - [ - 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, - 121u8, 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, - 136u8, 77u8, 103u8, 169u8, 185u8, 8u8, 214u8, 214u8, 23u8, - 195u8, 100u8, 72u8, 45u8, 12u8, - ], - ) - } - #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] - pub fn set_hrmp_max_parathread_inbound_channels( + #[doc = "Set the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Funds of sender are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_metadata( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + symbol: ::std::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_max_parathread_inbound_channels", - SetHrmpMaxParathreadInboundChannels { new }, + "Assets", + "set_metadata", + SetMetadata { + id, + name, + symbol, + decimals, + }, [ - 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, - 145u8, 220u8, 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, - 27u8, 125u8, 231u8, 111u8, 23u8, 32u8, 239u8, 28u8, 200u8, - 255u8, 91u8, 207u8, 99u8, 107u8, + 15u8, 184u8, 50u8, 46u8, 164u8, 27u8, 105u8, 186u8, 35u8, + 115u8, 194u8, 247u8, 74u8, 252u8, 139u8, 242u8, 108u8, 221u8, + 122u8, 15u8, 139u8, 74u8, 123u8, 17u8, 192u8, 138u8, 182u8, + 163u8, 77u8, 7u8, 124u8, 18u8, ], ) } - #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] - pub fn set_hrmp_channel_max_message_size( + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Any deposit is freed for the asset owner."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_metadata( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_channel_max_message_size", - SetHrmpChannelMaxMessageSize { new }, + "Assets", + "clear_metadata", + ClearMetadata { id }, [ - 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, - 151u8, 27u8, 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, - 209u8, 125u8, 122u8, 1u8, 79u8, 28u8, 10u8, 14u8, 83u8, 65u8, - 253u8, 173u8, 116u8, 209u8, + 192u8, 41u8, 71u8, 183u8, 13u8, 128u8, 244u8, 255u8, 175u8, + 36u8, 99u8, 175u8, 15u8, 129u8, 228u8, 76u8, 107u8, 214u8, + 166u8, 116u8, 244u8, 139u8, 60u8, 31u8, 123u8, 61u8, 203u8, + 59u8, 213u8, 146u8, 116u8, 126u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] - pub fn set_hrmp_max_parachain_outbound_channels( + #[doc = "Force the metadata for an asset to some value."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is left alone."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] + pub fn force_set_metadata( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + symbol: ::std::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + is_frozen: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_max_parachain_outbound_channels", - SetHrmpMaxParachainOutboundChannels { new }, + "Assets", + "force_set_metadata", + ForceSetMetadata { + id, + name, + symbol, + decimals, + is_frozen, + }, [ - 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, - 11u8, 20u8, 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, - 116u8, 136u8, 149u8, 181u8, 207u8, 95u8, 151u8, 7u8, 98u8, - 17u8, 224u8, 157u8, 117u8, 88u8, + 7u8, 30u8, 55u8, 233u8, 217u8, 113u8, 196u8, 21u8, 29u8, + 122u8, 168u8, 225u8, 63u8, 104u8, 57u8, 78u8, 76u8, 145u8, + 121u8, 118u8, 91u8, 149u8, 87u8, 26u8, 26u8, 125u8, 44u8, + 241u8, 143u8, 138u8, 144u8, 8u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] - pub fn set_hrmp_max_parathread_outbound_channels( + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is returned."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_clear_metadata( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_max_parathread_outbound_channels", - SetHrmpMaxParathreadOutboundChannels { new }, + "Assets", + "force_clear_metadata", + ForceClearMetadata { id }, [ - 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, - 220u8, 194u8, 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, - 152u8, 13u8, 222u8, 54u8, 175u8, 170u8, 235u8, 68u8, 236u8, - 130u8, 178u8, 56u8, 140u8, 31u8, + 71u8, 191u8, 101u8, 72u8, 188u8, 223u8, 215u8, 187u8, 200u8, + 206u8, 3u8, 42u8, 4u8, 62u8, 117u8, 106u8, 26u8, 2u8, 68u8, + 202u8, 162u8, 142u8, 172u8, 123u8, 48u8, 196u8, 247u8, 89u8, + 147u8, 75u8, 84u8, 109u8, ], ) } - #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] - pub fn set_hrmp_max_message_num_per_candidate( + #[doc = "Alter the attributes of a given asset."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] + #[doc = "value to account for the state bloat associated with its balance storage. If set to"] + #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] + #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] + #[doc = "growth)."] + #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_asset_status( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + min_balance: ::core::primitive::u128, + is_sufficient: ::core::primitive::bool, + is_frozen: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_hrmp_max_message_num_per_candidate", - SetHrmpMaxMessageNumPerCandidate { new }, + "Assets", + "force_asset_status", + ForceAssetStatus { + id, + owner, + issuer, + admin, + freezer, + min_balance, + is_sufficient, + is_frozen, + }, [ - 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, - 57u8, 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, - 250u8, 136u8, 30u8, 29u8, 110u8, 105u8, 219u8, 166u8, 91u8, - 140u8, 44u8, 192u8, 37u8, 185u8, + 46u8, 229u8, 189u8, 83u8, 196u8, 180u8, 79u8, 77u8, 71u8, + 147u8, 77u8, 243u8, 99u8, 3u8, 205u8, 171u8, 129u8, 25u8, + 60u8, 10u8, 162u8, 50u8, 205u8, 231u8, 184u8, 75u8, 42u8, + 230u8, 48u8, 194u8, 236u8, 71u8, ], ) } - #[doc = "Sets the maximum amount of weight any individual upward message may consume."] - pub fn set_ump_max_individual_weight( + #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] + #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] + #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] + #[doc = "meet the right value."] + #[doc = ""] + #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] + #[doc = "making this call."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account to delegate permission to transfer asset."] + #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] + #[doc = "already an approval in place, then this acts additively."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn approve_transfer( &self, - new: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_ump_max_individual_weight", - SetUmpMaxIndividualWeight { new }, + "Assets", + "approve_transfer", + ApproveTransfer { + id, + delegate, + amount, + }, [ - 66u8, 190u8, 15u8, 172u8, 67u8, 16u8, 117u8, 247u8, 176u8, - 25u8, 163u8, 130u8, 147u8, 224u8, 226u8, 101u8, 219u8, 173u8, - 176u8, 49u8, 90u8, 133u8, 12u8, 223u8, 220u8, 18u8, 83u8, - 232u8, 137u8, 52u8, 206u8, 71u8, + 85u8, 79u8, 216u8, 233u8, 163u8, 169u8, 226u8, 111u8, 10u8, + 110u8, 33u8, 239u8, 248u8, 222u8, 84u8, 160u8, 80u8, 164u8, + 29u8, 88u8, 164u8, 252u8, 238u8, 212u8, 9u8, 230u8, 201u8, + 166u8, 192u8, 225u8, 94u8, 13u8, ], ) } - #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] - pub fn set_pvf_checking_enabled( + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place between signer and"] + #[doc = "`delegate`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn cancel_approval( &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_pvf_checking_enabled", - SetPvfCheckingEnabled { new }, + "Assets", + "cancel_approval", + CancelApproval { id, delegate }, [ - 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, - 29u8, 219u8, 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, - 73u8, 125u8, 54u8, 236u8, 3u8, 80u8, 114u8, 155u8, 244u8, - 132u8, 57u8, 63u8, 158u8, 248u8, + 120u8, 10u8, 77u8, 128u8, 1u8, 232u8, 42u8, 2u8, 87u8, 7u8, + 217u8, 51u8, 172u8, 13u8, 136u8, 176u8, 153u8, 128u8, 196u8, + 3u8, 190u8, 139u8, 219u8, 24u8, 35u8, 51u8, 241u8, 87u8, + 67u8, 49u8, 181u8, 203u8, ], ) } - #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] - pub fn set_pvf_voting_ttl( + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] + #[doc = "account of the asset `id`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_cancel_approval( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_pvf_voting_ttl", - SetPvfVotingTtl { new }, + "Assets", + "force_cancel_approval", + ForceCancelApproval { + id, + owner, + delegate, + }, [ - 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, - 123u8, 20u8, 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, - 208u8, 204u8, 91u8, 210u8, 40u8, 6u8, 201u8, 147u8, 46u8, - 166u8, 219u8, 227u8, 121u8, 187u8, + 192u8, 196u8, 91u8, 219u8, 20u8, 150u8, 220u8, 79u8, 81u8, + 151u8, 104u8, 109u8, 21u8, 87u8, 158u8, 169u8, 208u8, 4u8, + 241u8, 109u8, 230u8, 166u8, 237u8, 164u8, 90u8, 54u8, 14u8, + 51u8, 84u8, 239u8, 178u8, 202u8, ], ) } - #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] - #[doc = "upgrade taking place."] + #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] + #[doc = "account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] + #[doc = "signer."] + #[doc = ""] + #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] + #[doc = "reserved by `approve_transfer` is unreserved."] #[doc = ""] - #[doc = "See the field documentation for information and constraints for the new value."] - pub fn set_minimum_validation_upgrade_delay( + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] + #[doc = "from which the asset balance will be withdrawn."] + #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] + #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = ""] + #[doc = "Emits `TransferredApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_approved( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + destination: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_minimum_validation_upgrade_delay", - SetMinimumValidationUpgradeDelay { new }, + "Assets", + "transfer_approved", + TransferApproved { + id, + owner, + destination, + amount, + }, [ - 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, - 37u8, 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, - 242u8, 210u8, 182u8, 111u8, 121u8, 109u8, 50u8, 130u8, 46u8, - 127u8, 122u8, 40u8, 141u8, 242u8, + 151u8, 228u8, 207u8, 182u8, 179u8, 212u8, 208u8, 3u8, 207u8, + 181u8, 193u8, 164u8, 74u8, 160u8, 81u8, 191u8, 42u8, 227u8, + 56u8, 238u8, 50u8, 75u8, 8u8, 50u8, 131u8, 83u8, 152u8, 20u8, + 141u8, 39u8, 29u8, 205u8, ], ) } - #[doc = "Setting this to true will disable consistency checks for the configuration setters."] - #[doc = "Use with caution."] - pub fn set_bypass_consistency_check( + #[doc = "Create an asset account for non-provider assets."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] + #[doc = " to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + pub fn touch( &self, - new: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload - { + id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Configuration", - "set_bypass_consistency_check", - SetBypassConsistencyCheck { new }, - [ - 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, - 121u8, 26u8, 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, - 177u8, 107u8, 34u8, 74u8, 103u8, 128u8, 252u8, 160u8, 169u8, - 246u8, 125u8, 127u8, 153u8, 129u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The active configuration for the current session."] pub fn active_config (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Configuration", - "ActiveConfig", - vec![], + "Assets", + "touch", + Touch { id }, [ - 152u8, 7u8, 210u8, 144u8, 253u8, 1u8, 141u8, 200u8, 122u8, - 214u8, 104u8, 100u8, 228u8, 235u8, 16u8, 86u8, 213u8, 212u8, - 204u8, 46u8, 74u8, 95u8, 217u8, 3u8, 40u8, 28u8, 149u8, - 175u8, 7u8, 146u8, 24u8, 3u8, + 114u8, 149u8, 179u8, 168u8, 115u8, 117u8, 32u8, 50u8, 39u8, + 77u8, 148u8, 238u8, 123u8, 96u8, 193u8, 174u8, 113u8, 141u8, + 34u8, 228u8, 228u8, 214u8, 71u8, 111u8, 55u8, 126u8, 103u8, + 181u8, 133u8, 77u8, 116u8, 105u8, ], ) } - #[doc = " Pending configuration changes."] + #[doc = "Return the deposit (if any) of an asset account."] #[doc = ""] - #[doc = " This is a list of configuration changes, each with a session index at which it should"] - #[doc = " be applied."] + #[doc = "The origin must be Signed."] #[doc = ""] - #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] - #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Configuration", - "PendingConfigs", - vec![], - [ - 206u8, 161u8, 39u8, 154u8, 62u8, 215u8, 33u8, 93u8, 214u8, - 37u8, 29u8, 71u8, 32u8, 176u8, 87u8, 166u8, 39u8, 11u8, 81u8, - 155u8, 174u8, 118u8, 138u8, 76u8, 22u8, 248u8, 148u8, 210u8, - 243u8, 41u8, 111u8, 216u8, - ], - ) - } - #[doc = " If this is set, then the configuration setters will bypass the consistency checks. This"] - #[doc = " is meant to be used only as the last resort."] - pub fn bypass_consistency_check( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::bool>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Configuration", - "BypassConsistencyCheck", - vec![], - [ - 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, - 219u8, 184u8, 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, - 226u8, 83u8, 129u8, 162u8, 109u8, 148u8, 75u8, 120u8, 216u8, - 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, - ], - ) - } - } - } - } - pub mod paras_shared { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current session index."] - pub fn current_session_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasShared", - "CurrentSessionIndex", - vec![], - [ - 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, 14u8, - 221u8, 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, 33u8, - 175u8, 7u8, 97u8, 67u8, 186u8, 96u8, 57u8, 147u8, 120u8, - 107u8, 91u8, 147u8, 64u8, - ], - ) - } - #[doc = " All the validators actively participating in parachain consensus."] - #[doc = " Indices are into the broader validator set."] - pub fn active_validator_indices( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasShared", - "ActiveValidatorIndices", - vec![], - [ - 123u8, 26u8, 202u8, 53u8, 219u8, 42u8, 54u8, 92u8, 144u8, - 74u8, 228u8, 234u8, 129u8, 216u8, 161u8, 98u8, 199u8, 12u8, - 13u8, 231u8, 23u8, 166u8, 185u8, 209u8, 191u8, 33u8, 231u8, - 252u8, 232u8, 44u8, 213u8, 221u8, - ], - ) - } - #[doc = " The parachain attestation keys of the validators actively participating in parachain consensus."] - #[doc = " This should be the same length as `ActiveValidatorIndices`."] - pub fn active_validator_keys( + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + pub fn refund( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasShared", - "ActiveValidatorKeys", - vec![], + id: ::core::primitive::u32, + allow_burn: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Assets", + "refund", + Refund { id, allow_burn }, [ - 33u8, 14u8, 54u8, 86u8, 184u8, 171u8, 194u8, 35u8, 187u8, - 252u8, 181u8, 79u8, 229u8, 134u8, 50u8, 235u8, 162u8, 216u8, - 108u8, 160u8, 175u8, 172u8, 239u8, 114u8, 57u8, 238u8, 9u8, - 54u8, 57u8, 196u8, 105u8, 15u8, + 20u8, 139u8, 248u8, 67u8, 123u8, 221u8, 7u8, 106u8, 239u8, + 156u8, 68u8, 59u8, 81u8, 184u8, 47u8, 188u8, 195u8, 227u8, + 75u8, 168u8, 126u8, 176u8, 91u8, 187u8, 30u8, 34u8, 24u8, + 223u8, 108u8, 101u8, 88u8, 83u8, ], ) } } } - } - pub mod para_inclusion { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = - runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; + pub type Event = runtime_types::pallet_assets::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -24519,18 +24942,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was backed. `[candidate, head_data]`"] - pub struct CandidateBacked( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - pub runtime_types::polkadot_primitives::v2::GroupIndex, - ); - impl ::subxt::events::StaticEvent for CandidateBacked { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateBacked"; + #[doc = "Some asset class was created."] + pub struct Created { + pub asset_id: ::core::primitive::u32, + pub creator: ::subxt::utils::AccountId32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Created"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -24541,18 +24961,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was included. `[candidate, head_data]`"] - pub struct CandidateIncluded( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - pub runtime_types::polkadot_primitives::v2::GroupIndex, - ); - impl ::subxt::events::StaticEvent for CandidateIncluded { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateIncluded"; + #[doc = "Some assets were issued."] + pub struct Issued { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub total_supply: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Issued"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -24563,148 +24980,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate timed out. `[candidate, head_data]`"] - pub struct CandidateTimedOut( - pub runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v2::CoreIndex, - ); - impl ::subxt::events::StaticEvent for CandidateTimedOut { - const PALLET: &'static str = "ParaInclusion"; - const EVENT: &'static str = "CandidateTimedOut"; + #[doc = "Some assets were transferred."] + pub struct Transferred { + pub asset_id: ::core::primitive::u32, + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "AvailabilityBitfields", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, - 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, - 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, - 114u8, 215u8, 250u8, 111u8, 225u8, - ], - ) - } - #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "AvailabilityBitfields", - Vec::new(), - [ - 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, - 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, - 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, - 114u8, 215u8, 250u8, 111u8, 225u8, - ], - ) - } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "PendingAvailability", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, - 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, - 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, - 113u8, 72u8, 12u8, 140u8, 242u8, - ], - ) - } - #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "PendingAvailability", - Vec::new(), - [ - 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, - 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, - 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, - 113u8, 72u8, 12u8, 140u8, 242u8, - ], - ) - } - #[doc = " The commitments of candidates pending availability, by `ParaId`."] - pub fn pending_availability_commitments( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "PendingAvailabilityCommitments", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, - 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, - 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, - 195u8, 56u8, 59u8, 54u8, 8u8, - ], - ) - } - #[doc = " The commitments of candidates pending availability, by `ParaId`."] - pub fn pending_availability_commitments_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInclusion", - "PendingAvailabilityCommitments", - Vec::new(), - [ - 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, - 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, - 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, - 195u8, 56u8, 59u8, 54u8, 8u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Transferred { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Transferred"; } - } - } - pub mod para_inherent { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -24714,270 +25000,36 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Enter { - pub data: runtime_types::polkadot_primitives::v2::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] - pub fn enter( - &self, - data: runtime_types::polkadot_primitives::v2::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParaInherent", - "enter", - Enter { data }, - [ - 92u8, 247u8, 59u8, 6u8, 2u8, 102u8, 76u8, 147u8, 46u8, 232u8, - 38u8, 191u8, 145u8, 155u8, 23u8, 39u8, 228u8, 95u8, 57u8, - 249u8, 247u8, 20u8, 9u8, 189u8, 156u8, 187u8, 207u8, 107u8, - 0u8, 13u8, 228u8, 6u8, - ], - ) - } + #[doc = "Some assets were destroyed."] + pub struct Burned { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub balance: ::core::primitive::u128, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Whether the paras inherent was included within this block."] - #[doc = ""] - #[doc = " The `Option<()>` is effectively a `bool`, but it never hits storage in the `None` variant"] - #[doc = " due to the guarantees of FRAME's storage APIs."] - #[doc = ""] - #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] - pub fn included( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<()>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInherent", - "Included", - vec![], - [ - 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, 220u8, - 35u8, 143u8, 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, 186u8, - 139u8, 203u8, 205u8, 12u8, 10u8, 2u8, 27u8, 167u8, 182u8, - 244u8, 167u8, 220u8, 44u8, 16u8, - ], - ) - } - #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] - pub fn on_chain_votes( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< - ::subxt::utils::H256, - >, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaInherent", - "OnChainVotes", - vec![], - [ - 187u8, 34u8, 219u8, 197u8, 202u8, 214u8, 140u8, 152u8, 253u8, - 65u8, 206u8, 217u8, 36u8, 40u8, 107u8, 215u8, 135u8, 115u8, - 35u8, 61u8, 180u8, 131u8, 0u8, 184u8, 193u8, 76u8, 165u8, - 63u8, 106u8, 222u8, 126u8, 113u8, - ], - ) - } + impl ::subxt::events::StaticEvent for Burned { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Burned"; } - } - } - pub mod para_scheduler { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " All the validator groups. One for each core. Indices are into `ActiveValidators` - not the"] - #[doc = " broader set of Polkadot validators, but instead just the subset used for parachains during"] - #[doc = " this session."] - #[doc = ""] - #[doc = " Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers."] - #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] - pub fn validator_groups( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "ValidatorGroups", - vec![], - [ - 175u8, 187u8, 69u8, 76u8, 211u8, 36u8, 162u8, 147u8, 83u8, - 65u8, 83u8, 44u8, 241u8, 112u8, 246u8, 14u8, 237u8, 255u8, - 248u8, 58u8, 44u8, 207u8, 159u8, 112u8, 31u8, 90u8, 15u8, - 85u8, 4u8, 212u8, 215u8, 211u8, - ], - ) - } - #[doc = " A queue of upcoming claims and which core they should be mapped onto."] - #[doc = ""] - #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] - #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "ParathreadQueue", - vec![], - [ - 79u8, 144u8, 191u8, 114u8, 235u8, 55u8, 133u8, 208u8, 73u8, - 97u8, 73u8, 148u8, 96u8, 185u8, 110u8, 95u8, 132u8, 54u8, - 244u8, 86u8, 50u8, 218u8, 121u8, 226u8, 153u8, 58u8, 232u8, - 202u8, 132u8, 147u8, 168u8, 48u8, - ], - ) - } - #[doc = " One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be"] - #[doc = " temporarily `Some` if scheduled but not occupied."] - #[doc = " The i'th parachain belongs to the i'th core, with the remaining cores all being"] - #[doc = " parathread-multiplexers."] - #[doc = ""] - #[doc = " Bounded by the maximum of either of these two values:"] - #[doc = " * The number of parachains and parathread multiplexers"] - #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] - pub fn availability_cores( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - ::core::option::Option< - runtime_types::polkadot_primitives::v2::CoreOccupied, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "AvailabilityCores", - vec![], - [ - 103u8, 94u8, 52u8, 17u8, 118u8, 25u8, 254u8, 190u8, 74u8, - 91u8, 64u8, 205u8, 243u8, 113u8, 143u8, 166u8, 193u8, 110u8, - 214u8, 151u8, 24u8, 112u8, 69u8, 131u8, 235u8, 78u8, 240u8, - 120u8, 240u8, 68u8, 56u8, 215u8, - ], - ) - } - #[doc = " An index used to ensure that only one claim on a parathread exists in the queue or is"] - #[doc = " currently being handled by an occupied core."] - #[doc = ""] - #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] - pub fn parathread_claim_index( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "ParathreadClaimIndex", - vec![], - [ - 64u8, 17u8, 173u8, 35u8, 14u8, 16u8, 149u8, 200u8, 118u8, - 211u8, 130u8, 15u8, 124u8, 112u8, 44u8, 220u8, 156u8, 132u8, - 119u8, 148u8, 24u8, 120u8, 252u8, 246u8, 204u8, 119u8, 206u8, - 85u8, 44u8, 210u8, 135u8, 83u8, - ], - ) - } - #[doc = " The block number where the session start occurred. Used to track how many group rotations have occurred."] - #[doc = ""] - #[doc = " Note that in the context of parachains modules the session change is signaled during"] - #[doc = " the block and enacted at the end of the block (at the finalization stage, to be exact)."] - #[doc = " Thus for all intents and purposes the effect of the session change is observed at the"] - #[doc = " block following the session change, block number of which we save in this storage value."] - pub fn session_start_block( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "SessionStartBlock", - vec![], - [ - 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, - 17u8, 101u8, 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, - 229u8, 22u8, 185u8, 120u8, 24u8, 245u8, 121u8, 215u8, 124u8, - 210u8, 49u8, 28u8, 26u8, 80u8, - ], - ) - } - #[doc = " Currently scheduled cores - free but up to be occupied."] - #[doc = ""] - #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] - #[doc = ""] - #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] - #[doc = " for the upcoming block."] pub fn scheduled (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaScheduler", - "Scheduled", - vec![], - [ - 246u8, 105u8, 102u8, 107u8, 143u8, 92u8, 220u8, 69u8, 71u8, - 102u8, 212u8, 157u8, 56u8, 112u8, 42u8, 179u8, 183u8, 139u8, - 128u8, 81u8, 239u8, 84u8, 103u8, 126u8, 82u8, 247u8, 39u8, - 39u8, 231u8, 218u8, 131u8, 53u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The management team changed."] + pub struct TeamChanged { + pub asset_id: ::core::primitive::u32, + pub issuer: ::subxt::utils::AccountId32, + pub admin: ::subxt::utils::AccountId32, + pub freezer: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for TeamChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "TeamChanged"; } - } - } - pub mod paras { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -24987,10 +25039,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentCode { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + #[doc = "The owner changed."] + pub struct OwnerChanged { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for OwnerChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "OwnerChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25001,9 +25057,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + #[doc = "Some account `who` was frozen."] + pub struct Frozen { + pub asset_id: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Frozen { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Frozen"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25014,13 +25075,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, - pub relay_parent_number: ::core::primitive::u32, + #[doc = "Some account `who` was thawed."] + pub struct Thawed { + pub asset_id: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Thawed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Thawed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25029,11 +25094,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoteNewHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + #[doc = "Some asset `asset_id` was frozen."] + pub struct AssetFrozen { + pub asset_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AssetFrozen { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetFrozen"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25042,8 +25112,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceQueueAction { - pub para: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "Some asset `asset_id` was thawed."] + pub struct AssetThawed { + pub asset_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AssetThawed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetThawed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25054,9 +25129,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddTrustedValidationCode { - pub validation_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + #[doc = "Accounts were destroyed for given asset."] + pub struct AccountsDestroyed { + pub asset_id: ::core::primitive::u32, + pub accounts_destroyed: ::core::primitive::u32, + pub accounts_remaining: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AccountsDestroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AccountsDestroyed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25067,11 +25148,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PokeUnusedValidationCode { - pub validation_code_hash: - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + #[doc = "Approvals were destroyed for given asset."] + pub struct ApprovalsDestroyed { + pub asset_id: ::core::primitive::u32, + pub approvals_destroyed: ::core::primitive::u32, + pub approvals_remaining: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ApprovalsDestroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovalsDestroyed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25080,191 +25168,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IncludePvfCheckStatement { - pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - pub signature: - runtime_types::polkadot_primitives::v2::validator_app::Signature, + #[doc = "An asset class is in the process of being destroyed."] + pub struct DestructionStarted { + pub asset_id: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Set the storage for the parachain validation code immediately."] - pub fn force_set_current_code( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "force_set_current_code", - ForceSetCurrentCode { para, new_code }, - [ - 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, - 2u8, 4u8, 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, - 186u8, 6u8, 118u8, 51u8, 74u8, 239u8, 68u8, 122u8, 148u8, - 242u8, 193u8, 131u8, 6u8, 135u8, - ], - ) - } - #[doc = "Set the storage for the current parachain head data immediately."] - pub fn force_set_current_head( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "force_set_current_head", - ForceSetCurrentHead { para, new_head }, - [ - 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, - 104u8, 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, - 143u8, 51u8, 60u8, 194u8, 59u8, 94u8, 100u8, 84u8, 194u8, - 100u8, 153u8, 9u8, 222u8, 63u8, - ], - ) - } - #[doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] - pub fn force_schedule_code_upgrade( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - relay_parent_number: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "force_schedule_code_upgrade", - ForceScheduleCodeUpgrade { - para, - new_code, - relay_parent_number, - }, - [ - 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, - 36u8, 175u8, 220u8, 145u8, 193u8, 20u8, 98u8, 149u8, 130u8, - 66u8, 54u8, 20u8, 204u8, 231u8, 116u8, 203u8, 179u8, 253u8, - 106u8, 55u8, 58u8, 116u8, 109u8, - ], - ) - } - #[doc = "Note a new block head for para within the context of the current block."] - pub fn force_note_new_head( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "force_note_new_head", - ForceNoteNewHead { para, new_head }, - [ - 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, - 164u8, 104u8, 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, - 12u8, 45u8, 92u8, 74u8, 248u8, 50u8, 180u8, 86u8, 251u8, - 172u8, 227u8, 88u8, 45u8, 127u8, - ], - ) - } - #[doc = "Put a parachain directly into the next session's action queue."] - #[doc = "We can't queue it any sooner than this without going into the"] - #[doc = "initializer..."] - pub fn force_queue_action( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "force_queue_action", - ForceQueueAction { para }, - [ - 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, - 137u8, 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, - 36u8, 254u8, 224u8, 99u8, 165u8, 246u8, 8u8, 76u8, 250u8, - 36u8, 141u8, 67u8, 185u8, 17u8, - ], - ) - } - #[doc = "Adds the validation code to the storage."] - #[doc = ""] - #[doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] - #[doc = "is running for that code, it will be instantly accepted."] - #[doc = ""] - #[doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] - #[doc = "into storage with reference count 0. This is to account the fact that there are no users"] - #[doc = "for this code yet. The caller will have to make sure that this code eventually gets"] - #[doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] - #[doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] - #[doc = ""] - #[doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] - #[doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] - pub fn add_trusted_validation_code( - &self, - validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "add_trusted_validation_code", - AddTrustedValidationCode { validation_code }, - [ - 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, - 60u8, 84u8, 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, - 173u8, 223u8, 59u8, 196u8, 37u8, 12u8, 243u8, 158u8, 77u8, - 184u8, 58u8, 64u8, 133u8, 71u8, - ], - ) - } - #[doc = "Remove the validation code from the storage iff the reference count is 0."] - #[doc = ""] - #[doc = "This is better than removing the storage directly, because it will not remove the code"] - #[doc = "that was suddenly got used by some parachain while this dispatchable was pending"] - #[doc = "dispatching."] - pub fn poke_unused_validation_code( - &self, - validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "poke_unused_validation_code", - PokeUnusedValidationCode { - validation_code_hash, - }, - [ - 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, - 162u8, 160u8, 66u8, 119u8, 177u8, 117u8, 143u8, 233u8, 241u8, - 128u8, 189u8, 118u8, 241u8, 30u8, 74u8, 171u8, 193u8, 177u8, - 233u8, 12u8, 254u8, 146u8, - ], - ) - } - #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] - #[doc = "enacts the results if that was the last vote before achieving the supermajority."] - pub fn include_pvf_check_statement( - &self, - stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "Paras", - "include_pvf_check_statement", - IncludePvfCheckStatement { stmt, signature }, - [ - 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, - 117u8, 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, - 5u8, 41u8, 144u8, 29u8, 207u8, 73u8, 215u8, 221u8, 1u8, - 253u8, 123u8, 110u8, 6u8, 196u8, - ], - ) - } + impl ::subxt::events::StaticEvent for DestructionStarted { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "DestructionStarted"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25273,13 +25186,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current code has been updated for a Para. `para_id`"] - pub struct CurrentCodeUpdated( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for CurrentCodeUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentCodeUpdated"; + #[doc = "An asset class was destroyed."] + pub struct Destroyed { + pub asset_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Destroyed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25290,13 +25203,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current head has been updated for a Para. `para_id`"] - pub struct CurrentHeadUpdated( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for CurrentHeadUpdated { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CurrentHeadUpdated"; + #[doc = "Some asset class was force-created."] + pub struct ForceCreated { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ForceCreated { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ForceCreated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25307,15 +25221,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] - pub struct CodeUpgradeScheduled( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "CodeUpgradeScheduled"; + #[doc = "New metadata has been set for an asset."] + pub struct MetadataSet { + pub asset_id: ::core::primitive::u32, + pub name: ::std::vec::Vec<::core::primitive::u8>, + pub symbol: ::std::vec::Vec<::core::primitive::u8>, + pub decimals: ::core::primitive::u8, + pub is_frozen: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "MetadataSet"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25324,13 +25243,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new head has been noted for a Para. `para_id`"] - pub struct NewHeadNoted( - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for NewHeadNoted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "NewHeadNoted"; + #[doc = "Metadata has been cleared for an asset."] + pub struct MetadataCleared { + pub asset_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "MetadataCleared"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25341,14 +25260,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A para has been queued to execute pending actions. `para_id`"] - pub struct ActionQueued( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for ActionQueued { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "ActionQueued"; + #[doc = "(Additional) funds have been approved for transfer to a destination account."] + pub struct ApprovedTransfer { + pub asset_id: ::core::primitive::u32, + pub source: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for ApprovedTransfer { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovedTransfer"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25359,15 +25280,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] - #[doc = "code. `code_hash` `para_id`"] - pub struct PvfCheckStarted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckStarted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckStarted"; + #[doc = "An approval for account `delegate` was cancelled by `owner`."] + pub struct ApprovalCancelled { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ApprovalCancelled { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovalCancelled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25378,17 +25299,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given validation code was accepted by the PVF pre-checking vote."] - #[doc = "`code_hash` `para_id`"] - pub struct PvfCheckAccepted( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckAccepted { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckAccepted"; + #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] + #[doc = "the approved `delegate`."] + pub struct TransferredApproved { + pub asset_id: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, + pub destination: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TransferredApproved { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "TransferredApproved"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25397,901 +25322,446 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given validation code was rejected by the PVF pre-checking vote."] - #[doc = "`code_hash` `para_id`"] - pub struct PvfCheckRejected( - pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for PvfCheckRejected { - const PALLET: &'static str = "Paras"; - const EVENT: &'static str = "PvfCheckRejected"; + #[doc = "An asset has had its attributes changed by the `Force` origin."] + pub struct AssetStatusChanged { + pub asset_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AssetStatusChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetStatusChanged"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " All currently active PVF pre-checking votes."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PvfActiveVoteMap", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, - 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, - 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, - 43u8, 248u8, 134u8, 124u8, 73u8, - ], - ) - } - #[doc = " All currently active PVF pre-checking votes."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PvfActiveVoteMap", - Vec::new(), - [ - 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, - 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, - 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, - 43u8, 248u8, 134u8, 124u8, 73u8, - ], - ) - } - #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] pub fn pvf_active_vote_list (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PvfActiveVoteList", - vec![], - [ - 196u8, 23u8, 108u8, 162u8, 29u8, 33u8, 49u8, 219u8, 127u8, - 26u8, 241u8, 58u8, 102u8, 43u8, 156u8, 3u8, 87u8, 153u8, - 195u8, 96u8, 68u8, 132u8, 170u8, 162u8, 18u8, 156u8, 121u8, - 63u8, 53u8, 91u8, 68u8, 69u8, - ], - ) - } - #[doc = " All parachains. Ordered ascending by `ParaId`. Parathreads are not included."] - #[doc = ""] - #[doc = " Consider using the [`ParachainsCache`] type of modifying."] - pub fn parachains( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "Parachains", - vec![], - [ - 85u8, 234u8, 218u8, 69u8, 20u8, 169u8, 235u8, 6u8, 69u8, - 126u8, 28u8, 18u8, 57u8, 93u8, 238u8, 7u8, 167u8, 221u8, - 75u8, 35u8, 36u8, 4u8, 46u8, 55u8, 234u8, 123u8, 122u8, - 173u8, 13u8, 205u8, 58u8, 226u8, - ], - ) - } - #[doc = " The current lifecycle of a all known Para IDs."] - pub fn para_lifecycles( + #[doc = " Details of an asset."] + pub fn asset( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + runtime_types::pallet_assets::types::AssetDetails< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "ParaLifecycles", + "Assets", + "Asset", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, - 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, - 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, - 186u8, 209u8, 191u8, 186u8, + 251u8, 148u8, 82u8, 150u8, 66u8, 26u8, 46u8, 186u8, 60u8, + 59u8, 239u8, 190u8, 102u8, 156u8, 113u8, 175u8, 1u8, 117u8, + 147u8, 236u8, 114u8, 88u8, 49u8, 210u8, 165u8, 162u8, 201u8, + 230u8, 147u8, 141u8, 174u8, 221u8, ], ) } - #[doc = " The current lifecycle of a all known Para IDs."] - pub fn para_lifecycles_root( + #[doc = " Details of an asset."] + pub fn asset_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + runtime_types::pallet_assets::types::AssetDetails< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "ParaLifecycles", + "Assets", + "Asset", Vec::new(), [ - 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, - 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, - 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, - 186u8, 209u8, 191u8, 186u8, + 251u8, 148u8, 82u8, 150u8, 66u8, 26u8, 46u8, 186u8, 60u8, + 59u8, 239u8, 190u8, 102u8, 156u8, 113u8, 175u8, 1u8, 117u8, + 147u8, 236u8, 114u8, 88u8, 49u8, 210u8, 165u8, 162u8, 201u8, + 230u8, 147u8, 141u8, 174u8, 221u8, ], ) } - #[doc = " The head-data of every registered para."] - pub fn heads( + #[doc = " The holdings of a specific account for a specific asset."] + pub fn account( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, + _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::polkadot_parachain::primitives::HeadData, + runtime_types::pallet_assets::types::AssetAccount< + ::core::primitive::u128, + ::core::primitive::u128, + (), >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "Heads", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, - 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, - 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, - 134u8, 131u8, 142u8, 70u8, 3u8, - ], - ) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Assets" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [109u8 , 245u8 , 93u8 , 133u8 , 206u8 , 68u8 , 94u8 , 233u8 , 29u8 , 113u8 , 245u8 , 201u8 , 241u8 , 2u8 , 200u8 , 179u8 , 37u8 , 199u8 , 128u8 , 243u8 , 49u8 , 50u8 , 122u8 , 139u8 , 135u8 , 48u8 , 201u8 , 109u8 , 195u8 , 38u8 , 205u8 , 32u8 ,]) } - #[doc = " The head-data of every registered para."] - pub fn heads_root( + #[doc = " The holdings of a specific account for a specific asset."] + pub fn account_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::pallet_assets::types::AssetAccount< + ::core::primitive::u128, + ::core::primitive::u128, + (), >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "Heads", + "Assets", + "Account", Vec::new(), [ - 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, - 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, - 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, - 134u8, 131u8, 142u8, 70u8, 3u8, + 109u8, 245u8, 93u8, 133u8, 206u8, 68u8, 94u8, 233u8, 29u8, + 113u8, 245u8, 201u8, 241u8, 2u8, 200u8, 179u8, 37u8, 199u8, + 128u8, 243u8, 49u8, 50u8, 122u8, 139u8, 135u8, 48u8, 201u8, + 109u8, 195u8, 38u8, 205u8, 32u8, ], ) } - #[doc = " The validation code hash of every live para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn current_code_hash( + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _2: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_assets::types::Approval< + ::core::primitive::u128, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CurrentCodeHash", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, - 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, - 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, - 35u8, 157u8, 195u8, 104u8, 236u8, - ], - ) + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Assets" , "Approvals" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [210u8 , 147u8 , 203u8 , 49u8 , 232u8 , 215u8 , 116u8 , 154u8 , 43u8 , 154u8 , 69u8 , 159u8 , 241u8 , 28u8 , 238u8 , 101u8 , 108u8 , 162u8 , 242u8 , 121u8 , 138u8 , 164u8 , 217u8 , 243u8 , 72u8 , 173u8 , 75u8 , 109u8 , 194u8 , 9u8 , 196u8 , 163u8 ,]) } - #[doc = " The validation code hash of every live para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn current_code_hash_root( + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_assets::types::Approval< + ::core::primitive::u128, + ::core::primitive::u128, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CurrentCodeHash", + "Assets", + "Approvals", Vec::new(), [ - 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, - 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, - 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, - 35u8, 157u8, 195u8, 104u8, 236u8, + 210u8, 147u8, 203u8, 49u8, 232u8, 215u8, 116u8, 154u8, 43u8, + 154u8, 69u8, 159u8, 241u8, 28u8, 238u8, 101u8, 108u8, 162u8, + 242u8, 121u8, 138u8, 164u8, 217u8, 243u8, 72u8, 173u8, 75u8, + 109u8, 194u8, 9u8, 196u8, 163u8, ], ) } - #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] - #[doc = " became outdated."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn past_code_hash( + #[doc = " Metadata of an asset."] + pub fn metadata( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_assets::types::AssetMetadata< + ::core::primitive::u128, + 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( - "Paras", - "PastCodeHash", + "Assets", + "Metadata", vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, - 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, - 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, - 187u8, 71u8, 94u8, 88u8, 124u8, + 80u8, 115u8, 155u8, 115u8, 136u8, 108u8, 82u8, 93u8, 65u8, + 130u8, 143u8, 228u8, 170u8, 234u8, 182u8, 170u8, 229u8, + 217u8, 168u8, 71u8, 81u8, 80u8, 16u8, 112u8, 209u8, 82u8, + 8u8, 165u8, 80u8, 137u8, 58u8, 170u8, ], ) } - #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] - #[doc = " became outdated."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn past_code_hash_root( + #[doc = " Metadata of an asset."] + pub fn metadata_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::pallet_assets::types::AssetMetadata< + ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, (), - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PastCodeHash", + "Assets", + "Metadata", Vec::new(), [ - 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, - 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, - 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, - 187u8, 71u8, 94u8, 88u8, 124u8, + 80u8, 115u8, 155u8, 115u8, 136u8, 108u8, 82u8, 93u8, 65u8, + 130u8, 143u8, 228u8, 170u8, 234u8, 182u8, 170u8, 229u8, + 217u8, 168u8, 71u8, 81u8, 80u8, 16u8, 112u8, 209u8, 82u8, + 8u8, 165u8, 80u8, 137u8, 58u8, 170u8, ], ) } - #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] - #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaPastCodeMeta < :: core :: primitive :: u32 > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PastCodeMeta", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call."] + #[doc = ""] + #[doc = " Must be configured to result in a weight that makes each call fit in a block."] + pub fn remove_items_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "RemoveItemsLimit", [ - 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, - 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, - 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, - 164u8, 168u8, 72u8, 171u8, 228u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Past code of parachains. The parachains themselves may not be registered anymore,"] - #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] - #[doc = " to keep it available for secondary checkers."] pub fn past_code_meta_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaPastCodeMeta < :: core :: primitive :: u32 > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PastCodeMeta", - Vec::new(), + #[doc = " The basic amount of funds that must be reserved for an asset."] + pub fn asset_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "AssetDeposit", [ - 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, - 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, - 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, - 164u8, 168u8, 72u8, 171u8, 228u8, + 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 = " Which paras have past code that needs pruning and the relay-chain block at which the code was replaced."] - #[doc = " Note that this is the actual height of the included block, not the expected height at which the"] - #[doc = " code upgrade would be applied, although they may be equal."] - #[doc = " This is to ensure the entire acceptance period is covered, not an offset acceptance period starting"] - #[doc = " from the time at which the parachain perceives a code upgrade as having occurred."] - #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] - pub fn past_code_pruning( + #[doc = " The amount of funds that must be reserved for a non-provider asset account to be"] + #[doc = " maintained."] + pub fn asset_account_deposit( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "PastCodePruning", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "AssetAccountDeposit", [ - 59u8, 26u8, 175u8, 129u8, 174u8, 27u8, 239u8, 77u8, 38u8, - 130u8, 37u8, 134u8, 62u8, 28u8, 218u8, 176u8, 16u8, 137u8, - 175u8, 90u8, 248u8, 44u8, 248u8, 172u8, 231u8, 6u8, 36u8, - 190u8, 109u8, 237u8, 228u8, 135u8, + 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 block number at which the planned code change is expected for a para."] - #[doc = " The change will be applied after the first parablock for this ID included which executes"] - #[doc = " in the context of a relay chain block with a number >= `expected_at`."] - pub fn future_code_upgrades( + #[doc = " The basic amount of funds that must be reserved when adding metadata to your asset."] + pub fn metadata_deposit_base( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "FutureCodeUpgrades", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "MetadataDepositBase", [ - 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, - 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, - 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, - 158u8, 115u8, 172u8, 149u8, + 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 block number at which the planned code change is expected for a para."] - #[doc = " The change will be applied after the first parablock for this ID included which executes"] - #[doc = " in the context of a relay chain block with a number >= `expected_at`."] - pub fn future_code_upgrades_root( + #[doc = " The additional funds that must be reserved for the number of bytes you store in your"] + #[doc = " metadata."] + pub fn metadata_deposit_per_byte( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "FutureCodeUpgrades", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "MetadataDepositPerByte", [ - 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, - 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, - 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, - 158u8, 115u8, 172u8, 149u8, + 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 actual future code hash of a para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn future_code_hash( + #[doc = " The amount of funds that must be reserved when creating a new approval."] + pub fn approval_deposit( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "FutureCodeHash", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "ApprovalDeposit", [ - 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, - 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, - 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, - 53u8, 44u8, 145u8, 244u8, 216u8, + 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 actual future code hash of a para."] - #[doc = ""] - #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] - pub fn future_code_hash_root( + #[doc = " The maximum length of a name or symbol stored on-chain."] + pub fn string_limit( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "FutureCodeHash", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Assets", + "StringLimit", [ - 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, - 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, - 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, - 53u8, 44u8, 145u8, 244u8, 216u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] - #[doc = ""] - #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] - #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] - #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] - #[doc = " gets reset to `None`."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_go_ahead_signal( + } + } + } + pub mod mmr { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Latest MMR Root hash."] + pub fn root_hash( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - >, + ::subxt::utils::H256, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpgradeGoAheadSignal", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "Mmr", + "RootHash", + vec![], [ - 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, - 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, - 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, - 249u8, 245u8, 120u8, 98u8, 183u8, + 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, ], ) } - #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] - #[doc = ""] - #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] - #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] - #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] - #[doc = " gets reset to `None`."] - #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_go_ahead_signal_root( + #[doc = " Current size of the MMR (number of leaves)."] + pub fn number_of_leaves( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::UpgradeGoAhead, - >, - (), - (), + ::core::primitive::u64, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpgradeGoAheadSignal", - Vec::new(), + "Mmr", + "NumberOfLeaves", + vec![], [ - 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, - 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, - 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, - 249u8, 245u8, 120u8, 98u8, 183u8, + 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 = " This is used by the relay-chain to communicate that there are restrictions for performing"] - #[doc = " an upgrade for this parachain."] - #[doc = ""] - #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] - #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] - #[doc = " we could restrict upgrades to make the process simpler."] + #[doc = " Hashes of the nodes in the MMR."] #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_restriction_signal( + #[doc = " 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< - runtime_types::polkadot_parachain::primitives::Id, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - >, + ::subxt::utils::H256, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpgradeRestrictionSignal", + "Mmr", + "Nodes", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Identity, )], [ - 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, - 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, - 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, - 163u8, 45u8, 92u8, 44u8, 11u8, + 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 = " This is used by the relay-chain to communicate that there are restrictions for performing"] - #[doc = " an upgrade for this parachain."] - #[doc = ""] - #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] - #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] - #[doc = " we could restrict upgrades to make the process simpler."] + #[doc = " Hashes of the nodes in the MMR."] #[doc = ""] - #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] - #[doc = " the format will require migration of parachains."] - pub fn upgrade_restriction_signal_root( + #[doc = " 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< - runtime_types::polkadot_primitives::v2::UpgradeRestriction, - >, + ::subxt::utils::H256, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpgradeRestrictionSignal", + "Mmr", + "Nodes", Vec::new(), [ - 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, - 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, - 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, - 163u8, 45u8, 92u8, 44u8, 11u8, - ], - ) - } - #[doc = " The list of parachains that are awaiting for their upgrade restriction to cooldown."] - #[doc = ""] - #[doc = " Ordered ascending by block number."] - pub fn upgrade_cooldowns( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpgradeCooldowns", - vec![], - [ - 205u8, 236u8, 140u8, 145u8, 241u8, 245u8, 60u8, 68u8, 23u8, - 175u8, 226u8, 174u8, 154u8, 107u8, 243u8, 197u8, 61u8, 218u8, - 7u8, 24u8, 109u8, 221u8, 178u8, 80u8, 242u8, 123u8, 33u8, - 119u8, 5u8, 241u8, 179u8, 13u8, - ], - ) - } - #[doc = " The list of upcoming code upgrades. Each item is a pair of which para performs a code"] - #[doc = " upgrade and at which relay-chain block it is expected at."] - #[doc = ""] - #[doc = " Ordered ascending by block number."] - pub fn upcoming_upgrades( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpcomingUpgrades", - vec![], - [ - 165u8, 112u8, 215u8, 149u8, 125u8, 175u8, 206u8, 195u8, - 214u8, 173u8, 0u8, 144u8, 46u8, 197u8, 55u8, 204u8, 144u8, - 68u8, 158u8, 156u8, 145u8, 230u8, 173u8, 101u8, 255u8, 108u8, - 52u8, 199u8, 142u8, 37u8, 55u8, 32u8, - ], - ) - } - #[doc = " The actions to perform during the start of a specific session index."] - pub fn actions_queue( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "ActionsQueue", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, - 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, - 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, - 41u8, 123u8, 16u8, 178u8, 161u8, - ], - ) - } - #[doc = " The actions to perform during the start of a specific session index."] - pub fn actions_queue_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "ActionsQueue", - Vec::new(), - [ - 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, - 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, - 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, - 41u8, 123u8, 16u8, 178u8, 161u8, - ], - ) - } - #[doc = " Upcoming paras instantiation arguments."] - #[doc = ""] - #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpcomingParasGenesis", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, - 75u8, 75u8, 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, - 107u8, 75u8, 200u8, 61u8, 211u8, 7u8, 105u8, 251u8, 243u8, - 18u8, 220u8, 195u8, 216u8, 167u8, - ], - ) - } - #[doc = " Upcoming paras instantiation arguments."] - #[doc = ""] - #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] - #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] pub fn upcoming_paras_genesis_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: paras :: ParaGenesisArgs > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "UpcomingParasGenesis", - Vec::new(), - [ - 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, - 75u8, 75u8, 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, - 107u8, 75u8, 200u8, 61u8, 211u8, 7u8, 105u8, 251u8, 243u8, - 18u8, 220u8, 195u8, 216u8, 167u8, - ], - ) - } - #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] - pub fn code_by_hash_refs( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CodeByHashRefs", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, - 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, - 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, - 160u8, 143u8, 88u8, 168u8, - ], - ) - } - #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] - pub fn code_by_hash_refs_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CodeByHashRefs", - Vec::new(), - [ - 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, - 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, - 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, - 160u8, 143u8, 88u8, 168u8, - ], - ) - } - #[doc = " Validation code stored by its hash."] - #[doc = ""] - #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] - #[doc = " [`PastCodeHash`]."] - pub fn code_by_hash( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CodeByHash", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, - 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, - 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, - 73u8, 15u8, 210u8, 226u8, - ], - ) - } - #[doc = " Validation code stored by its hash."] - #[doc = ""] - #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] - #[doc = " [`PastCodeHash`]."] - pub fn code_by_hash_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Paras", - "CodeByHash", - Vec::new(), - [ - 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, - 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, - 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, - 73u8, 15u8, 210u8, 226u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn unsigned_priority( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Paras", - "UnsignedPriority", - [ - 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, - 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, - 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, - 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, + 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, ], ) } } } } - pub mod initializer { + pub mod lottery { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -26300,7 +25770,6 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -26309,252 +25778,158 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApprove { - pub up_to: ::core::primitive::u32, + pub struct BuyTicket { + pub call: + ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCalls { + pub calls: + ::std::vec::Vec, } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct StartLottery { + pub price: ::core::primitive::u128, + pub length: ::core::primitive::u32, + pub delay: ::core::primitive::u32, + pub repeat: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct StopRepeat; pub struct TransactionApi; impl TransactionApi { - #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] - #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] - #[doc = "chain are valid and should be finalized."] - pub fn force_approve( - &self, - up_to: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Initializer", - "force_approve", - ForceApprove { up_to }, - [ - 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, - 80u8, 193u8, 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, - 77u8, 227u8, 138u8, 35u8, 182u8, 122u8, 112u8, 232u8, 246u8, - 69u8, 173u8, 97u8, 42u8, 103u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Whether the parachains modules have been initialized within this block."] + #[doc = "Buy a ticket to enter the lottery."] #[doc = ""] - #[doc = " Semantically a `bool`, but this guarantees it should never hit the trie,"] - #[doc = " as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values."] + #[doc = "This extrinsic acts as a passthrough function for `call`. In all"] + #[doc = "situations where `call` alone would succeed, this extrinsic should"] + #[doc = "succeed."] #[doc = ""] - #[doc = " As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of"] - #[doc = " them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for"] - #[doc = " the semantics of this variable."] - pub fn has_initialized( + #[doc = "If `call` is successful, then we will attempt to purchase a ticket,"] + #[doc = "which may fail silently. To detect success of a ticket purchase, you"] + #[doc = "should listen for the `TicketBought` event."] + #[doc = ""] + #[doc = "This extrinsic must be called by a signed origin."] + pub fn buy_ticket( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<()>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Initializer", - "HasInitialized", - vec![], + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Lottery", + "buy_ticket", + BuyTicket { + call: ::std::boxed::Box::new(call), + }, [ - 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, 227u8, - 123u8, 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, 216u8, 115u8, - 159u8, 131u8, 133u8, 105u8, 200u8, 122u8, 114u8, 6u8, 109u8, - 4u8, 164u8, 204u8, 214u8, 111u8, + 79u8, 217u8, 66u8, 99u8, 216u8, 68u8, 136u8, 171u8, 219u8, + 98u8, 99u8, 197u8, 231u8, 22u8, 46u8, 142u8, 209u8, 64u8, + 131u8, 60u8, 113u8, 91u8, 69u8, 50u8, 231u8, 74u8, 255u8, + 172u8, 165u8, 235u8, 144u8, 92u8, ], ) } - #[doc = " Buffered session changes along with the block number at which they should be applied."] - #[doc = ""] - #[doc = " Typically this will be empty or one element long. Apart from that this item never hits"] - #[doc = " the storage."] + #[doc = "Set calls in storage which can be used to purchase a lottery ticket."] #[doc = ""] - #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] - #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Initializer", - "BufferedSessionChanges", - vec![], - [ - 176u8, 60u8, 165u8, 138u8, 99u8, 140u8, 22u8, 169u8, 121u8, - 65u8, 203u8, 85u8, 39u8, 198u8, 91u8, 167u8, 118u8, 49u8, - 129u8, 128u8, 171u8, 232u8, 249u8, 39u8, 6u8, 101u8, 57u8, - 193u8, 85u8, 143u8, 105u8, 29u8, - ], - ) - } - } - } - } - pub mod dmp { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - pub struct TransactionApi; - impl TransactionApi {} - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_core_primitives :: InboundDownwardMessage < :: core :: primitive :: u32 > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Dmp", - "DownwardMessageQueues", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, - 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, - 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, - 88u8, 94u8, 40u8, 18u8, 31u8, - ], - ) - } - #[doc = " The downward messages addressed for a certain para."] pub fn downward_message_queues_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_core_primitives :: InboundDownwardMessage < :: core :: primitive :: u32 > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Dmp", - "DownwardMessageQueues", - Vec::new(), - [ - 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, - 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, - 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, - 88u8, 94u8, 40u8, 18u8, 31u8, - ], - ) - } - #[doc = " A mapping that stores the downward message queue MQC head for each para."] + #[doc = "This function only matters if you use the `ValidateCall` implementation"] + #[doc = "provided by this pallet, which uses storage to determine the valid calls."] #[doc = ""] - #[doc = " Each link in this chain has a form:"] - #[doc = " `(prev_head, B, H(M))`, where"] - #[doc = " - `prev_head`: is the previous head hash or zero if none."] - #[doc = " - `B`: is the relay-chain block number in which a message was appended."] - #[doc = " - `H(M)`: is the hash of the message being appended."] - pub fn downward_message_queue_heads( + #[doc = "This extrinsic must be called by the Manager origin."] + pub fn set_calls( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, + calls: ::std::vec::Vec< + runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::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( - "Dmp", - "DownwardMessageQueueHeads", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Lottery", + "set_calls", + SetCalls { calls }, [ - 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, - 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, - 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, - 207u8, 163u8, 104u8, 103u8, 38u8, + 203u8, 124u8, 79u8, 183u8, 230u8, 227u8, 173u8, 241u8, 93u8, + 30u8, 210u8, 123u8, 71u8, 254u8, 158u8, 165u8, 113u8, 206u8, + 201u8, 1u8, 208u8, 174u8, 246u8, 174u8, 194u8, 28u8, 223u8, + 81u8, 117u8, 26u8, 118u8, 99u8, ], ) } - #[doc = " A mapping that stores the downward message queue MQC head for each para."] + #[doc = "Start a lottery using the provided configuration."] + #[doc = ""] + #[doc = "This extrinsic must be called by the `ManagerOrigin`."] + #[doc = ""] + #[doc = "Parameters:"] #[doc = ""] - #[doc = " Each link in this chain has a form:"] - #[doc = " `(prev_head, B, H(M))`, where"] - #[doc = " - `prev_head`: is the previous head hash or zero if none."] - #[doc = " - `B`: is the relay-chain block number in which a message was appended."] - #[doc = " - `H(M)`: is the hash of the message being appended."] - pub fn downward_message_queue_heads_root( + #[doc = "* `price`: The cost of a single ticket."] + #[doc = "* `length`: How long the lottery should run for starting at the current block."] + #[doc = "* `delay`: How long after the lottery end we should wait before picking a winner."] + #[doc = "* `repeat`: If the lottery should repeat when completed."] + pub fn start_lottery( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Dmp", - "DownwardMessageQueueHeads", - Vec::new(), + price: ::core::primitive::u128, + length: ::core::primitive::u32, + delay: ::core::primitive::u32, + repeat: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Lottery", + "start_lottery", + StartLottery { + price, + length, + delay, + repeat, + }, [ - 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, - 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, - 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, - 207u8, 163u8, 104u8, 103u8, 38u8, + 4u8, 194u8, 105u8, 75u8, 63u8, 167u8, 224u8, 4u8, 163u8, + 148u8, 96u8, 248u8, 21u8, 190u8, 168u8, 101u8, 207u8, 152u8, + 169u8, 203u8, 180u8, 103u8, 137u8, 151u8, 166u8, 187u8, + 232u8, 219u8, 22u8, 89u8, 206u8, 194u8, ], ) } - } - } - } - pub mod ump { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ServiceOverweight { - pub index: ::core::primitive::u64, - pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Service a single overweight upward message."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] - #[doc = "- `index`: The index of the overweight message to service."] - #[doc = "- `weight_limit`: The amount of weight that message execution may take."] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] - #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] + #[doc = "If a lottery is repeating, you can use this to stop the repeat."] + #[doc = "The lottery will continue to run to completion."] #[doc = ""] - #[doc = "Events:"] - #[doc = "- `OverweightServiced`: On success."] - pub fn service_overweight( - &self, - index: ::core::primitive::u64, - weight_limit: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { + #[doc = "This extrinsic must be called by the `ManagerOrigin`."] + pub fn stop_repeat(&self) -> ::subxt::tx::StaticTxPayload { ::subxt::tx::StaticTxPayload::new( - "Ump", - "service_overweight", - ServiceOverweight { - index, - weight_limit, - }, + "Lottery", + "stop_repeat", + StopRepeat {}, [ - 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, - 86u8, 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, - 254u8, 235u8, 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, - 126u8, 31u8, 203u8, 144u8, 106u8, + 28u8, 43u8, 248u8, 131u8, 209u8, 84u8, 75u8, 42u8, 22u8, + 180u8, 126u8, 235u8, 116u8, 241u8, 167u8, 161u8, 25u8, 0u8, + 22u8, 207u8, 167u8, 191u8, 89u8, 180u8, 54u8, 25u8, 14u8, + 35u8, 90u8, 244u8, 5u8, 241u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; + pub type Event = runtime_types::pallet_lottery::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -26566,28 +25941,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message is invalid XCM."] - #[doc = "\\[ id \\]"] - pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for InvalidFormat { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "InvalidFormat"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message is unsupported version of XCM."] - #[doc = "\\[ id \\]"] - pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); - impl ::subxt::events::StaticEvent for UnsupportedVersion { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "UnsupportedVersion"; + #[doc = "A lottery has been started!"] + pub struct LotteryStarted; + impl ::subxt::events::StaticEvent for LotteryStarted { + const PALLET: &'static str = "Lottery"; + const EVENT: &'static str = "LotteryStarted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26598,15 +25956,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message executed with the given outcome."] - #[doc = "\\[ id, outcome \\]"] - pub struct ExecutedUpward( - pub [::core::primitive::u8; 32usize], - pub runtime_types::xcm::v2::traits::Outcome, - ); - impl ::subxt::events::StaticEvent for ExecutedUpward { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "ExecutedUpward"; + #[doc = "A new set of calls have been set!"] + pub struct CallsUpdated; + impl ::subxt::events::StaticEvent for CallsUpdated { + const PALLET: &'static str = "Lottery"; + const EVENT: &'static str = "CallsUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26617,36 +25971,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The weight limit for handling upward messages was reached."] - #[doc = "\\[ id, remaining, required \\]"] - pub struct WeightExhausted( - pub [::core::primitive::u8; 32usize], - pub runtime_types::sp_weights::weight_v2::Weight, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for WeightExhausted { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "WeightExhausted"; + #[doc = "A winner has been chosen!"] + pub struct Winner { + pub winner: ::subxt::utils::AccountId32, + pub lottery_balance: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some upward messages have been received and will be processed."] - #[doc = "\\[ para, count, size \\]"] - pub struct UpwardMessagesReceived( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for UpwardMessagesReceived { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "UpwardMessagesReceived"; + impl ::subxt::events::StaticEvent for Winner { + const PALLET: &'static str = "Lottery"; + const EVENT: &'static str = "Winner"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26657,322 +25989,281 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The weight budget was exceeded for an individual upward message."] - #[doc = ""] - #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] - #[doc = "using the assigned `overweight_index`."] - #[doc = ""] - #[doc = "\\[ para, id, overweight_index, required \\]"] - pub struct OverweightEnqueued( - pub runtime_types::polkadot_parachain::primitives::Id, - pub [::core::primitive::u8; 32usize], - pub ::core::primitive::u64, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "OverweightEnqueued"; + #[doc = "A ticket has been bought!"] + pub struct TicketBought { + pub who: ::subxt::utils::AccountId32, + pub call_index: (::core::primitive::u8, ::core::primitive::u8), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Upward message from the overweight queue was executed with the given actual weight"] - #[doc = "used."] - #[doc = ""] - #[doc = "\\[ overweight_index, used \\]"] - pub struct OverweightServiced( - pub ::core::primitive::u64, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for OverweightServiced { - const PALLET: &'static str = "Ump"; - const EVENT: &'static str = "OverweightServiced"; + impl ::subxt::events::StaticEvent for TicketBought { + const PALLET: &'static str = "Lottery"; + const EVENT: &'static str = "TicketBought"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] - #[doc = ""] - #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] - #[doc = " channel management messages."] - #[doc = ""] - #[doc = " The messages are processed in FIFO order."] - pub fn relay_dispatch_queues( + pub fn lottery_index( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "RelayDispatchQueues", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "Lottery", + "LotteryIndex", + vec![], [ - 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, - 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, - 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, - 191u8, 144u8, 14u8, 3u8, 141u8, + 79u8, 74u8, 246u8, 125u8, 89u8, 183u8, 60u8, 48u8, 34u8, + 211u8, 236u8, 222u8, 23u8, 158u8, 184u8, 140u8, 200u8, 80u8, + 232u8, 5u8, 240u8, 218u8, 70u8, 221u8, 219u8, 1u8, 3u8, + 203u8, 77u8, 3u8, 128u8, 89u8, ], ) } - #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] - #[doc = ""] - #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] - #[doc = " channel management messages."] - #[doc = ""] - #[doc = " The messages are processed in FIFO order."] - pub fn relay_dispatch_queues_root( + #[doc = " The configuration for the current lottery."] + pub fn lottery( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + runtime_types::pallet_lottery::LotteryConfig< + ::core::primitive::u32, + ::core::primitive::u128, >, - (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), + (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "RelayDispatchQueues", - Vec::new(), + "Lottery", + "Lottery", + vec![], [ - 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, - 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, - 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, - 191u8, 144u8, 14u8, 3u8, 141u8, + 46u8, 51u8, 122u8, 129u8, 145u8, 2u8, 183u8, 42u8, 184u8, + 167u8, 30u8, 73u8, 175u8, 49u8, 109u8, 166u8, 188u8, 151u8, + 171u8, 8u8, 186u8, 208u8, 227u8, 19u8, 252u8, 141u8, 56u8, + 89u8, 229u8, 139u8, 247u8, 117u8, ], ) } - #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] - #[doc = ""] - #[doc = " First item in the tuple is the count of messages and second"] - #[doc = " is the total length (in bytes) of the message payloads."] - #[doc = ""] - #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] - #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] - #[doc = " loading the whole message queue if only the total size and count are required."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] - pub fn relay_dispatch_queue_size( + #[doc = " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)"] + pub fn participants( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, + ( ::core::primitive::u32, - )>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u8, + ::core::primitive::u8, + )>, + ), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "RelayDispatchQueueSize", + "Lottery", + "Participants", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, - 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, - 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, - 173u8, 86u8, 199u8, 207u8, 138u8, + 129u8, 243u8, 95u8, 30u8, 228u8, 183u8, 238u8, 141u8, 77u8, + 8u8, 166u8, 197u8, 168u8, 93u8, 27u8, 40u8, 38u8, 22u8, + 188u8, 55u8, 58u8, 154u8, 122u8, 122u8, 76u8, 57u8, 183u8, + 210u8, 254u8, 185u8, 239u8, 242u8, ], ) } - #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] - #[doc = ""] - #[doc = " First item in the tuple is the count of messages and second"] - #[doc = " is the total length (in bytes) of the message payloads."] - #[doc = ""] - #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] - #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] - #[doc = " loading the whole message queue if only the total size and count are required."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] - pub fn relay_dispatch_queue_size_root( + #[doc = " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)"] + pub fn participants_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, + ( ::core::primitive::u32, - )>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u8, + ::core::primitive::u8, + )>, + ), (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "RelayDispatchQueueSize", + "Lottery", + "Participants", Vec::new(), [ - 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, - 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, - 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, - 173u8, 86u8, 199u8, 207u8, 138u8, + 129u8, 243u8, 95u8, 30u8, 228u8, 183u8, 238u8, 141u8, 77u8, + 8u8, 166u8, 197u8, 168u8, 93u8, 27u8, 40u8, 38u8, 22u8, + 188u8, 55u8, 58u8, 154u8, 122u8, 122u8, 76u8, 57u8, 183u8, + 210u8, 254u8, 185u8, 239u8, 242u8, ], ) } - #[doc = " The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - The set of items from this vector should be exactly the set of the keys in"] - #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] - pub fn needs_dispatch( + #[doc = " Total number of tickets sold."] + pub fn tickets_count( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, + ::core::primitive::u32, ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "NeedsDispatch", - vec![], - [ - 176u8, 94u8, 152u8, 112u8, 46u8, 124u8, 89u8, 29u8, 92u8, - 104u8, 192u8, 58u8, 59u8, 186u8, 81u8, 150u8, 157u8, 61u8, - 235u8, 182u8, 222u8, 127u8, 109u8, 11u8, 104u8, 175u8, 141u8, - 219u8, 15u8, 152u8, 255u8, 40u8, - ], - ) - } - #[doc = " This is the para that gets will get dispatched first during the next upward dispatchable queue"] - #[doc = " execution round."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] - pub fn next_dispatch_round_start_with( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::Id, - >, ::subxt::storage::address::Yes, (), - (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "NextDispatchRoundStartWith", + "Lottery", + "TicketsCount", vec![], [ - 157u8, 221u8, 6u8, 175u8, 61u8, 99u8, 250u8, 30u8, 177u8, - 53u8, 37u8, 191u8, 138u8, 65u8, 251u8, 216u8, 37u8, 84u8, - 246u8, 76u8, 8u8, 29u8, 18u8, 253u8, 143u8, 75u8, 129u8, - 141u8, 48u8, 178u8, 135u8, 197u8, + 112u8, 164u8, 111u8, 40u8, 98u8, 247u8, 174u8, 117u8, 198u8, + 56u8, 109u8, 205u8, 38u8, 175u8, 118u8, 75u8, 136u8, 86u8, + 95u8, 200u8, 233u8, 199u8, 195u8, 198u8, 161u8, 64u8, 199u8, + 141u8, 125u8, 42u8, 187u8, 40u8, ], ) } - #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = " Each ticket's owner."] #[doc = ""] - #[doc = " These messages stay there until manually dispatched."] - pub fn overweight( + #[doc = " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones"] + #[doc = " are actually valid ticket mappings."] + pub fn tickets( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - )>, + ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "Overweight", + "Lottery", + "Tickets", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, - 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, - 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, - 236u8, 111u8, 87u8, 146u8, 212u8, + 146u8, 73u8, 177u8, 170u8, 239u8, 27u8, 41u8, 142u8, 212u8, + 251u8, 124u8, 174u8, 237u8, 255u8, 133u8, 237u8, 34u8, 249u8, + 246u8, 3u8, 153u8, 156u8, 80u8, 244u8, 65u8, 26u8, 106u8, + 234u8, 150u8, 75u8, 93u8, 175u8, ], ) } - #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = " Each ticket's owner."] #[doc = ""] - #[doc = " These messages stay there until manually dispatched."] - pub fn overweight_root( + #[doc = " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones"] + #[doc = " are actually valid ticket mappings."] + pub fn tickets_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - )>, + ::subxt::utils::AccountId32, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "Overweight", + "Lottery", + "Tickets", Vec::new(), [ - 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, - 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, - 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, - 236u8, 111u8, 87u8, 146u8, 212u8, + 146u8, 73u8, 177u8, 170u8, 239u8, 27u8, 41u8, 142u8, 212u8, + 251u8, 124u8, 174u8, 237u8, 255u8, 133u8, 237u8, 34u8, 249u8, + 246u8, 3u8, 153u8, 156u8, 80u8, 244u8, 65u8, 26u8, 106u8, + 234u8, 150u8, 75u8, 93u8, 175u8, ], ) } - #[doc = " The number of overweight messages ever recorded in `Overweight` (and thus the lowest free"] - #[doc = " index)."] - pub fn overweight_count( + #[doc = " The calls stored in this pallet to be used in an active lottery if configured"] + #[doc = " by `Config::ValidateCall`."] + pub fn call_indices( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u8, + ::core::primitive::u8, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Ump", - "OverweightCount", + "Lottery", + "CallIndices", vec![], [ - 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, - 116u8, 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, - 150u8, 126u8, 89u8, 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, - 233u8, 252u8, 255u8, 36u8, 20u8, + 244u8, 89u8, 150u8, 164u8, 63u8, 13u8, 41u8, 8u8, 140u8, + 211u8, 163u8, 176u8, 239u8, 120u8, 247u8, 160u8, 131u8, + 116u8, 13u8, 152u8, 154u8, 1u8, 128u8, 128u8, 182u8, 246u8, + 45u8, 106u8, 88u8, 6u8, 135u8, 158u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The Lottery's pallet id"] + pub fn pallet_id( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt::constants::StaticConstantAddress::new( + "Lottery", + "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, + ], + ) + } + #[doc = " The max number of calls available in a single lottery."] + pub fn max_calls( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Lottery", + "MaxCalls", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 time we should try to generate a random number that has no modulo bias."] + #[doc = " The larger this number, the more potential computation is used for picking the winner,"] + #[doc = " but also the more likely that the chosen winner is done fairly."] + pub fn max_generate_random( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Lottery", + "MaxGenerateRandom", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 hrmp { + pub mod nis { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -26989,10 +26280,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpInitOpenChannel { - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub proposed_max_capacity: ::core::primitive::u32, - pub proposed_max_message_size: ::core::primitive::u32, + pub struct PlaceBid { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub duration: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27003,8 +26294,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpAcceptOpenChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub struct RetractBid { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub duration: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27015,10 +26308,122 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCloseChannel { - pub channel_id: - runtime_types::polkadot_parachain::primitives::HrmpChannelId, + pub struct FundDeficit; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Thaw { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub portion: ::core::option::Option<::core::primitive::u128>, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Place a bid."] + #[doc = ""] + #[doc = "Origin must be Signed, and account must have at least `amount` in free balance."] + #[doc = ""] + #[doc = "- `amount`: The amount of the bid; these funds will be reserved, and if/when"] + #[doc = " consolidated, removed. Must be at least `MinBid`."] + #[doc = "- `duration`: The number of periods before which the newly consolidated bid may be"] + #[doc = " thawed. Must be greater than 1 and no more than `QueueCount`."] + #[doc = ""] + #[doc = "Complexities:"] + #[doc = "- `Queues[duration].len()` (just take max)."] + pub fn place_bid( + &self, + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nis", + "place_bid", + PlaceBid { amount, duration }, + [ + 197u8, 16u8, 24u8, 59u8, 72u8, 162u8, 72u8, 124u8, 149u8, + 28u8, 208u8, 47u8, 208u8, 0u8, 110u8, 122u8, 32u8, 225u8, + 29u8, 21u8, 144u8, 75u8, 138u8, 188u8, 213u8, 188u8, 34u8, + 231u8, 52u8, 191u8, 210u8, 158u8, + ], + ) + } + #[doc = "Retract a previously placed bid."] + #[doc = ""] + #[doc = "Origin must be Signed, and the account should have previously issued a still-active bid"] + #[doc = "of `amount` for `duration`."] + #[doc = ""] + #[doc = "- `amount`: The amount of the previous bid."] + #[doc = "- `duration`: The duration of the previous bid."] + pub fn retract_bid( + &self, + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nis", + "retract_bid", + RetractBid { amount, duration }, + [ + 139u8, 141u8, 178u8, 24u8, 250u8, 206u8, 70u8, 51u8, 249u8, + 82u8, 172u8, 68u8, 157u8, 50u8, 110u8, 233u8, 163u8, 46u8, + 204u8, 54u8, 154u8, 20u8, 18u8, 205u8, 137u8, 95u8, 187u8, + 74u8, 250u8, 161u8, 220u8, 22u8, + ], + ) + } + #[doc = "Ensure we have sufficient funding for all potential payouts."] + #[doc = ""] + #[doc = "- `origin`: Must be accepted by `FundOrigin`."] + pub fn fund_deficit(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nis", + "fund_deficit", + FundDeficit {}, + [ + 70u8, 45u8, 215u8, 5u8, 225u8, 2u8, 127u8, 191u8, 36u8, + 210u8, 1u8, 35u8, 22u8, 17u8, 187u8, 237u8, 241u8, 245u8, + 168u8, 204u8, 112u8, 25u8, 55u8, 124u8, 12u8, 26u8, 149u8, + 7u8, 26u8, 248u8, 190u8, 125u8, + ], + ) + } + #[doc = "Reduce or remove an outstanding receipt, placing the according proportion of funds into"] + #[doc = "the account of the owner."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed and the account must be the owner of the receipt `index` as"] + #[doc = " well as any fungible counterpart."] + #[doc = "- `index`: The index of the receipt."] + #[doc = "- `portion`: If `Some`, then only the given portion of the receipt should be thawed. If"] + #[doc = " `None`, then all of it should be."] + pub fn thaw( + &self, + index: ::core::primitive::u32, + portion: ::core::option::Option<::core::primitive::u128>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nis", + "thaw", + Thaw { index, portion }, + [ + 34u8, 100u8, 241u8, 244u8, 68u8, 188u8, 12u8, 217u8, 192u8, + 173u8, 139u8, 114u8, 120u8, 167u8, 231u8, 227u8, 76u8, 125u8, + 28u8, 138u8, 19u8, 252u8, 29u8, 197u8, 228u8, 89u8, 74u8, + 145u8, 250u8, 41u8, 179u8, 192u8, + ], + ) + } } + } + #[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_nis::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -27028,13 +26433,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCleanHrmp { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub inbound: ::core::primitive::u32, - pub outbound: ::core::primitive::u32, + #[doc = "A bid was successfully placed."] + pub struct BidPlaced { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + pub duration: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BidPlaced { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "BidPlaced"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27043,11 +26452,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpOpen { - pub channels: ::core::primitive::u32, + #[doc = "A bid was successfully removed (before being accepted)."] + pub struct BidRetracted { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + pub duration: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BidRetracted { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "BidRetracted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27056,8 +26471,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceProcessHrmpClose { - pub channels: ::core::primitive::u32, + #[doc = "A bid was dropped from a queue because of another, more substantial, bid was present."] + pub struct BidDropped { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + pub duration: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BidDropped { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "BidDropped"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27068,10 +26490,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpCancelOpenRequest { - pub channel_id: - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - pub open_requests: ::core::primitive::u32, + #[doc = "A bid was accepted. The balance may not be released until expiry."] + pub struct Issued { + pub index: ::core::primitive::u32, + pub expiry: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "Issued"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27082,244 +26511,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceOpenHrmpChannel { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - pub max_capacity: ::core::primitive::u32, - pub max_message_size: ::core::primitive::u32, + #[doc = "An receipt has been (at least partially) thawed."] + pub struct Thawed { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, + pub amount: ::core::primitive::u128, + pub dropped: ::core::primitive::bool, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] - #[doc = "parameters."] - #[doc = ""] - #[doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] - #[doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] - #[doc = ""] - #[doc = "These numbers are a subject to the relay-chain configuration limits."] - #[doc = ""] - #[doc = "The channel can be opened only after the recipient confirms it and only on a session"] - #[doc = "change."] - pub fn hrmp_init_open_channel( - &self, - recipient: runtime_types::polkadot_parachain::primitives::Id, - proposed_max_capacity: ::core::primitive::u32, - proposed_max_message_size: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "hrmp_init_open_channel", - HrmpInitOpenChannel { - recipient, - proposed_max_capacity, - proposed_max_message_size, - }, - [ - 170u8, 72u8, 58u8, 42u8, 38u8, 11u8, 110u8, 229u8, 239u8, - 136u8, 99u8, 230u8, 223u8, 225u8, 126u8, 61u8, 234u8, 185u8, - 101u8, 156u8, 40u8, 102u8, 253u8, 123u8, 77u8, 204u8, 217u8, - 86u8, 162u8, 66u8, 25u8, 214u8, - ], - ) - } - #[doc = "Accept a pending open channel request from the given sender."] - #[doc = ""] - #[doc = "The channel will be opened only on the next session boundary."] - pub fn hrmp_accept_open_channel( - &self, - sender: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "hrmp_accept_open_channel", - HrmpAcceptOpenChannel { sender }, - [ - 75u8, 111u8, 52u8, 164u8, 204u8, 100u8, 204u8, 111u8, 127u8, - 84u8, 60u8, 136u8, 95u8, 255u8, 48u8, 157u8, 189u8, 76u8, - 33u8, 177u8, 223u8, 27u8, 74u8, 221u8, 139u8, 1u8, 12u8, - 128u8, 242u8, 7u8, 3u8, 53u8, - ], - ) - } - #[doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] - #[doc = "recipient in the channel being closed."] - #[doc = ""] - #[doc = "The closure can only happen on a session change."] - pub fn hrmp_close_channel( - &self, - channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "hrmp_close_channel", - HrmpCloseChannel { channel_id }, - [ - 11u8, 202u8, 76u8, 107u8, 213u8, 21u8, 191u8, 190u8, 40u8, - 229u8, 60u8, 115u8, 232u8, 136u8, 41u8, 114u8, 21u8, 19u8, - 238u8, 236u8, 202u8, 56u8, 212u8, 232u8, 34u8, 84u8, 27u8, - 70u8, 176u8, 252u8, 218u8, 52u8, - ], - ) - } - #[doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] - #[doc = "a para may have. Normally this happens once per session, but this allows"] - #[doc = "you to trigger the cleanup immediately for a specific parachain."] - #[doc = ""] - #[doc = "Origin must be Root."] - #[doc = ""] - #[doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] - pub fn force_clean_hrmp( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - inbound: ::core::primitive::u32, - outbound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "force_clean_hrmp", - ForceCleanHrmp { - para, - inbound, - outbound, - }, - [ - 171u8, 109u8, 147u8, 49u8, 163u8, 107u8, 36u8, 169u8, 117u8, - 193u8, 231u8, 114u8, 207u8, 38u8, 240u8, 195u8, 155u8, 222u8, - 244u8, 142u8, 93u8, 79u8, 111u8, 43u8, 5u8, 33u8, 190u8, - 30u8, 200u8, 225u8, 173u8, 64u8, - ], - ) - } - #[doc = "Force process HRMP open channel requests."] - #[doc = ""] - #[doc = "If there are pending HRMP open channel requests, you can use this"] - #[doc = "function process all of those requests immediately."] - #[doc = ""] - #[doc = "Total number of opening channels must be provided as witness data of weighing."] - pub fn force_process_hrmp_open( - &self, - channels: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "force_process_hrmp_open", - ForceProcessHrmpOpen { channels }, - [ - 231u8, 80u8, 233u8, 15u8, 131u8, 167u8, 223u8, 28u8, 182u8, - 185u8, 213u8, 24u8, 154u8, 160u8, 68u8, 94u8, 160u8, 59u8, - 78u8, 85u8, 85u8, 149u8, 130u8, 131u8, 9u8, 162u8, 169u8, - 119u8, 165u8, 44u8, 150u8, 50u8, - ], - ) - } - #[doc = "Force process HRMP close channel requests."] - #[doc = ""] - #[doc = "If there are pending HRMP close channel requests, you can use this"] - #[doc = "function process all of those requests immediately."] - #[doc = ""] - #[doc = "Total number of closing channels must be provided as witness data of weighing."] - pub fn force_process_hrmp_close( - &self, - channels: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "force_process_hrmp_close", - ForceProcessHrmpClose { channels }, - [ - 248u8, 138u8, 30u8, 151u8, 53u8, 16u8, 44u8, 116u8, 51u8, - 194u8, 173u8, 252u8, 143u8, 53u8, 184u8, 129u8, 80u8, 80u8, - 25u8, 118u8, 47u8, 183u8, 249u8, 130u8, 8u8, 221u8, 56u8, - 106u8, 182u8, 114u8, 186u8, 161u8, - ], - ) - } - #[doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] - #[doc = "or the recipient for that request. The origin must be either of those."] - #[doc = ""] - #[doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] - #[doc = "already accepted."] - #[doc = ""] - #[doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] - #[doc = "witness data."] - pub fn hrmp_cancel_open_request( - &self, - channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, - open_requests: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "hrmp_cancel_open_request", - HrmpCancelOpenRequest { - channel_id, - open_requests, - }, - [ - 136u8, 217u8, 56u8, 138u8, 227u8, 37u8, 120u8, 83u8, 116u8, - 228u8, 42u8, 111u8, 206u8, 210u8, 177u8, 235u8, 225u8, 98u8, - 172u8, 184u8, 87u8, 65u8, 77u8, 129u8, 7u8, 0u8, 232u8, - 139u8, 134u8, 1u8, 59u8, 19u8, - ], - ) - } - #[doc = "Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although"] - #[doc = "opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay"] - #[doc = "Chain's configured limits."] - #[doc = ""] - #[doc = "Expected use is when one of the `ParaId`s involved in the channel is governed by the"] - #[doc = "Relay Chain, e.g. a common good parachain."] - pub fn force_open_hrmp_channel( - &self, - sender: runtime_types::polkadot_parachain::primitives::Id, - recipient: runtime_types::polkadot_parachain::primitives::Id, - max_capacity: ::core::primitive::u32, - max_message_size: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Hrmp", - "force_open_hrmp_channel", - ForceOpenHrmpChannel { - sender, - recipient, - max_capacity, - max_message_size, - }, - [ - 145u8, 23u8, 215u8, 75u8, 94u8, 119u8, 205u8, 222u8, 186u8, - 149u8, 11u8, 172u8, 211u8, 158u8, 247u8, 21u8, 125u8, 144u8, - 91u8, 157u8, 94u8, 143u8, 188u8, 20u8, 98u8, 136u8, 165u8, - 70u8, 155u8, 14u8, 92u8, 58u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Open HRMP channel requested."] - #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] - pub struct OpenChannelRequested( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for OpenChannelRequested { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelRequested"; + impl ::subxt::events::StaticEvent for Thawed { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "Thawed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27328,33 +26533,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] - #[doc = "`[by_parachain, channel_id]`"] - pub struct OpenChannelCanceled( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::events::StaticEvent for OpenChannelCanceled { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelCanceled"; + #[doc = "An automatic funding of the deficit was made."] + pub struct Funded { + pub deficit: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] - pub struct OpenChannelAccepted( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::Id, - ); - impl ::subxt::events::StaticEvent for OpenChannelAccepted { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "OpenChannelAccepted"; + impl ::subxt::events::StaticEvent for Funded { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "Funded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27365,822 +26550,372 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] - pub struct ChannelClosed( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ); - impl ::subxt::events::StaticEvent for ChannelClosed { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "ChannelClosed"; + #[doc = "A receipt was transfered."] + pub struct Transferred { + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, + pub index: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An HRMP channel was opened via Root origin."] - #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] - pub struct HrmpChannelForceOpened( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for HrmpChannelForceOpened { - const PALLET: &'static str = "Hrmp"; - const EVENT: &'static str = "HrmpChannelForceOpened"; + impl ::subxt::events::StaticEvent for Transferred { + const PALLET: &'static str = "Nis"; + const EVENT: &'static str = "Transferred"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of pending HRMP open channel requests."] - #[doc = ""] - #[doc = " The set is accompanied by a list for iteration."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpOpenChannelRequests", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, - 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, - 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, - 235u8, 74u8, 181u8, 169u8, - ], - ) - } - #[doc = " The set of pending HRMP open channel requests."] - #[doc = ""] - #[doc = " The set is accompanied by a list for iteration."] + #[doc = " The totals of items and balances within each queue. Saves a lot of storage reads in the"] + #[doc = " case of sparsely packed queues."] #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpOpenChannelRequests", - Vec::new(), - [ - 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, - 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, - 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, - 235u8, 74u8, 181u8, 169u8, - ], - ) - } - pub fn hrmp_open_channel_requests_list( + #[doc = " The vector is indexed by duration in `Period`s, offset by one, so information on the queue"] + #[doc = " whose duration is one `Period` would be storage `0`."] + pub fn queue_totals( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, - >, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u128, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpOpenChannelRequestsList", + "Nis", + "QueueTotals", vec![], [ - 187u8, 157u8, 7u8, 183u8, 88u8, 215u8, 128u8, 174u8, 244u8, - 130u8, 137u8, 13u8, 110u8, 126u8, 181u8, 165u8, 142u8, 69u8, - 75u8, 37u8, 37u8, 149u8, 46u8, 100u8, 140u8, 69u8, 234u8, - 171u8, 103u8, 136u8, 223u8, 193u8, - ], - ) - } - #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] - #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] - #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] - pub fn hrmp_open_channel_request_count( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpOpenChannelRequestCount", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, - 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, - 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, - 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, + 230u8, 24u8, 0u8, 151u8, 63u8, 26u8, 180u8, 81u8, 179u8, + 26u8, 176u8, 46u8, 2u8, 91u8, 250u8, 210u8, 212u8, 27u8, + 47u8, 228u8, 2u8, 51u8, 64u8, 7u8, 218u8, 130u8, 210u8, 7u8, + 92u8, 102u8, 184u8, 227u8, ], ) } - #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] - #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] - #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] - pub fn hrmp_open_channel_request_count_root( + #[doc = " The queues of bids. Indexed by duration (in `Period`s)."] + pub fn queues( &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( - "Hrmp", - "HrmpOpenChannelRequestCount", - Vec::new(), - [ - 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, - 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, - 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, - 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, - ], - ) - } - #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] - #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] - #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] - pub fn hrmp_accepted_channel_request_count( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_nis::pallet::Bid< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpAcceptedChannelRequestCount", + "Nis", + "Queues", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, - 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, - 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, - 164u8, 161u8, 6u8, 15u8, 15u8, + 11u8, 50u8, 58u8, 232u8, 240u8, 243u8, 90u8, 103u8, 252u8, + 238u8, 15u8, 75u8, 189u8, 241u8, 231u8, 50u8, 194u8, 134u8, + 162u8, 220u8, 97u8, 217u8, 215u8, 135u8, 138u8, 189u8, 167u8, + 15u8, 162u8, 247u8, 6u8, 74u8, ], ) } - #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] - #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] - #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] - pub fn hrmp_accepted_channel_request_count_root( + #[doc = " The queues of bids. Indexed by duration (in `Period`s)."] + pub fn queues_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpAcceptedChannelRequestCount", - Vec::new(), - [ - 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, - 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, - 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, - 164u8, 161u8, 6u8, 15u8, 15u8, - ], - ) - } - #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] - #[doc = " change. Used for checking if a given channel is registered for closure."] - #[doc = ""] - #[doc = " The set is accompanied by a list for iteration."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] - pub fn hrmp_close_channel_requests( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_nis::pallet::Bid< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<()>, - ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpCloseChannelRequests", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, - 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, - 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, - 176u8, 134u8, 223u8, 39u8, 87u8, - ], - ) - } - #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] - #[doc = " change. Used for checking if a given channel is registered for closure."] - #[doc = ""] - #[doc = " The set is accompanied by a list for iteration."] - #[doc = ""] - #[doc = " Invariant:"] - #[doc = " - There are no channels that exists in list but not in the set and vice versa."] - pub fn hrmp_close_channel_requests_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<()>, - (), - (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpCloseChannelRequests", + "Nis", + "Queues", Vec::new(), [ - 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, - 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, - 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, - 176u8, 134u8, 223u8, 39u8, 87u8, + 11u8, 50u8, 58u8, 232u8, 240u8, 243u8, 90u8, 103u8, 252u8, + 238u8, 15u8, 75u8, 189u8, 241u8, 231u8, 50u8, 194u8, 134u8, + 162u8, 220u8, 97u8, 217u8, 215u8, 135u8, 138u8, 189u8, 167u8, + 15u8, 162u8, 247u8, 6u8, 74u8, ], ) } - pub fn hrmp_close_channel_requests_list( + #[doc = " Summary information over the general state."] + pub fn summary( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, + runtime_types::pallet_nis::pallet::SummaryRecord< + ::core::primitive::u32, >, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpCloseChannelRequestsList", + "Nis", + "Summary", vec![], [ - 192u8, 165u8, 71u8, 70u8, 211u8, 233u8, 155u8, 146u8, 160u8, - 58u8, 103u8, 64u8, 123u8, 232u8, 157u8, 71u8, 199u8, 223u8, - 158u8, 5u8, 164u8, 93u8, 231u8, 153u8, 1u8, 63u8, 155u8, 4u8, - 138u8, 89u8, 178u8, 116u8, - ], - ) - } - #[doc = " The HRMP watermark associated with each para."] - #[doc = " Invariant:"] - #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_watermarks( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpWatermarks", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, - 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, - 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, - 19u8, 129u8, 51u8, 103u8, 155u8, - ], - ) - } - #[doc = " The HRMP watermark associated with each para."] - #[doc = " Invariant:"] - #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_watermarks_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpWatermarks", - Vec::new(), - [ - 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, - 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, - 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, - 19u8, 129u8, 51u8, 103u8, 155u8, + 169u8, 255u8, 214u8, 207u8, 179u8, 114u8, 114u8, 194u8, + 239u8, 197u8, 161u8, 209u8, 15u8, 176u8, 220u8, 190u8, 146u8, + 97u8, 71u8, 153u8, 84u8, 143u8, 121u8, 111u8, 12u8, 234u8, + 251u8, 71u8, 190u8, 22u8, 138u8, 89u8, ], ) } - #[doc = " HRMP channel data associated with each para."] - #[doc = " Invariant:"] - #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_channels( + #[doc = " The currently outstanding receipts, indexed according to the order of creation."] + pub fn receipts( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + runtime_types::pallet_nis::pallet::ReceiptRecord< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannels", + "Nis", + "Receipts", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, - 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, - 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, - 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, + 206u8, 83u8, 28u8, 145u8, 57u8, 73u8, 165u8, 239u8, 15u8, + 178u8, 3u8, 56u8, 4u8, 223u8, 219u8, 14u8, 196u8, 197u8, + 104u8, 167u8, 33u8, 163u8, 26u8, 162u8, 107u8, 146u8, 208u8, + 242u8, 60u8, 66u8, 218u8, 3u8, ], ) } - #[doc = " HRMP channel data associated with each para."] - #[doc = " Invariant:"] - #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] - pub fn hrmp_channels_root( + #[doc = " The currently outstanding receipts, indexed according to the order of creation."] + pub fn receipts_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, + runtime_types::pallet_nis::pallet::ReceiptRecord< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannels", - Vec::new(), - [ - 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, - 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, - 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, - 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, - ], - ) - } - #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] - #[doc = " I.e."] - #[doc = ""] - #[doc = " (a) ingress index allows to find all the senders for a given recipient."] - #[doc = " (b) egress index allows to find all the recipients for a given sender."] - #[doc = ""] - #[doc = " Invariants:"] - #[doc = " - for each ingress index entry for `P` each item `I` in the index should present in"] - #[doc = " `HrmpChannels` as `(I, P)`."] - #[doc = " - for each egress index entry for `P` each item `E` in the index should present in"] - #[doc = " `HrmpChannels` as `(P, E)`."] - #[doc = " - there should be no other dangling channels in `HrmpChannels`."] - #[doc = " - the vectors are sorted."] - pub fn hrmp_ingress_channels_index( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpIngressChannelsIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, - 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, - 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, - 175u8, 234u8, 0u8, 101u8, 99u8, - ], - ) - } - #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] - #[doc = " I.e."] - #[doc = ""] - #[doc = " (a) ingress index allows to find all the senders for a given recipient."] - #[doc = " (b) egress index allows to find all the recipients for a given sender."] - #[doc = ""] - #[doc = " Invariants:"] - #[doc = " - for each ingress index entry for `P` each item `I` in the index should present in"] - #[doc = " `HrmpChannels` as `(I, P)`."] - #[doc = " - for each egress index entry for `P` each item `E` in the index should present in"] - #[doc = " `HrmpChannels` as `(P, E)`."] - #[doc = " - there should be no other dangling channels in `HrmpChannels`."] - #[doc = " - the vectors are sorted."] - pub fn hrmp_ingress_channels_index_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpIngressChannelsIndex", + "Nis", + "Receipts", Vec::new(), [ - 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, - 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, - 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, - 175u8, 234u8, 0u8, 101u8, 99u8, - ], - ) - } - pub fn hrmp_egress_channels_index( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpEgressChannelsIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, - 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, - 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, - 236u8, 211u8, 32u8, 177u8, 88u8, + 206u8, 83u8, 28u8, 145u8, 57u8, 73u8, 165u8, 239u8, 15u8, + 178u8, 3u8, 56u8, 4u8, 223u8, 219u8, 14u8, 196u8, 197u8, + 104u8, 167u8, 33u8, 163u8, 26u8, 162u8, 107u8, 146u8, 208u8, + 242u8, 60u8, 66u8, 218u8, 3u8, ], ) } - pub fn hrmp_egress_channels_index_root( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] + pub fn pallet_id( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::frame_support::PalletId, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpEgressChannelsIndex", - Vec::new(), + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "PalletId", [ - 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, - 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, - 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, - 236u8, 211u8, 32u8, 177u8, 88u8, + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, + 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, + 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, + 189u8, 30u8, 94u8, 22u8, 39u8, ], ) } - #[doc = " Storage for the messages for each channel."] - #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] - pub fn hrmp_channel_contents( + #[doc = " Number of duration queues in total. This sets the maximum duration supported, which is"] + #[doc = " this value multiplied by `Period`."] + pub fn queue_count( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannelContents", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "QueueCount", [ - 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, - 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, - 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, - 150u8, 193u8, 90u8, 196u8, 225u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Storage for the messages for each channel."] - #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] - pub fn hrmp_channel_contents_root( + #[doc = " Maximum number of items that may be in each duration queue."] + #[doc = ""] + #[doc = " Must be larger than zero."] + pub fn max_queue_len( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_core_primitives::InboundHrmpMessage< - ::core::primitive::u32, - >, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannelContents", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "MaxQueueLen", [ - 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, - 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, - 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, - 150u8, 193u8, 90u8, 196u8, 225u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] - #[doc = " the given block number for a given receiver. Invariants:"] - #[doc = " - The inner `Vec` is never empty."] - #[doc = " - The inner `Vec` cannot store two same `ParaId`."] - #[doc = " - The outer vector is sorted ascending by block number and cannot store two items with the"] - #[doc = " same block number."] - pub fn hrmp_channel_digests( + #[doc = " Portion of the queue which is free from ordering and just a FIFO."] + #[doc = ""] + #[doc = " Must be no greater than `MaxQueueLen`."] + pub fn fifo_queue_len( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannelDigests", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "FifoQueueLen", [ - 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, - 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, - 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, - 132u8, 73u8, 133u8, 79u8, 104u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] - #[doc = " the given block number for a given receiver. Invariants:"] - #[doc = " - The inner `Vec` is never empty."] - #[doc = " - The inner `Vec` cannot store two same `ParaId`."] - #[doc = " - The outer vector is sorted ascending by block number and cannot store two items with the"] - #[doc = " same block number."] - pub fn hrmp_channel_digests_root( + #[doc = " The base period for the duration queues. This is the common multiple across all"] + #[doc = " supported freezing durations that can be bid upon."] + pub fn base_period( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<( - ::core::primitive::u32, - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - )>, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Hrmp", - "HrmpChannelDigests", - Vec::new(), - [ - 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, - 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, - 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, - 132u8, 73u8, 133u8, 79u8, 104u8, - ], - ) - } - } - } - } - pub mod para_session_info { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Assignment keys for the current session."] - #[doc = " Note that this API is private due to it being prone to 'off-by-one' at session boundaries."] - #[doc = " When in doubt, use `Sessions` API instead."] pub fn assignment_keys_unsafe (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < :: std :: vec :: Vec < runtime_types :: polkadot_primitives :: v2 :: assignment_app :: Public > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "AssignmentKeysUnsafe", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "BasePeriod", [ - 80u8, 24u8, 61u8, 132u8, 118u8, 225u8, 207u8, 75u8, 35u8, - 240u8, 209u8, 255u8, 19u8, 240u8, 114u8, 174u8, 86u8, 65u8, - 65u8, 52u8, 135u8, 232u8, 59u8, 208u8, 3u8, 107u8, 114u8, - 241u8, 14u8, 98u8, 40u8, 226u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 earliest session for which previous session info is stored."] - pub fn earliest_stored_session( + #[doc = " The minimum amount of funds that may be placed in a bid. Note that this"] + #[doc = " does not actually limit the amount which may be represented in a receipt since bids may"] + #[doc = " be split up by the system."] + #[doc = ""] + #[doc = " It should be at least big enough to ensure that there is no possible storage spam attack"] + #[doc = " or queue-filling attack."] + pub fn min_bid( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "EarliestStoredSession", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "MinBid", [ - 25u8, 143u8, 246u8, 184u8, 35u8, 166u8, 140u8, 147u8, 171u8, - 5u8, 164u8, 159u8, 228u8, 21u8, 248u8, 236u8, 48u8, 210u8, - 133u8, 140u8, 171u8, 3u8, 85u8, 250u8, 160u8, 102u8, 95u8, - 46u8, 33u8, 81u8, 102u8, 241u8, + 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 = " Session information in a rolling window."] - #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] - #[doc = " Does not have any entries before the session index in the first session change notification."] - pub fn sessions( + #[doc = " The minimum amount of funds which may intentionally be left remaining under a single"] + #[doc = " receipt."] + pub fn min_receipt( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::SessionInfo, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Perquintill, > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "Sessions", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "MinReceipt", [ - 186u8, 220u8, 61u8, 52u8, 195u8, 40u8, 214u8, 113u8, 92u8, - 109u8, 221u8, 201u8, 122u8, 213u8, 124u8, 35u8, 244u8, 55u8, - 244u8, 168u8, 23u8, 0u8, 240u8, 109u8, 143u8, 90u8, 40u8, - 87u8, 127u8, 64u8, 100u8, 75u8, + 6u8, 4u8, 24u8, 100u8, 110u8, 86u8, 4u8, 252u8, 70u8, 43u8, + 169u8, 124u8, 204u8, 27u8, 252u8, 91u8, 99u8, 13u8, 149u8, + 202u8, 65u8, 211u8, 125u8, 108u8, 127u8, 4u8, 146u8, 163u8, + 41u8, 193u8, 25u8, 103u8, ], ) } - #[doc = " Session information in a rolling window."] - #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] - #[doc = " Does not have any entries before the session index in the first session change notification."] - pub fn sessions_root( + #[doc = " The number of blocks between consecutive attempts to dequeue bids and create receipts."] + #[doc = ""] + #[doc = " A larger value results in fewer storage hits each block, but a slower period to get to"] + #[doc = " the target."] + pub fn intake_period( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::SessionInfo, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "Sessions", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "IntakePeriod", [ - 186u8, 220u8, 61u8, 52u8, 195u8, 40u8, 214u8, 113u8, 92u8, - 109u8, 221u8, 201u8, 122u8, 213u8, 124u8, 35u8, 244u8, 55u8, - 244u8, 168u8, 23u8, 0u8, 240u8, 109u8, 143u8, 90u8, 40u8, - 87u8, 127u8, 64u8, 100u8, 75u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 validator account keys of the validators actively participating in parachain consensus."] - pub fn account_keys( + #[doc = " The maximum amount of bids that can consolidated into receipts in a single intake. A"] + #[doc = " larger value here means less of the block available for transactions should there be a"] + #[doc = " glut of bids."] + pub fn max_intake_weight( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "AccountKeys", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "MaxIntakeWeight", [ - 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, - 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, - 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, - 215u8, 94u8, 124u8, 148u8, 142u8, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, ], ) } - #[doc = " The validator account keys of the validators actively participating in parachain consensus."] - pub fn account_keys_root( + #[doc = " The maximum proportion which may be thawed and the period over which it is reset."] + pub fn thaw_throttle( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::subxt::utils::AccountId32>, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParaSessionInfo", - "AccountKeys", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<( + runtime_types::sp_arithmetic::per_things::Perquintill, + ::core::primitive::u32, + )> { + ::subxt::constants::StaticConstantAddress::new( + "Nis", + "ThawThrottle", [ - 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, - 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, - 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, - 215u8, 94u8, 124u8, 148u8, 142u8, + 186u8, 73u8, 125u8, 166u8, 127u8, 250u8, 1u8, 100u8, 253u8, + 174u8, 176u8, 185u8, 210u8, 229u8, 218u8, 53u8, 27u8, 72u8, + 79u8, 130u8, 87u8, 138u8, 50u8, 139u8, 205u8, 79u8, 190u8, + 58u8, 140u8, 68u8, 70u8, 16u8, ], ) } } } } - pub mod paras_disputes { + pub mod uniques { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -28197,31 +26932,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnfreeze; - pub struct TransactionApi; - impl TransactionApi { - pub fn force_unfreeze( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "ParasDisputes", - "force_unfreeze", - ForceUnfreeze {}, - [ - 212u8, 211u8, 58u8, 159u8, 23u8, 220u8, 64u8, 175u8, 65u8, - 50u8, 192u8, 122u8, 113u8, 189u8, 74u8, 191u8, 48u8, 93u8, - 251u8, 50u8, 237u8, 240u8, 91u8, 139u8, 193u8, 114u8, 131u8, - 125u8, 124u8, 236u8, 191u8, 190u8, - ], - ) - } + pub struct Create { + pub collection: ::core::primitive::u32, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::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::polkadot_runtime_parachains::disputes::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28231,14 +26948,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A dispute has been initiated. \\[candidate hash, dispute location\\]"] - pub struct DisputeInitiated( - pub runtime_types::polkadot_core_primitives::CandidateHash, - pub runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, - ); - impl ::subxt::events::StaticEvent for DisputeInitiated { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeInitiated"; + pub struct ForceCreate { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub free_holding: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28249,15 +26965,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A dispute has concluded for or against a candidate."] - #[doc = "`\\[para id, candidate hash, dispute result\\]`"] - pub struct DisputeConcluded( - pub runtime_types::polkadot_core_primitives::CandidateHash, - pub runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, - ); - impl ::subxt::events::StaticEvent for DisputeConcluded { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeConcluded"; + pub struct Destroy { + pub collection: ::core::primitive::u32, + pub witness: runtime_types::pallet_uniques::types::DestroyWitness, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28268,17 +26978,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A dispute has timed out due to insufficient participation."] - #[doc = "`\\[para id, candidate hash\\]`"] - pub struct DisputeTimedOut( - pub runtime_types::polkadot_core_primitives::CandidateHash, - ); - impl ::subxt::events::StaticEvent for DisputeTimedOut { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "DisputeTimedOut"; + pub struct Mint { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28287,219 +26995,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A dispute has concluded with supermajority against a candidate."] - #[doc = "Block authors should no longer build on top of this head and should"] - #[doc = "instead revert the block at the given height. This should be the"] - #[doc = "number of the child of the last known valid block in the chain."] - pub struct Revert(pub ::core::primitive::u32); - impl ::subxt::events::StaticEvent for Revert { - const PALLET: &'static str = "ParasDisputes"; - const EVENT: &'static str = "Revert"; + pub struct Burn { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub check_owner: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The last pruned session, if any. All data stored by this module"] - #[doc = " references sessions."] - pub fn last_pruned_session( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "LastPrunedSession", - vec![], - [ - 125u8, 138u8, 99u8, 242u8, 9u8, 246u8, 215u8, 246u8, 141u8, - 6u8, 129u8, 87u8, 27u8, 58u8, 53u8, 121u8, 61u8, 119u8, 35u8, - 104u8, 33u8, 43u8, 179u8, 82u8, 244u8, 121u8, 174u8, 135u8, - 87u8, 119u8, 236u8, 105u8, - ], - ) - } - #[doc = " All ongoing or concluded disputes for the last several sessions."] - pub fn disputes( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::polkadot_core_primitives::CandidateHash, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("ParasDisputes" , "Disputes" , 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)] , [192u8 , 238u8 , 255u8 , 67u8 , 169u8 , 86u8 , 99u8 , 243u8 , 228u8 , 88u8 , 142u8 , 138u8 , 183u8 , 117u8 , 82u8 , 22u8 , 163u8 , 30u8 , 175u8 , 247u8 , 50u8 , 204u8 , 12u8 , 171u8 , 57u8 , 189u8 , 151u8 , 191u8 , 196u8 , 89u8 , 94u8 , 165u8 ,]) - } - #[doc = " All ongoing or concluded disputes for the last several sessions."] - pub fn disputes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_primitives::v2::DisputeState< - ::core::primitive::u32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "Disputes", - Vec::new(), - [ - 192u8, 238u8, 255u8, 67u8, 169u8, 86u8, 99u8, 243u8, 228u8, - 88u8, 142u8, 138u8, 183u8, 117u8, 82u8, 22u8, 163u8, 30u8, - 175u8, 247u8, 50u8, 204u8, 12u8, 171u8, 57u8, 189u8, 151u8, - 191u8, 196u8, 89u8, 94u8, 165u8, - ], - ) - } - #[doc = " All included blocks on the chain, as well as the block number in this chain that"] - #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] - pub fn included( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - runtime_types::polkadot_core_primitives::CandidateHash, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("ParasDisputes" , "Included" , 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)] , [129u8 , 50u8 , 76u8 , 60u8 , 82u8 , 106u8 , 248u8 , 164u8 , 152u8 , 80u8 , 58u8 , 185u8 , 211u8 , 225u8 , 122u8 , 100u8 , 234u8 , 241u8 , 123u8 , 205u8 , 4u8 , 8u8 , 193u8 , 116u8 , 167u8 , 158u8 , 252u8 , 223u8 , 204u8 , 226u8 , 74u8 , 195u8 ,]) - } - #[doc = " All included blocks on the chain, as well as the block number in this chain that"] - #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] - pub fn included_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "Included", - Vec::new(), - [ - 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, - 80u8, 58u8, 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, - 123u8, 205u8, 4u8, 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, - 223u8, 204u8, 226u8, 74u8, 195u8, - ], - ) - } - #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] - #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] - #[doc = " fewer than `byzantine_threshold + 1` validators."] - #[doc = ""] - #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] - pub fn spam_slots( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u32>, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "SpamSlots", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, - 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, - 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, - 74u8, 138u8, 122u8, 251u8, 238u8, - ], - ) - } - #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] - #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] - #[doc = " fewer than `byzantine_threshold + 1` validators."] - #[doc = ""] - #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] - pub fn spam_slots_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec<::core::primitive::u32>, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "SpamSlots", - Vec::new(), - [ - 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, - 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, - 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, - 74u8, 138u8, 122u8, 251u8, 238u8, - ], - ) - } - #[doc = " Whether the chain is frozen. Starts as `None`. When this is `Some`,"] - #[doc = " the chain will not accept any new parachain blocks for backing or inclusion,"] - #[doc = " and its value indicates the last valid block number in the chain."] - #[doc = " It can only be set back to `None` by governance intervention."] - pub fn frozen( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::core::option::Option<::core::primitive::u32>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ParasDisputes", - "Frozen", - vec![], - [ - 133u8, 100u8, 86u8, 220u8, 180u8, 189u8, 65u8, 131u8, 64u8, - 56u8, 219u8, 47u8, 130u8, 167u8, 210u8, 125u8, 49u8, 7u8, - 153u8, 254u8, 20u8, 53u8, 218u8, 177u8, 122u8, 148u8, 16u8, - 198u8, 251u8, 50u8, 194u8, 128u8, - ], - ) - } - } - } - } - pub mod registrar { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28509,11 +27014,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Register { - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + pub struct Transfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28524,13 +27031,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceRegister { - pub who: ::subxt::utils::AccountId32, - pub deposit: ::core::primitive::u128, - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + pub struct Redeposit { + pub collection: ::core::primitive::u32, + pub items: ::std::vec::Vec<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28541,8 +27044,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister { - pub id: runtime_types::polkadot_parachain::primitives::Id, + pub struct Freeze { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28553,11 +27057,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Swap { - pub id: runtime_types::polkadot_parachain::primitives::Id, - pub other: runtime_types::polkadot_parachain::primitives::Id, + pub struct Thaw { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28566,10 +27071,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, + pub struct FreezeCollection { + pub collection: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28578,7 +27084,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserve; + pub struct ThawCollection { + pub collection: ::core::primitive::u32, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28588,8 +27096,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddLock { - pub para: runtime_types::polkadot_parachain::primitives::Id, + pub struct TransferOwnership { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28600,10 +27112,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleCodeUpgrade { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, + pub struct SetTeam { + pub collection: ::core::primitive::u32, + pub issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28614,241 +27136,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCurrentHead { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register head data and validation code for a reserved Para Id."] - #[doc = ""] - #[doc = "## Arguments"] - #[doc = "- `origin`: Must be called by a `Signed` origin."] - #[doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] - #[doc = "- `genesis_head`: The genesis head data of the parachain/thread."] - #[doc = "- `validation_code`: The initial validation code of the parachain/thread."] - #[doc = ""] - #[doc = "## Deposits/Fees"] - #[doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] - #[doc = "reserved previously for this para ID is accounted for."] - #[doc = ""] - #[doc = "## Events"] - #[doc = "The `Registered` event is emitted in case of success."] - pub fn register( - &self, - id: runtime_types::polkadot_parachain::primitives::Id, - genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "register", - Register { - id, - genesis_head, - validation_code, - }, - [ - 154u8, 84u8, 201u8, 125u8, 72u8, 69u8, 188u8, 42u8, 225u8, - 14u8, 136u8, 48u8, 78u8, 86u8, 99u8, 238u8, 252u8, 255u8, - 226u8, 219u8, 214u8, 17u8, 19u8, 9u8, 12u8, 13u8, 174u8, - 243u8, 37u8, 134u8, 76u8, 23u8, - ], - ) - } - #[doc = "Force the registration of a Para Id on the relay chain."] - #[doc = ""] - #[doc = "This function must be called by a Root origin."] - #[doc = ""] - #[doc = "The deposit taken can be specified for this registration. Any `ParaId`"] - #[doc = "can be registered, including sub-1000 IDs which are System Parachains."] - pub fn force_register( - &self, - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - id: runtime_types::polkadot_parachain::primitives::Id, - genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, - validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "force_register", - ForceRegister { - who, - deposit, - id, - genesis_head, - validation_code, - }, - [ - 59u8, 24u8, 236u8, 163u8, 53u8, 49u8, 92u8, 199u8, 38u8, - 76u8, 101u8, 73u8, 166u8, 105u8, 145u8, 55u8, 89u8, 30u8, - 30u8, 137u8, 151u8, 219u8, 116u8, 226u8, 168u8, 220u8, 222u8, - 6u8, 105u8, 91u8, 254u8, 216u8, - ], - ) - } - #[doc = "Deregister a Para Id, freeing all data and returning any deposit."] - #[doc = ""] - #[doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] - pub fn deregister( - &self, - id: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "deregister", - Deregister { id }, - [ - 137u8, 9u8, 146u8, 11u8, 126u8, 125u8, 186u8, 222u8, 246u8, - 199u8, 94u8, 229u8, 147u8, 245u8, 213u8, 51u8, 203u8, 181u8, - 78u8, 87u8, 18u8, 255u8, 79u8, 107u8, 234u8, 2u8, 21u8, - 212u8, 1u8, 73u8, 173u8, 253u8, - ], - ) - } - #[doc = "Swap a parachain with another parachain or parathread."] - #[doc = ""] - #[doc = "The origin must be Root, the `para` owner, or the `para` itself."] - #[doc = ""] - #[doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] - #[doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] - #[doc = ""] - #[doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] - #[doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] - #[doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] - #[doc = "and the auction deposit are switched."] - pub fn swap( - &self, - id: runtime_types::polkadot_parachain::primitives::Id, - other: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "swap", - Swap { id, other }, - [ - 238u8, 154u8, 249u8, 250u8, 57u8, 242u8, 47u8, 17u8, 50u8, - 70u8, 124u8, 189u8, 193u8, 137u8, 107u8, 138u8, 216u8, 137u8, - 160u8, 103u8, 192u8, 133u8, 7u8, 130u8, 41u8, 39u8, 47u8, - 139u8, 202u8, 7u8, 84u8, 214u8, - ], - ) - } - #[doc = "Remove a manager lock from a para. This will allow the manager of a"] - #[doc = "previously locked para to deregister or swap a para without using governance."] - #[doc = ""] - #[doc = "Can only be called by the Root origin or the parachain."] - pub fn remove_lock( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "remove_lock", - RemoveLock { para }, - [ - 93u8, 50u8, 223u8, 180u8, 185u8, 3u8, 225u8, 27u8, 233u8, - 205u8, 101u8, 86u8, 122u8, 19u8, 147u8, 8u8, 202u8, 151u8, - 80u8, 24u8, 196u8, 2u8, 88u8, 250u8, 184u8, 96u8, 158u8, - 70u8, 181u8, 201u8, 200u8, 213u8, - ], - ) - } - #[doc = "Reserve a Para Id on the relay chain."] - #[doc = ""] - #[doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] - #[doc = "The origin account is able to register head data and validation code using `register` to create"] - #[doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] - #[doc = ""] - #[doc = "## Arguments"] - #[doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] - #[doc = ""] - #[doc = "## Deposits/Fees"] - #[doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] - #[doc = ""] - #[doc = "## Events"] - #[doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] - pub fn reserve(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "reserve", - Reserve {}, - [ - 22u8, 210u8, 13u8, 54u8, 253u8, 13u8, 89u8, 174u8, 232u8, - 119u8, 148u8, 206u8, 130u8, 133u8, 199u8, 127u8, 201u8, - 205u8, 8u8, 213u8, 108u8, 93u8, 135u8, 88u8, 238u8, 171u8, - 31u8, 193u8, 23u8, 113u8, 106u8, 135u8, - ], - ) - } - #[doc = "Add a manager lock from a para. This will prevent the manager of a"] - #[doc = "para to deregister or swap a para."] - #[doc = ""] - #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] - pub fn add_lock( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "add_lock", - AddLock { para }, - [ - 99u8, 199u8, 192u8, 92u8, 180u8, 52u8, 86u8, 165u8, 249u8, - 60u8, 72u8, 79u8, 233u8, 5u8, 83u8, 194u8, 48u8, 83u8, 249u8, - 218u8, 141u8, 234u8, 232u8, 59u8, 9u8, 150u8, 147u8, 173u8, - 91u8, 154u8, 81u8, 17u8, - ], - ) - } - #[doc = "Schedule a parachain upgrade."] - #[doc = ""] - #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] - pub fn schedule_code_upgrade( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "schedule_code_upgrade", - ScheduleCodeUpgrade { para, new_code }, - [ - 67u8, 11u8, 148u8, 83u8, 36u8, 106u8, 97u8, 77u8, 79u8, - 114u8, 249u8, 218u8, 207u8, 89u8, 209u8, 120u8, 45u8, 101u8, - 69u8, 21u8, 61u8, 158u8, 90u8, 83u8, 29u8, 143u8, 55u8, 9u8, - 178u8, 75u8, 183u8, 25u8, - ], - ) - } - #[doc = "Set the parachain's current head."] - #[doc = ""] - #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] - pub fn set_current_head( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - new_head: runtime_types::polkadot_parachain::primitives::HeadData, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Registrar", - "set_current_head", - SetCurrentHead { para, new_head }, - [ - 103u8, 240u8, 206u8, 26u8, 120u8, 189u8, 94u8, 221u8, 174u8, - 225u8, 210u8, 176u8, 217u8, 18u8, 94u8, 216u8, 77u8, 205u8, - 86u8, 196u8, 121u8, 4u8, 230u8, 147u8, 19u8, 224u8, 38u8, - 254u8, 199u8, 254u8, 245u8, 110u8, - ], - ) - } + pub struct ApproveTransfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::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::polkadot_runtime_common::paras_registrar::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28858,13 +27153,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Registered { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub manager: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Registered { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Registered"; + pub struct CancelApproval { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub maybe_check_delegate: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28875,12 +27172,26 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregistered { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - } - impl ::subxt::events::StaticEvent for Deregistered { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Deregistered"; + pub struct ForceItemStatus { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub free_holding: ::core::primitive::bool, + pub is_frozen: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28891,210 +27202,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Reserved { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub who: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Registrar"; - const EVENT: &'static str = "Reserved"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Pending swap operations."] - pub fn pending_swap( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Registrar", - "PendingSwap", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, - 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, - 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, - 159u8, 171u8, 123u8, 149u8, 174u8, - ], - ) - } - #[doc = " Pending swap operations."] - pub fn pending_swap_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::Id, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Registrar", - "PendingSwap", - Vec::new(), - [ - 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, - 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, - 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, - 159u8, 171u8, 123u8, 149u8, 174u8, - ], - ) - } - #[doc = " Amount held on deposit for each para and the original depositor."] - #[doc = ""] - #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] - #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] - pub fn paras( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Registrar", - "Paras", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, - 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, - 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, - 220u8, 240u8, 218u8, 124u8, 56u8, - ], - ) - } - #[doc = " Amount held on deposit for each para and the original depositor."] - #[doc = ""] - #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] - #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] - pub fn paras_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Registrar", - "Paras", - Vec::new(), - [ - 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, - 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, - 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, - 220u8, 240u8, 218u8, 124u8, 56u8, - ], - ) - } - #[doc = " The next free `ParaId`."] - pub fn next_free_para_id( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_parachain::primitives::Id, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Registrar", - "NextFreeParaId", - vec![], - [ - 139u8, 76u8, 36u8, 150u8, 237u8, 36u8, 143u8, 242u8, 252u8, - 29u8, 236u8, 168u8, 97u8, 50u8, 175u8, 120u8, 83u8, 118u8, - 205u8, 64u8, 95u8, 65u8, 7u8, 230u8, 171u8, 86u8, 189u8, - 205u8, 231u8, 211u8, 97u8, 29u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The deposit to be paid to run a parathread."] - #[doc = " This should include the cost for storing the genesis head and validation code."] - pub fn para_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Registrar", - "ParaDeposit", - [ - 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 deposit to be paid per byte stored on chain."] - pub fn data_deposit_per_byte( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Registrar", - "DataDepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } + pub struct SetAttribute { + pub collection: ::core::primitive::u32, + pub maybe_item: ::core::option::Option<::core::primitive::u32>, + pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } - } - } - pub mod slots { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29104,12 +27221,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceLease { - pub para: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub period_begin: ::core::primitive::u32, - pub period_count: ::core::primitive::u32, + pub struct ClearAttribute { + pub collection: ::core::primitive::u32, + pub maybe_item: ::core::option::Option<::core::primitive::u32>, + pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29120,8 +27237,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAllLeases { - pub para: runtime_types::polkadot_parachain::primitives::Id, + pub struct SetMetadata { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29132,89 +27254,26 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TriggerOnboard { - pub para: runtime_types::polkadot_parachain::primitives::Id, + pub struct ClearMetadata { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Just a connect into the `lease_out` call, in case Root wants to force some lease to happen"] - #[doc = "independently of any other on-chain mechanism to use it."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - pub fn force_lease( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - period_begin: ::core::primitive::u32, - period_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Slots", - "force_lease", - ForceLease { - para, - leaser, - amount, - period_begin, - period_count, - }, - [ - 196u8, 2u8, 63u8, 229u8, 18u8, 134u8, 48u8, 4u8, 165u8, 46u8, - 173u8, 0u8, 189u8, 35u8, 99u8, 84u8, 103u8, 124u8, 233u8, - 246u8, 60u8, 172u8, 181u8, 205u8, 154u8, 164u8, 36u8, 178u8, - 60u8, 164u8, 166u8, 21u8, - ], - ) - } - #[doc = "Clear all leases for a Para Id, refunding any deposits back to the original owners."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - pub fn clear_all_leases( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Slots", - "clear_all_leases", - ClearAllLeases { para }, - [ - 16u8, 14u8, 185u8, 45u8, 149u8, 70u8, 177u8, 133u8, 130u8, - 173u8, 196u8, 244u8, 77u8, 63u8, 218u8, 64u8, 108u8, 83u8, - 84u8, 184u8, 175u8, 122u8, 36u8, 115u8, 146u8, 117u8, 132u8, - 82u8, 2u8, 144u8, 62u8, 179u8, - ], - ) - } - #[doc = "Try to onboard a parachain that has a lease for the current lease period."] - #[doc = ""] - #[doc = "This function can be useful if there was some state issue with a para that should"] - #[doc = "have onboarded, but was unable to. As long as they have a lease period, we can"] - #[doc = "let them onboard from here."] - #[doc = ""] - #[doc = "Origin must be signed, but can be called by anyone."] - pub fn trigger_onboard( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Slots", - "trigger_onboard", - TriggerOnboard { para }, - [ - 74u8, 158u8, 122u8, 37u8, 34u8, 62u8, 61u8, 218u8, 94u8, - 222u8, 1u8, 153u8, 131u8, 215u8, 157u8, 180u8, 98u8, 130u8, - 151u8, 179u8, 22u8, 120u8, 32u8, 207u8, 208u8, 46u8, 248u8, - 43u8, 154u8, 118u8, 106u8, 2u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCollectionMetadata { + pub collection: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_common::slots::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -29225,13 +27284,33 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new `[lease_period]` is beginning."] - pub struct NewLeasePeriod { - pub lease_period: ::core::primitive::u32, + pub struct ClearCollectionMetadata { + pub collection: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetAcceptOwnership { + pub maybe_collection: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::events::StaticEvent for NewLeasePeriod { - const PALLET: &'static str = "Slots"; - const EVENT: &'static str = "NewLeasePeriod"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCollectionMaxSupply { + pub collection: ::core::primitive::u32, + pub max_supply: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29242,169 +27321,980 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] - #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] - #[doc = "Second balance is the total amount reserved."] - pub struct Leased { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub period_begin: ::core::primitive::u32, - pub period_count: ::core::primitive::u32, - pub extra_reserved: ::core::primitive::u128, - pub total_amount: ::core::primitive::u128, + pub struct SetPrice { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::option::Option<::core::primitive::u128>, + pub whitelisted_buyer: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, } - impl ::subxt::events::StaticEvent for Leased { - const PALLET: &'static str = "Slots"; - const EVENT: &'static str = "Leased"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BuyItem { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub bid_price: ::core::primitive::u128, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Issue a new collection of non-fungible items from a public origin."] + #[doc = ""] + #[doc = "This new collection has no items initially and its owner is the origin."] #[doc = ""] - #[doc = " The actual amount locked on its behalf by any account at any time is the maximum of the second values"] - #[doc = " of the items in this list whose first value is the account."] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] #[doc = ""] - #[doc = " The first item in the list is the amount locked for the current Lease Period. Following"] - #[doc = " items are for the subsequent lease periods."] + #[doc = "`ItemDeposit` funds of sender are reserved."] #[doc = ""] - #[doc = " The default value (an empty list) implies that the parachain no longer exists (or never"] - #[doc = " existed) as far as this pallet is concerned."] + #[doc = "Parameters:"] + #[doc = "- `collection`: The identifier of the new collection. This must not be currently in use."] + #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] + #[doc = "member of the collection's admin team."] #[doc = ""] - #[doc = " If a parachain doesn't exist *yet* but is scheduled to exist in the future, then it"] - #[doc = " will be left-padded with one or more `None`s to denote the fact that nothing is held on"] - #[doc = " deposit for the non-existent chain currently, but is held at some point in the future."] + #[doc = "Emits `Created` event when successful."] #[doc = ""] - #[doc = " It is illegal for a `None` value to trail in the list."] - pub fn leases( + #[doc = "Weight: `O(1)`"] + pub fn create( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - ::core::option::Option<( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - )>, - >, + collection: ::core::primitive::u32, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Slots", - "Leases", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "create", + Create { collection, admin }, [ - 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, - 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, - 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, - 139u8, 11u8, 96u8, 147u8, + 250u8, 79u8, 237u8, 220u8, 143u8, 6u8, 150u8, 213u8, 251u8, + 95u8, 81u8, 65u8, 94u8, 176u8, 218u8, 190u8, 103u8, 116u8, + 61u8, 188u8, 31u8, 180u8, 109u8, 209u8, 140u8, 102u8, 247u8, + 41u8, 12u8, 21u8, 143u8, 162u8, ], ) } - #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] + #[doc = "Issue a new collection of non-fungible items from a privileged origin."] + #[doc = ""] + #[doc = "This new collection has no items initially."] #[doc = ""] - #[doc = " The actual amount locked on its behalf by any account at any time is the maximum of the second values"] - #[doc = " of the items in this list whose first value is the account."] + #[doc = "The origin must conform to `ForceOrigin`."] #[doc = ""] - #[doc = " The first item in the list is the amount locked for the current Lease Period. Following"] - #[doc = " items are for the subsequent lease periods."] + #[doc = "Unlike `create`, no funds are reserved."] #[doc = ""] - #[doc = " The default value (an empty list) implies that the parachain no longer exists (or never"] - #[doc = " existed) as far as this pallet is concerned."] + #[doc = "- `collection`: The identifier of the new item. This must not be currently in use."] + #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] + #[doc = " permissions"] + #[doc = "over this item, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] #[doc = ""] - #[doc = " If a parachain doesn't exist *yet* but is scheduled to exist in the future, then it"] - #[doc = " will be left-padded with one or more `None`s to denote the fact that nothing is held on"] - #[doc = " deposit for the non-existent chain currently, but is held at some point in the future."] + #[doc = "Emits `ForceCreated` event when successful."] #[doc = ""] - #[doc = " It is illegal for a `None` value to trail in the list."] - pub fn leases_root( + #[doc = "Weight: `O(1)`"] + pub fn force_create( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - ::core::option::Option<( - ::subxt::utils::AccountId32, - ::core::primitive::u128, - )>, - >, + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Slots", - "Leases", - Vec::new(), + free_holding: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "force_create", + ForceCreate { + collection, + owner, + free_holding, + }, [ - 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, - 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, - 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, - 139u8, 11u8, 96u8, 147u8, + 128u8, 35u8, 126u8, 101u8, 171u8, 131u8, 36u8, 84u8, 196u8, + 235u8, 243u8, 21u8, 43u8, 160u8, 101u8, 203u8, 58u8, 103u8, + 236u8, 159u8, 217u8, 124u8, 94u8, 135u8, 37u8, 42u8, 159u8, + 204u8, 163u8, 106u8, 86u8, 97u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The number of blocks over which a single period lasts."] - pub fn lease_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Slots", - "LeasePeriod", + #[doc = "Destroy a collection of fungible items."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] + #[doc = "owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to be destroyed."] + #[doc = "- `witness`: Information on the items minted in the collection. This must be"] + #[doc = "correct."] + #[doc = ""] + #[doc = "Emits `Destroyed` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(n + m)` where:"] + #[doc = "- `n = witness.items`"] + #[doc = "- `m = witness.item_metadatas`"] + #[doc = "- `a = witness.attributes`"] + pub fn destroy( + &self, + collection: ::core::primitive::u32, + witness: runtime_types::pallet_uniques::types::DestroyWitness, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "destroy", + Destroy { + collection, + witness, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 194u8, 219u8, 14u8, 11u8, 254u8, 25u8, 217u8, 157u8, 117u8, + 236u8, 144u8, 148u8, 151u8, 141u8, 40u8, 60u8, 243u8, 241u8, + 140u8, 184u8, 45u8, 153u8, 33u8, 177u8, 248u8, 79u8, 67u8, + 249u8, 47u8, 244u8, 198u8, 138u8, ], ) } - #[doc = " The number of blocks to offset each lease period by."] - pub fn lease_offset( + #[doc = "Mint an item of a particular collection."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be minted."] + #[doc = "- `item`: The item value of the item to be minted."] + #[doc = "- `beneficiary`: The initial owner of the minted item."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn mint( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Slots", - "LeaseOffset", + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "mint", + Mint { + collection, + item, + owner, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 55u8, 248u8, 214u8, 184u8, 144u8, 201u8, 35u8, 97u8, 81u8, + 129u8, 159u8, 219u8, 46u8, 107u8, 174u8, 115u8, 73u8, 198u8, + 140u8, 172u8, 254u8, 157u8, 182u8, 0u8, 71u8, 237u8, 226u8, + 202u8, 136u8, 65u8, 174u8, 246u8, + ], + ) + } + #[doc = "Destroy a single item."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be burned."] + #[doc = "- `item`: The item of the item to be burned."] + #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] + #[doc = " item is owned by this value."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: `check_owner.is_some()`."] + pub fn burn( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + check_owner: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "burn", + Burn { + collection, + item, + check_owner, + }, + [ + 215u8, 138u8, 65u8, 126u8, 201u8, 135u8, 73u8, 194u8, 2u8, + 196u8, 229u8, 103u8, 140u8, 74u8, 21u8, 144u8, 111u8, 99u8, + 200u8, 210u8, 191u8, 108u8, 220u8, 56u8, 64u8, 89u8, 216u8, + 181u8, 175u8, 57u8, 41u8, 173u8, + ], + ) + } + #[doc = "Move an item from the sender account to another."] + #[doc = ""] + #[doc = "This resets the approved account of the item."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item to be transferred."] + #[doc = "- `item`: The item of the item to be transferred."] + #[doc = "- `dest`: The account to receive ownership of the item."] + #[doc = ""] + #[doc = "Emits `Transferred`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "transfer", + Transfer { + collection, + item, + dest, + }, + [ + 223u8, 90u8, 63u8, 140u8, 84u8, 72u8, 67u8, 84u8, 225u8, + 84u8, 4u8, 197u8, 17u8, 53u8, 151u8, 209u8, 163u8, 114u8, + 253u8, 225u8, 44u8, 171u8, 240u8, 8u8, 112u8, 8u8, 20u8, + 25u8, 224u8, 131u8, 175u8, 40u8, + ], + ) + } + #[doc = "Reevaluate the deposits on some items."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be frozen."] + #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] + #[doc = ""] + #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] + #[doc = "in the case that the owner account does not have reservable funds to pay for a"] + #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] + #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] + #[doc = "so it's of little consequence."] + #[doc = ""] + #[doc = "It will still return an error in the case that the collection is unknown of the signer"] + #[doc = "is not permitted to call it."] + #[doc = ""] + #[doc = "Weight: `O(items.len())`"] + pub fn redeposit( + &self, + collection: ::core::primitive::u32, + items: ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "redeposit", + Redeposit { collection, items }, + [ + 81u8, 142u8, 143u8, 126u8, 12u8, 71u8, 139u8, 28u8, 170u8, + 219u8, 195u8, 22u8, 146u8, 69u8, 202u8, 7u8, 202u8, 113u8, + 93u8, 187u8, 113u8, 16u8, 8u8, 76u8, 3u8, 124u8, 248u8, 38u8, + 17u8, 232u8, 120u8, 145u8, + ], + ) + } + #[doc = "Disallow further unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be frozen."] + #[doc = "- `item`: The item of the item to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "freeze", + Freeze { collection, item }, + [ + 71u8, 169u8, 3u8, 86u8, 145u8, 29u8, 181u8, 125u8, 226u8, + 255u8, 19u8, 202u8, 166u8, 193u8, 183u8, 145u8, 184u8, 67u8, + 80u8, 51u8, 241u8, 132u8, 226u8, 206u8, 24u8, 249u8, 189u8, + 1u8, 2u8, 65u8, 53u8, 114u8, + ], + ) + } + #[doc = "Re-allow unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be thawed."] + #[doc = "- `item`: The item of the item to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "thaw", + Thaw { collection, item }, + [ + 17u8, 158u8, 130u8, 248u8, 75u8, 216u8, 110u8, 113u8, 113u8, + 243u8, 157u8, 40u8, 140u8, 41u8, 128u8, 255u8, 188u8, 7u8, + 135u8, 27u8, 251u8, 123u8, 192u8, 220u8, 149u8, 111u8, 215u8, + 26u8, 92u8, 188u8, 219u8, 90u8, + ], + ) + } + #[doc = "Disallow further unprivileged transfers for a whole collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be frozen."] + #[doc = ""] + #[doc = "Emits `CollectionFrozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze_collection( + &self, + collection: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "freeze_collection", + FreezeCollection { collection }, + [ + 17u8, 75u8, 230u8, 120u8, 48u8, 46u8, 9u8, 118u8, 130u8, + 136u8, 249u8, 123u8, 110u8, 105u8, 145u8, 232u8, 243u8, 80u8, + 149u8, 59u8, 233u8, 151u8, 24u8, 140u8, 40u8, 60u8, 250u8, + 54u8, 25u8, 168u8, 147u8, 194u8, + ], + ) + } + #[doc = "Re-allow unprivileged transfers for a whole collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be thawed."] + #[doc = ""] + #[doc = "Emits `CollectionThawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw_collection( + &self, + collection: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "thaw_collection", + ThawCollection { collection }, + [ + 134u8, 69u8, 120u8, 153u8, 244u8, 7u8, 197u8, 28u8, 169u8, + 128u8, 183u8, 72u8, 46u8, 41u8, 47u8, 173u8, 251u8, 33u8, + 195u8, 245u8, 74u8, 156u8, 165u8, 9u8, 164u8, 32u8, 144u8, + 158u8, 58u8, 202u8, 69u8, 213u8, + ], + ) + } + #[doc = "Change the Owner of a collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose owner should be changed."] + #[doc = "- `owner`: The new Owner of this collection. They must have called"] + #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_ownership( + &self, + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "transfer_ownership", + TransferOwnership { collection, owner }, + [ + 217u8, 228u8, 51u8, 96u8, 179u8, 215u8, 163u8, 137u8, 231u8, + 239u8, 181u8, 113u8, 48u8, 144u8, 91u8, 140u8, 50u8, 175u8, + 81u8, 251u8, 128u8, 208u8, 38u8, 246u8, 103u8, 219u8, 65u8, + 179u8, 153u8, 4u8, 154u8, 181u8, + ], + ) + } + #[doc = "Change the Issuer, Admin and Freezer of a collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose team should be changed."] + #[doc = "- `issuer`: The new Issuer of this collection."] + #[doc = "- `admin`: The new Admin of this collection."] + #[doc = "- `freezer`: The new Freezer of this collection."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_team( + &self, + collection: ::core::primitive::u32, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_team", + SetTeam { + collection, + issuer, + admin, + freezer, + }, + [ + 34u8, 168u8, 70u8, 30u8, 29u8, 186u8, 131u8, 181u8, 132u8, + 63u8, 163u8, 22u8, 244u8, 41u8, 205u8, 234u8, 17u8, 238u8, + 54u8, 64u8, 158u8, 136u8, 50u8, 40u8, 242u8, 117u8, 111u8, + 211u8, 168u8, 156u8, 156u8, 27u8, + ], + ) + } + #[doc = "Approve an item to be transferred by a delegated third-party account."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be"] + #[doc = "either the owner of the `item` or the admin of the collection."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] + #[doc = "- `item`: The item of the item to be approved for delegated transfer."] + #[doc = "- `delegate`: The account to delegate permission to transfer the item."] + #[doc = ""] + #[doc = "Important NOTE: The `approved` account gets reset after each transfer."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn approve_transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "approve_transfer", + ApproveTransfer { + collection, + item, + delegate, + }, + [ + 101u8, 171u8, 204u8, 251u8, 223u8, 253u8, 213u8, 182u8, + 128u8, 86u8, 244u8, 4u8, 19u8, 173u8, 197u8, 93u8, 80u8, + 13u8, 234u8, 229u8, 47u8, 60u8, 100u8, 77u8, 112u8, 138u8, + 74u8, 178u8, 95u8, 244u8, 12u8, 52u8, + ], + ) + } + #[doc = "Cancel the prior approval for the transfer of an item by a delegate."] + #[doc = ""] + #[doc = "Origin must be either:"] + #[doc = "- the `Force` origin;"] + #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] + #[doc = "- `Signed` with the signer being the Owner of the `item`;"] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] + #[doc = "- `item`: The item of the item of whose approval will be cancelled."] + #[doc = "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to"] + #[doc = " which permission of transfer is delegated."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn cancel_approval( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + maybe_check_delegate: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "cancel_approval", + CancelApproval { + collection, + item, + maybe_check_delegate, + }, + [ + 66u8, 69u8, 36u8, 135u8, 174u8, 24u8, 110u8, 166u8, 77u8, + 128u8, 3u8, 102u8, 186u8, 253u8, 130u8, 191u8, 2u8, 159u8, + 54u8, 217u8, 190u8, 45u8, 64u8, 54u8, 29u8, 196u8, 99u8, + 204u8, 74u8, 128u8, 143u8, 84u8, + ], + ) + } + #[doc = "Alter the attributes of a given item."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the item."] + #[doc = "- `owner`: The new Owner of this item."] + #[doc = "- `issuer`: The new Issuer of this item."] + #[doc = "- `admin`: The new Admin of this item."] + #[doc = "- `freezer`: The new Freezer of this item."] + #[doc = "- `free_holding`: Whether a deposit is taken for holding an item of this collection."] + #[doc = "- `is_frozen`: Whether this collection is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `ItemStatusChanged` with the identity of the item."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_item_status( + &self, + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + free_holding: ::core::primitive::bool, + is_frozen: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "force_item_status", + ForceItemStatus { + collection, + owner, + issuer, + admin, + freezer, + free_holding, + is_frozen, + }, + [ + 80u8, 205u8, 188u8, 92u8, 184u8, 129u8, 222u8, 36u8, 205u8, + 131u8, 248u8, 126u8, 56u8, 209u8, 7u8, 109u8, 105u8, 176u8, + 173u8, 65u8, 75u8, 130u8, 117u8, 50u8, 124u8, 27u8, 233u8, + 146u8, 5u8, 114u8, 226u8, 230u8, + ], + ) + } + #[doc = "Set an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] + #[doc = "- `key`: The key of the attribute."] + #[doc = "- `value`: The value to which to set the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_attribute( + &self, + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_attribute", + SetAttribute { + collection, + maybe_item, + key, + value, + }, + [ + 227u8, 229u8, 21u8, 73u8, 122u8, 15u8, 156u8, 240u8, 210u8, + 78u8, 83u8, 101u8, 42u8, 92u8, 160u8, 235u8, 225u8, 150u8, + 221u8, 160u8, 204u8, 221u8, 9u8, 175u8, 122u8, 145u8, 169u8, + 28u8, 71u8, 148u8, 188u8, 20u8, + ], + ) + } + #[doc = "Clear an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] + #[doc = "- `key`: The key of the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_attribute( + &self, + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "clear_attribute", + ClearAttribute { + collection, + maybe_item, + key, + }, + [ + 246u8, 34u8, 148u8, 125u8, 22u8, 119u8, 14u8, 109u8, 181u8, + 113u8, 246u8, 243u8, 83u8, 171u8, 77u8, 0u8, 162u8, 15u8, + 76u8, 250u8, 119u8, 186u8, 0u8, 176u8, 74u8, 207u8, 70u8, + 33u8, 218u8, 134u8, 239u8, 78u8, + ], + ) + } + #[doc = "Set the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `item`: The identifier of the item whose metadata to set."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_metadata( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_metadata", + SetMetadata { + collection, + item, + data, + is_frozen, + }, + [ + 182u8, 1u8, 20u8, 121u8, 184u8, 169u8, 101u8, 195u8, 60u8, + 196u8, 77u8, 79u8, 207u8, 175u8, 109u8, 136u8, 214u8, 201u8, + 99u8, 32u8, 89u8, 8u8, 181u8, 182u8, 226u8, 166u8, 146u8, + 224u8, 48u8, 231u8, 146u8, 123u8, + ], + ) + } + #[doc = "Clear the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`item`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `item`: The identifier of the item whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_metadata( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "clear_metadata", + ClearMetadata { collection, item }, + [ + 113u8, 75u8, 211u8, 250u8, 129u8, 61u8, 231u8, 204u8, 141u8, + 151u8, 65u8, 108u8, 230u8, 68u8, 51u8, 165u8, 126u8, 211u8, + 51u8, 33u8, 9u8, 47u8, 50u8, 71u8, 123u8, 71u8, 43u8, 162u8, + 76u8, 1u8, 90u8, 222u8, + ], + ) + } + #[doc = "Set the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the item whose metadata to update."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_collection_metadata( + &self, + collection: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_collection_metadata", + SetCollectionMetadata { + collection, + data, + is_frozen, + }, + [ + 98u8, 156u8, 235u8, 75u8, 88u8, 239u8, 86u8, 131u8, 2u8, + 226u8, 12u8, 122u8, 135u8, 145u8, 138u8, 220u8, 36u8, 120u8, + 21u8, 27u8, 222u8, 11u8, 99u8, 44u8, 250u8, 233u8, 219u8, + 65u8, 33u8, 152u8, 226u8, 51u8, + ], + ) + } + #[doc = "Clear the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_collection_metadata( + &self, + collection: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "clear_collection_metadata", + ClearCollectionMetadata { collection }, + [ + 218u8, 108u8, 43u8, 96u8, 85u8, 130u8, 198u8, 167u8, 28u8, + 4u8, 151u8, 185u8, 162u8, 123u8, 120u8, 42u8, 72u8, 37u8, + 250u8, 135u8, 100u8, 37u8, 193u8, 232u8, 62u8, 91u8, 18u8, + 120u8, 241u8, 47u8, 73u8, 209u8, + ], + ) + } + #[doc = "Set (or reset) the acceptance of ownership for a particular account."] + #[doc = ""] + #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] + #[doc = "provider reference."] + #[doc = ""] + #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] + #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] + #[doc = " ownership transferal."] + #[doc = ""] + #[doc = "Emits `OwnershipAcceptanceChanged`."] + pub fn set_accept_ownership( + &self, + maybe_collection: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_accept_ownership", + SetAcceptOwnership { maybe_collection }, + [ + 171u8, 174u8, 217u8, 70u8, 115u8, 1u8, 231u8, 149u8, 223u8, + 227u8, 6u8, 226u8, 190u8, 144u8, 101u8, 21u8, 147u8, 243u8, + 123u8, 228u8, 42u8, 27u8, 126u8, 58u8, 31u8, 233u8, 54u8, + 157u8, 193u8, 212u8, 114u8, 232u8, + ], + ) + } + #[doc = "Set the maximum amount of items a collection could have."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "Note: This function can only succeed once per collection."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to change."] + #[doc = "- `max_supply`: The maximum amount of items a collection could have."] + #[doc = ""] + #[doc = "Emits `CollectionMaxSupplySet` event when successful."] + pub fn set_collection_max_supply( + &self, + collection: ::core::primitive::u32, + max_supply: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_collection_max_supply", + SetCollectionMaxSupply { + collection, + max_supply, + }, + [ + 116u8, 134u8, 93u8, 228u8, 6u8, 198u8, 26u8, 168u8, 154u8, + 137u8, 0u8, 151u8, 1u8, 187u8, 36u8, 154u8, 62u8, 193u8, + 250u8, 83u8, 41u8, 135u8, 187u8, 4u8, 132u8, 234u8, 207u8, + 127u8, 153u8, 157u8, 76u8, 80u8, + ], + ) + } + #[doc = "Set (or reset) the price for an item."] + #[doc = ""] + #[doc = "Origin must be Signed and must be the owner of the asset `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item to set the price for."] + #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] + #[doc = "- `buyer`: Restricts the buy operation to a specific account."] + #[doc = ""] + #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] + #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] + pub fn set_price( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + price: ::core::option::Option<::core::primitive::u128>, + whitelisted_buyer: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "set_price", + SetPrice { + collection, + item, + price, + whitelisted_buyer, + }, + [ + 159u8, 178u8, 134u8, 144u8, 165u8, 80u8, 141u8, 253u8, 194u8, + 11u8, 8u8, 215u8, 7u8, 82u8, 138u8, 62u8, 81u8, 178u8, 75u8, + 84u8, 97u8, 175u8, 161u8, 97u8, 125u8, 175u8, 70u8, 247u8, + 209u8, 132u8, 48u8, 196u8, + ], + ) + } + #[doc = "Allows to buy an item if it's up for sale."] + #[doc = ""] + #[doc = "Origin must be Signed and must not be the owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item the sender wants to buy."] + #[doc = "- `bid_price`: The price the sender is willing to pay."] + #[doc = ""] + #[doc = "Emits `ItemBought` on success."] + pub fn buy_item( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + bid_price: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Uniques", + "buy_item", + BuyItem { + collection, + item, + bid_price, + }, + [ + 79u8, 39u8, 106u8, 21u8, 227u8, 244u8, 7u8, 107u8, 125u8, + 114u8, 24u8, 254u8, 208u8, 67u8, 31u8, 123u8, 134u8, 29u8, + 94u8, 243u8, 164u8, 137u8, 191u8, 71u8, 17u8, 170u8, 226u8, + 172u8, 233u8, 198u8, 226u8, 33u8, ], ) } } } - } - pub mod auctions { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_uniques::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29414,11 +28304,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NewAuction { - #[codec(compact)] - pub duration: ::core::primitive::u32, - #[codec(compact)] - pub lease_period_index: ::core::primitive::u32, + #[doc = "A `collection` was created."] + pub struct Created { + pub collection: ::core::primitive::u32, + pub creator: ::subxt::utils::AccountId32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Created"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29429,19 +28323,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid { - #[codec(compact)] - pub para: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub auction_index: ::core::primitive::u32, - #[codec(compact)] - pub first_slot: ::core::primitive::u32, - #[codec(compact)] - pub last_slot: ::core::primitive::u32, - #[codec(compact)] - pub amount: ::core::primitive::u128, + #[doc = "A `collection` was force-created."] + pub struct ForceCreated { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ForceCreated { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ForceCreated"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -29450,100 +28342,90 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAuction; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Create a new auction."] - #[doc = ""] - #[doc = "This can only happen when there isn't already an auction in progress and may only be"] - #[doc = "called by the root origin. Accepts the `duration` of this auction and the"] - #[doc = "`lease_period_index` of the initial lease period of the four that are to be auctioned."] - pub fn new_auction( - &self, - duration: ::core::primitive::u32, - lease_period_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Auctions", - "new_auction", - NewAuction { - duration, - lease_period_index, - }, - [ - 171u8, 40u8, 200u8, 164u8, 213u8, 10u8, 145u8, 164u8, 212u8, - 14u8, 117u8, 215u8, 248u8, 59u8, 34u8, 79u8, 50u8, 176u8, - 164u8, 143u8, 92u8, 82u8, 207u8, 37u8, 103u8, 252u8, 255u8, - 142u8, 239u8, 134u8, 114u8, 151u8, - ], - ) - } - #[doc = "Make a new bid from an account (including a parachain account) for deploying a new"] - #[doc = "parachain."] - #[doc = ""] - #[doc = "Multiple simultaneous bids from the same bidder are allowed only as long as all active"] - #[doc = "bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted."] - #[doc = ""] - #[doc = "- `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and"] - #[doc = "funded by) the same account."] - #[doc = "- `auction_index` is the index of the auction to bid on. Should just be the present"] - #[doc = "value of `AuctionCounter`."] - #[doc = "- `first_slot` is the first lease period index of the range to bid on. This is the"] - #[doc = "absolute lease period index value, not an auction-specific offset."] - #[doc = "- `last_slot` is the last lease period index of the range to bid on. This is the"] - #[doc = "absolute lease period index value, not an auction-specific offset."] - #[doc = "- `amount` is the amount to bid to be held as deposit for the parachain should the"] - #[doc = "bid win. This amount is held throughout the range."] - pub fn bid( - &self, - para: runtime_types::polkadot_parachain::primitives::Id, - auction_index: ::core::primitive::u32, - first_slot: ::core::primitive::u32, - last_slot: ::core::primitive::u32, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Auctions", - "bid", - Bid { - para, - auction_index, - first_slot, - last_slot, - amount, - }, - [ - 243u8, 233u8, 248u8, 221u8, 239u8, 59u8, 65u8, 63u8, 125u8, - 129u8, 202u8, 165u8, 30u8, 228u8, 32u8, 73u8, 225u8, 38u8, - 128u8, 98u8, 102u8, 46u8, 203u8, 32u8, 70u8, 74u8, 136u8, - 163u8, 83u8, 211u8, 227u8, 139u8, - ], - ) - } - #[doc = "Cancel an in-progress auction."] - #[doc = ""] - #[doc = "Can only be called by Root origin."] - pub fn cancel_auction( - &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Auctions", - "cancel_auction", - CancelAuction {}, - [ - 182u8, 223u8, 178u8, 136u8, 1u8, 115u8, 229u8, 78u8, 166u8, - 128u8, 28u8, 106u8, 6u8, 248u8, 46u8, 55u8, 110u8, 120u8, - 213u8, 11u8, 90u8, 217u8, 42u8, 120u8, 47u8, 83u8, 126u8, - 216u8, 236u8, 251u8, 255u8, 50u8, - ], - ) - } + #[doc = "A `collection` was destroyed."] + pub struct Destroyed { + pub collection: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An `item` was issued."] + pub struct Issued { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Issued"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An `item` was transferred."] + pub struct Transferred { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Transferred { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Transferred"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An `item` was destroyed."] + pub struct Burned { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Burned { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Burned"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some `item` was frozen."] + pub struct Frozen { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Frozen { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Frozen"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_common::auctions::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29553,16 +28435,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An auction started. Provides its index and the block number where it will begin to"] - #[doc = "close and the first lease period of the quadruplet that is auctioned."] - pub struct AuctionStarted { - pub auction_index: ::core::primitive::u32, - pub lease_period: ::core::primitive::u32, - pub ending: ::core::primitive::u32, + #[doc = "Some `item` was thawed."] + pub struct Thawed { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AuctionStarted { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "AuctionStarted"; + impl ::subxt::events::StaticEvent for Thawed { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Thawed"; } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -29574,15 +28454,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An auction ended. All funds become unreserved."] - pub struct AuctionClosed { - pub auction_index: ::core::primitive::u32, + #[doc = "Some `collection` was frozen."] + pub struct CollectionFrozen { + pub collection: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AuctionClosed { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "AuctionClosed"; + impl ::subxt::events::StaticEvent for CollectionFrozen { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "CollectionFrozen"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -29591,16 +28472,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] - #[doc = "Second is the total."] - pub struct Reserved { - pub bidder: ::subxt::utils::AccountId32, - pub extra_reserved: ::core::primitive::u128, - pub total_amount: ::core::primitive::u128, + #[doc = "Some `collection` was thawed."] + pub struct CollectionThawed { + pub collection: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Reserved { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "Reserved"; + impl ::subxt::events::StaticEvent for CollectionThawed { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "CollectionThawed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29611,14 +28489,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] - pub struct Unreserved { - pub bidder: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + #[doc = "The owner changed."] + pub struct OwnerChanged { + pub collection: ::core::primitive::u32, + pub new_owner: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Unreserved { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "Unreserved"; + impl ::subxt::events::StaticEvent for OwnerChanged { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "OwnerChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29629,16 +28507,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] - #[doc = "but no parachain slot has been leased."] - pub struct ReserveConfiscated { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub leaser: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + #[doc = "The management team changed."] + pub struct TeamChanged { + pub collection: ::core::primitive::u32, + pub issuer: ::subxt::utils::AccountId32, + pub admin: ::subxt::utils::AccountId32, + pub freezer: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for ReserveConfiscated { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "ReserveConfiscated"; + impl ::subxt::events::StaticEvent for TeamChanged { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "TeamChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29649,17 +28527,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new bid has been accepted as the current winner."] - pub struct BidAccepted { - pub bidder: ::subxt::utils::AccountId32, - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub amount: ::core::primitive::u128, - pub first_slot: ::core::primitive::u32, - pub last_slot: ::core::primitive::u32, + #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] + #[doc = "a `delegate`."] + pub struct ApprovedTransfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for BidAccepted { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "BidAccepted"; + impl ::subxt::events::StaticEvent for ApprovedTransfer { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ApprovedTransfer"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29670,335 +28548,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] - pub struct WinningOffset { - pub auction_index: ::core::primitive::u32, - pub block_number: ::core::primitive::u32, + #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] + #[doc = "`collection` was cancelled by its `owner`."] + pub struct ApprovalCancelled { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for WinningOffset { - const PALLET: &'static str = "Auctions"; - const EVENT: &'static str = "WinningOffset"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Number of auctions started so far."] - pub fn auction_counter( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "AuctionCounter", - vec![], - [ - 67u8, 247u8, 96u8, 152u8, 0u8, 224u8, 230u8, 98u8, 194u8, - 107u8, 3u8, 203u8, 51u8, 201u8, 149u8, 22u8, 184u8, 80u8, - 251u8, 239u8, 253u8, 19u8, 58u8, 192u8, 65u8, 96u8, 189u8, - 54u8, 175u8, 130u8, 143u8, 181u8, - ], - ) - } - #[doc = " Information relating to the current auction, if there is one."] - #[doc = ""] - #[doc = " The first item in the tuple is the lease period index that the first of the four"] - #[doc = " contiguous lease periods on auction is for. The second is the block number when the"] - #[doc = " auction will \"begin to end\", i.e. the first block of the Ending Period of the auction."] - pub fn auction_info( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "AuctionInfo", - vec![], - [ - 73u8, 216u8, 173u8, 230u8, 132u8, 78u8, 83u8, 62u8, 200u8, - 69u8, 17u8, 73u8, 57u8, 107u8, 160u8, 90u8, 147u8, 84u8, - 29u8, 110u8, 144u8, 215u8, 169u8, 110u8, 217u8, 77u8, 109u8, - 204u8, 1u8, 164u8, 95u8, 83u8, - ], - ) - } - #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] - #[doc = " (sub-)ranges."] - pub fn reserved_amounts( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "ReservedAmounts", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, - 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, - 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, - 166u8, 55u8, 233u8, 93u8, 62u8, - ], - ) - } - #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] - #[doc = " (sub-)ranges."] - pub fn reserved_amounts_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "ReservedAmounts", - Vec::new(), - [ - 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, - 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, - 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, - 166u8, 55u8, 233u8, 93u8, 62u8, - ], - ) - } - #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] - #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] - #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] - pub fn winning( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - [::core::option::Option<( - ::subxt::utils::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize], - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "Winning", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, - 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, - 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, - 30u8, 151u8, 147u8, 47u8, 205u8, - ], - ) - } - #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] - #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] - #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] - pub fn winning_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - [::core::option::Option<( - ::subxt::utils::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - )>; 36usize], - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Auctions", - "Winning", - Vec::new(), - [ - 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, - 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, - 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, - 30u8, 151u8, 147u8, 47u8, 205u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The number of blocks over which an auction may be retroactively ended."] - pub fn ending_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Auctions", - "EndingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of each sample to take during the ending period."] - #[doc = ""] - #[doc = " `EndingPeriod` / `SampleLength` = Total # of Samples"] - pub fn sample_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Auctions", - "SampleLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 slot_range_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Auctions", - "SlotRangeCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 lease_periods_per_slot( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Auctions", - "LeasePeriodsPerSlot", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 crowdloan { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: - ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Contribute { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub signature: - ::core::option::Option, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Withdraw { - pub who: ::subxt::utils::AccountId32, - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Refund { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, + impl ::subxt::events::StaticEvent for ApprovalCancelled { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ApprovalCancelled"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -30007,32 +28570,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Dissolve { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "A `collection` has had its attributes changed by the `Force` origin."] + pub struct ItemStatusChanged { + pub collection: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Edit { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - pub cap: ::core::primitive::u128, - #[codec(compact)] - pub first_period: ::core::primitive::u32, - #[codec(compact)] - pub last_period: ::core::primitive::u32, - #[codec(compact)] - pub end: ::core::primitive::u32, - pub verifier: - ::core::option::Option, + impl ::subxt::events::StaticEvent for ItemStatusChanged { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ItemStatusChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30043,23 +28587,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMemo { - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub memo: ::std::vec::Vec<::core::primitive::u8>, + #[doc = "New metadata has been set for a `collection`."] + pub struct CollectionMetadataSet { + pub collection: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Poke { - pub index: runtime_types::polkadot_parachain::primitives::Id, + impl ::subxt::events::StaticEvent for CollectionMetadataSet { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "CollectionMetadataSet"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -30068,245 +28609,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ContributeAll { - #[codec(compact)] - pub index: runtime_types::polkadot_parachain::primitives::Id, - pub signature: - ::core::option::Option, + #[doc = "Metadata has been cleared for a `collection`."] + pub struct CollectionMetadataCleared { + pub collection: ::core::primitive::u32, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Create a new crowdloaning campaign for a parachain slot with the given lease period range."] - #[doc = ""] - #[doc = "This applies a lock to your parachain configuration, ensuring that it cannot be changed"] - #[doc = "by the parachain manager."] - pub fn create( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - cap: ::core::primitive::u128, - first_period: ::core::primitive::u32, - last_period: ::core::primitive::u32, - end: ::core::primitive::u32, - verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "create", - Create { - index, - cap, - first_period, - last_period, - end, - verifier, - }, - [ - 78u8, 52u8, 156u8, 23u8, 104u8, 251u8, 20u8, 233u8, 42u8, - 231u8, 16u8, 192u8, 164u8, 68u8, 98u8, 129u8, 88u8, 126u8, - 123u8, 4u8, 210u8, 161u8, 190u8, 90u8, 67u8, 235u8, 74u8, - 184u8, 180u8, 197u8, 248u8, 238u8, - ], - ) - } - #[doc = "Contribute to a crowd sale. This will transfer some balance over to fund a parachain"] - #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] - pub fn contribute( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - value: ::core::primitive::u128, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "contribute", - Contribute { - index, - value, - signature, - }, - [ - 159u8, 180u8, 248u8, 203u8, 128u8, 231u8, 28u8, 84u8, 14u8, - 214u8, 69u8, 217u8, 62u8, 201u8, 169u8, 160u8, 45u8, 160u8, - 125u8, 255u8, 95u8, 140u8, 58u8, 3u8, 224u8, 157u8, 199u8, - 229u8, 72u8, 40u8, 218u8, 55u8, - ], - ) - } - #[doc = "Withdraw full balance of a specific contributor."] - #[doc = ""] - #[doc = "Origin must be signed, but can come from anyone."] - #[doc = ""] - #[doc = "The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement"] - #[doc = "flag must be set. For a fund to be ready for retirement, then:"] - #[doc = "- it must not already be in retirement;"] - #[doc = "- the amount of raised funds must be bigger than the _free_ balance of the account;"] - #[doc = "- and either:"] - #[doc = " - the block number must be at least `end`; or"] - #[doc = " - the current lease period must be greater than the fund's `last_period`."] - #[doc = ""] - #[doc = "In this case, the fund's retirement flag is set and its `end` is reset to the current block"] - #[doc = "number."] - #[doc = ""] - #[doc = "- `who`: The account whose contribution should be withdrawn."] - #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] - pub fn withdraw( - &self, - who: ::subxt::utils::AccountId32, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "withdraw", - Withdraw { who, index }, - [ - 147u8, 177u8, 116u8, 152u8, 9u8, 102u8, 4u8, 201u8, 204u8, - 145u8, 104u8, 226u8, 86u8, 211u8, 66u8, 109u8, 109u8, 139u8, - 229u8, 97u8, 215u8, 101u8, 255u8, 181u8, 121u8, 139u8, 165u8, - 169u8, 112u8, 173u8, 213u8, 121u8, - ], - ) - } - #[doc = "Automatically refund contributors of an ended crowdloan."] - #[doc = "Due to weight restrictions, this function may need to be called multiple"] - #[doc = "times to fully refund all users. We will refund `RemoveKeysLimit` users at a time."] - #[doc = ""] - #[doc = "Origin must be signed, but can come from anyone."] - pub fn refund( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "refund", - Refund { index }, - [ - 223u8, 64u8, 5u8, 135u8, 15u8, 234u8, 60u8, 114u8, 199u8, - 216u8, 73u8, 165u8, 198u8, 34u8, 140u8, 142u8, 214u8, 254u8, - 203u8, 163u8, 224u8, 120u8, 104u8, 54u8, 12u8, 126u8, 72u8, - 147u8, 20u8, 180u8, 251u8, 208u8, - ], - ) - } - #[doc = "Remove a fund after the retirement period has ended and all funds have been returned."] - pub fn dissolve( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "dissolve", - Dissolve { index }, - [ - 100u8, 67u8, 105u8, 3u8, 213u8, 149u8, 201u8, 146u8, 241u8, - 62u8, 31u8, 108u8, 58u8, 30u8, 241u8, 141u8, 134u8, 115u8, - 56u8, 131u8, 60u8, 75u8, 143u8, 227u8, 11u8, 32u8, 31u8, - 230u8, 165u8, 227u8, 170u8, 126u8, - ], - ) - } - #[doc = "Edit the configuration for an in-progress crowdloan."] - #[doc = ""] - #[doc = "Can only be called by Root origin."] - pub fn edit( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - cap: ::core::primitive::u128, - first_period: ::core::primitive::u32, - last_period: ::core::primitive::u32, - end: ::core::primitive::u32, - verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "edit", - Edit { - index, - cap, - first_period, - last_period, - end, - verifier, - }, - [ - 222u8, 124u8, 94u8, 221u8, 36u8, 183u8, 67u8, 114u8, 198u8, - 107u8, 154u8, 174u8, 142u8, 47u8, 3u8, 181u8, 72u8, 29u8, - 2u8, 83u8, 81u8, 47u8, 168u8, 142u8, 139u8, 63u8, 136u8, - 191u8, 41u8, 252u8, 221u8, 56u8, - ], - ) - } - #[doc = "Add an optional memo to an existing crowdloan contribution."] - #[doc = ""] - #[doc = "Origin must be Signed, and the user must have contributed to the crowdloan."] - pub fn add_memo( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "add_memo", - AddMemo { index, memo }, - [ - 104u8, 199u8, 143u8, 251u8, 28u8, 49u8, 144u8, 186u8, 83u8, - 108u8, 26u8, 127u8, 22u8, 141u8, 48u8, 62u8, 194u8, 193u8, - 97u8, 10u8, 84u8, 89u8, 236u8, 191u8, 40u8, 8u8, 1u8, 250u8, - 112u8, 165u8, 221u8, 112u8, - ], - ) - } - #[doc = "Poke the fund into `NewRaise`"] - #[doc = ""] - #[doc = "Origin must be Signed, and the fund has non-zero raise."] - pub fn poke( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "poke", - Poke { index }, - [ - 118u8, 60u8, 131u8, 17u8, 27u8, 153u8, 57u8, 24u8, 191u8, - 211u8, 101u8, 123u8, 34u8, 145u8, 193u8, 113u8, 244u8, 162u8, - 148u8, 143u8, 81u8, 86u8, 136u8, 23u8, 48u8, 185u8, 52u8, - 60u8, 216u8, 243u8, 63u8, 102u8, - ], - ) - } - #[doc = "Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain"] - #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] - pub fn contribute_all( - &self, - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "Crowdloan", - "contribute_all", - ContributeAll { index, signature }, - [ - 94u8, 61u8, 105u8, 107u8, 204u8, 18u8, 223u8, 242u8, 19u8, - 162u8, 205u8, 130u8, 203u8, 73u8, 42u8, 85u8, 208u8, 157u8, - 115u8, 112u8, 168u8, 10u8, 163u8, 80u8, 222u8, 71u8, 23u8, - 194u8, 142u8, 4u8, 82u8, 253u8, - ], - ) - } + impl ::subxt::events::StaticEvent for CollectionMetadataCleared { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "CollectionMetadataCleared"; } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -30316,13 +28626,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Create a new crowdloaning campaign."] - pub struct Created { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "New metadata has been set for an item."] + pub struct MetadataSet { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Created"; + impl ::subxt::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "MetadataSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30333,15 +28648,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contributed to a crowd sale."] - pub struct Contributed { - pub who: ::subxt::utils::AccountId32, - pub fund_index: runtime_types::polkadot_parachain::primitives::Id, - pub amount: ::core::primitive::u128, + #[doc = "Metadata has been cleared for an item."] + pub struct MetadataCleared { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Contributed { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Contributed"; + impl ::subxt::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "MetadataCleared"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30352,15 +28666,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Withdrew full balance of a contributor."] - pub struct Withdrew { - pub who: ::subxt::utils::AccountId32, - pub fund_index: runtime_types::polkadot_parachain::primitives::Id, - pub amount: ::core::primitive::u128, + #[doc = "Metadata has been cleared for an item."] + pub struct Redeposited { + pub collection: ::core::primitive::u32, + pub successful_items: ::std::vec::Vec<::core::primitive::u32>, } - impl ::subxt::events::StaticEvent for Withdrew { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Withdrew"; + impl ::subxt::events::StaticEvent for Redeposited { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "Redeposited"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30371,14 +28684,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] - #[doc = "over child keys that still need to be killed."] - pub struct PartiallyRefunded { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "New attribute metadata has been set for a `collection` or `item`."] + pub struct AttributeSet { + pub collection: ::core::primitive::u32, + pub maybe_item: ::core::option::Option<::core::primitive::u32>, + pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } - impl ::subxt::events::StaticEvent for PartiallyRefunded { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "PartiallyRefunded"; + impl ::subxt::events::StaticEvent for AttributeSet { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "AttributeSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30389,13 +28708,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "All loans in a fund have been refunded."] - pub struct AllRefunded { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] + pub struct AttributeCleared { + pub collection: ::core::primitive::u32, + pub maybe_item: ::core::option::Option<::core::primitive::u32>, + pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } - impl ::subxt::events::StaticEvent for AllRefunded { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "AllRefunded"; + impl ::subxt::events::StaticEvent for AttributeCleared { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "AttributeCleared"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30406,13 +28729,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Fund is dissolved."] - pub struct Dissolved { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "Ownership acceptance has changed for an account."] + pub struct OwnershipAcceptanceChanged { + pub who: ::subxt::utils::AccountId32, + pub maybe_collection: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::events::StaticEvent for Dissolved { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Dissolved"; + impl ::subxt::events::StaticEvent for OwnershipAcceptanceChanged { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "OwnershipAcceptanceChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30423,15 +28747,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The result of trying to submit a new bid to the Slots pallet."] - pub struct HandleBidResult { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "Max supply has been set for a collection."] + pub struct CollectionMaxSupplySet { + pub collection: ::core::primitive::u32, + pub max_supply: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for HandleBidResult { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "HandleBidResult"; + impl ::subxt::events::StaticEvent for CollectionMaxSupplySet { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "CollectionMaxSupplySet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30442,13 +28765,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The configuration to a crowdloan has been edited."] - pub struct Edited { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "The price was set for the instance."] + pub struct ItemPriceSet { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::primitive::u128, + pub whitelisted_buyer: + ::core::option::Option<::subxt::utils::AccountId32>, } - impl ::subxt::events::StaticEvent for Edited { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "Edited"; + impl ::subxt::events::StaticEvent for ItemPriceSet { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ItemPriceSet"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30459,15 +28786,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A memo has been updated."] - pub struct MemoUpdated { - pub who: ::subxt::utils::AccountId32, - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub memo: ::std::vec::Vec<::core::primitive::u8>, + #[doc = "The price for the instance was removed."] + pub struct ItemPriceRemoved { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for MemoUpdated { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "MemoUpdated"; + impl ::subxt::events::StaticEvent for ItemPriceRemoved { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ItemPriceRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30478,292 +28804,624 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A parachain has been moved to `NewRaise`"] - pub struct AddedToNewRaise { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, + #[doc = "An item was bought."] + pub struct ItemBought { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::primitive::u128, + pub seller: ::subxt::utils::AccountId32, + pub buyer: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for AddedToNewRaise { - const PALLET: &'static str = "Crowdloan"; - const EVENT: &'static str = "AddedToNewRaise"; + impl ::subxt::events::StaticEvent for ItemBought { + const PALLET: &'static str = "Uniques"; + const EVENT: &'static str = "ItemBought"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Info on all of the funds."] - pub fn funds( + #[doc = " Details of a collection."] + pub fn class( &self, - _0: impl ::std::borrow::Borrow< - runtime_types::polkadot_parachain::primitives::Id, - >, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + runtime_types::pallet_uniques::types::CollectionDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Crowdloan", - "Funds", + "Uniques", + "Class", vec![::subxt::storage::address::StorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, + ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, - 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, - 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, - 85u8, 179u8, 102u8, 53u8, 63u8, + 32u8, 21u8, 193u8, 165u8, 1u8, 239u8, 178u8, 63u8, 20u8, + 180u8, 240u8, 180u8, 62u8, 46u8, 37u8, 198u8, 10u8, 245u8, + 49u8, 64u8, 27u8, 217u8, 0u8, 251u8, 116u8, 50u8, 166u8, + 201u8, 108u8, 73u8, 233u8, 218u8, ], ) } - #[doc = " Info on all of the funds."] - pub fn funds_root( + #[doc = " Details of a collection."] + pub fn class_root( &self, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::polkadot_runtime_common::crowdloan::FundInfo< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + runtime_types::pallet_uniques::types::CollectionDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, (), (), ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Crowdloan", - "Funds", + "Uniques", + "Class", Vec::new(), [ - 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, - 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, - 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, - 85u8, 179u8, 102u8, 53u8, 63u8, + 32u8, 21u8, 193u8, 165u8, 1u8, 239u8, 178u8, 63u8, 20u8, + 180u8, 240u8, 180u8, 62u8, 46u8, 37u8, 198u8, 10u8, 245u8, + 49u8, 64u8, 27u8, 217u8, 0u8, 251u8, 116u8, 50u8, 166u8, + 201u8, 108u8, 73u8, 233u8, 218u8, ], ) } - #[doc = " The funds that have had additional contributions during the last block. This is used"] - #[doc = " in order to determine which funds should submit new or updated bids."] - pub fn new_raise( + #[doc = " The collection, if any, of which an account is willing to take ownership."] + pub fn ownership_acceptance( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - ::std::vec::Vec< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, + ::core::primitive::u32, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "OwnershipAcceptance", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, + 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, + 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, + 90u8, 51u8, 167u8, 189u8, 39u8, + ], + ) + } + #[doc = " The collection, if any, of which an account is willing to take ownership."] + pub fn ownership_acceptance_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, (), + (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Crowdloan", - "NewRaise", - vec![], + "Uniques", + "OwnershipAcceptance", + Vec::new(), [ - 8u8, 180u8, 9u8, 197u8, 254u8, 198u8, 89u8, 112u8, 29u8, - 153u8, 243u8, 196u8, 92u8, 204u8, 135u8, 232u8, 93u8, 239u8, - 147u8, 103u8, 130u8, 28u8, 128u8, 124u8, 4u8, 236u8, 29u8, - 248u8, 27u8, 165u8, 111u8, 147u8, + 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, + 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, + 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, + 90u8, 51u8, 167u8, 189u8, 39u8, ], ) } - #[doc = " The number of auctions that have entered into their ending period so far."] - pub fn endings_count( + #[doc = " The items held by any given account; set out this way so that items owned by a single"] + #[doc = " account can be enumerated."] + pub fn account( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + _2: 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 ("Uniques" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [83u8 , 188u8 , 8u8 , 123u8 , 84u8 , 224u8 , 52u8 , 18u8 , 81u8 , 207u8 , 139u8 , 149u8 , 209u8 , 246u8 , 211u8 , 132u8 , 63u8 , 86u8 , 145u8 , 33u8 , 4u8 , 252u8 , 90u8 , 88u8 , 89u8 , 145u8 , 147u8 , 164u8 , 223u8 , 162u8 , 119u8 , 161u8 ,]) + } + #[doc = " The items held by any given account; set out this way so that items owned by a single"] + #[doc = " account can be enumerated."] + pub fn account_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< (), + (), + (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Crowdloan", - "EndingsCount", - vec![], + "Uniques", + "Account", + Vec::new(), [ - 12u8, 159u8, 166u8, 75u8, 192u8, 33u8, 21u8, 244u8, 149u8, - 200u8, 49u8, 54u8, 191u8, 174u8, 202u8, 86u8, 76u8, 115u8, - 189u8, 35u8, 192u8, 175u8, 156u8, 188u8, 41u8, 23u8, 92u8, - 36u8, 141u8, 235u8, 248u8, 143u8, + 83u8, 188u8, 8u8, 123u8, 84u8, 224u8, 52u8, 18u8, 81u8, + 207u8, 139u8, 149u8, 209u8, 246u8, 211u8, 132u8, 63u8, 86u8, + 145u8, 33u8, 4u8, 252u8, 90u8, 88u8, 89u8, 145u8, 147u8, + 164u8, 223u8, 162u8, 119u8, 161u8, ], ) } - #[doc = " Tracker for the next available fund index"] - pub fn next_fund_index( + #[doc = " The collections owned by any given account; set out this way so that collections owned by"] + #[doc = " a single account can be enumerated."] + pub fn class_account( &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: 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 ("Uniques" , "ClassAccount" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [150u8 , 252u8 , 105u8 , 208u8 , 130u8 , 203u8 , 171u8 , 17u8 , 240u8 , 159u8 , 148u8 , 32u8 , 191u8 , 48u8 , 240u8 , 199u8 , 128u8 , 68u8 , 24u8 , 41u8 , 77u8 , 159u8 , 32u8 , 109u8 , 37u8 , 65u8 , 127u8 , 147u8 , 65u8 , 91u8 , 111u8 , 175u8 ,]) + } + #[doc = " The collections owned by any given account; set out this way so that collections owned by"] + #[doc = " a single account can be enumerated."] + pub fn class_account_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + (), (), + ::subxt::storage::address::Yes, > { ::subxt::storage::address::StaticStorageAddress::new( - "Crowdloan", - "NextFundIndex", - vec![], + "Uniques", + "ClassAccount", + Vec::new(), [ - 1u8, 215u8, 164u8, 194u8, 231u8, 34u8, 207u8, 19u8, 149u8, - 187u8, 3u8, 176u8, 194u8, 240u8, 180u8, 169u8, 214u8, 194u8, - 202u8, 240u8, 209u8, 6u8, 244u8, 46u8, 54u8, 142u8, 61u8, - 220u8, 240u8, 96u8, 10u8, 168u8, + 150u8, 252u8, 105u8, 208u8, 130u8, 203u8, 171u8, 17u8, 240u8, + 159u8, 148u8, 32u8, 191u8, 48u8, 240u8, 199u8, 128u8, 68u8, + 24u8, 41u8, 77u8, 159u8, 32u8, 109u8, 37u8, 65u8, 127u8, + 147u8, 65u8, 91u8, 111u8, 175u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b\"py/cfund\")`"] - pub fn pallet_id( + #[doc = " The items in existence and their ownership details."] + pub fn asset( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::frame_support::PalletId, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::ItemDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "Crowdloan", - "PalletId", + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "Asset" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [91u8 , 5u8 , 41u8 , 213u8 , 166u8 , 235u8 , 22u8 , 162u8 , 111u8 , 84u8 , 106u8 , 54u8 , 15u8 , 132u8 , 79u8 , 56u8 , 143u8 , 39u8 , 101u8 , 224u8 , 232u8 , 98u8 , 165u8 , 137u8 , 182u8 , 175u8 , 150u8 , 169u8 , 120u8 , 198u8 , 189u8 , 55u8 ,]) + } + #[doc = " The items in existence and their ownership details."] + pub fn asset_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::ItemDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "Asset", + Vec::new(), [ - 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, + 91u8, 5u8, 41u8, 213u8, 166u8, 235u8, 22u8, 162u8, 111u8, + 84u8, 106u8, 54u8, 15u8, 132u8, 79u8, 56u8, 143u8, 39u8, + 101u8, 224u8, 232u8, 98u8, 165u8, 137u8, 182u8, 175u8, 150u8, + 169u8, 120u8, 198u8, 189u8, 55u8, ], ) } - #[doc = " The minimum amount that may be contributed into a crowdloan. Should almost certainly be at"] - #[doc = " least `ExistentialDeposit`."] - pub fn min_contribution( + #[doc = " Metadata of a collection."] + pub fn class_metadata_of( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u128>, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::CollectionMetadata< + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "Crowdloan", - "MinContribution", + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "ClassMetadataOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], [ - 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, + 30u8, 185u8, 220u8, 71u8, 235u8, 255u8, 56u8, 170u8, 95u8, + 244u8, 64u8, 125u8, 173u8, 211u8, 208u8, 153u8, 179u8, 237u8, + 82u8, 45u8, 113u8, 6u8, 239u8, 245u8, 151u8, 224u8, 74u8, + 69u8, 47u8, 127u8, 163u8, 102u8, ], ) } - #[doc = " Max number of storage keys to remove per extrinsic call."] - pub fn remove_keys_limit( + #[doc = " Metadata of a collection."] + pub fn class_metadata_of_root( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::CollectionMetadata< + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, > { - ::subxt::constants::StaticConstantAddress::new( - "Crowdloan", - "RemoveKeysLimit", + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "ClassMetadataOf", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 30u8, 185u8, 220u8, 71u8, 235u8, 255u8, 56u8, 170u8, 95u8, + 244u8, 64u8, 125u8, 173u8, 211u8, 208u8, 153u8, 179u8, 237u8, + 82u8, 45u8, 113u8, 6u8, 239u8, 245u8, 151u8, 224u8, 74u8, + 69u8, 47u8, 127u8, 163u8, 102u8, ], ) } - } - } - } - pub mod xcm_pallet { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Send { - pub dest: ::std::boxed::Box, - pub message: ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TeleportAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: - ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveTransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: - ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub message: ::std::boxed::Box, - pub max_weight: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[doc = " Metadata of an item."] + pub fn instance_metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::ItemMetadata< + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "InstanceMetadataOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [53u8 , 239u8 , 109u8 , 42u8 , 253u8 , 16u8 , 125u8 , 128u8 , 52u8 , 166u8 , 174u8 , 60u8 , 17u8 , 144u8 , 226u8 , 83u8 , 199u8 , 35u8 , 195u8 , 77u8 , 57u8 , 13u8 , 128u8 , 49u8 , 47u8 , 115u8 , 239u8 , 33u8 , 33u8 , 127u8 , 154u8 , 247u8 ,]) + } + #[doc = " Metadata of an item."] + pub fn instance_metadata_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_uniques::types::ItemMetadata< + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "InstanceMetadataOf", + Vec::new(), + [ + 53u8, 239u8, 109u8, 42u8, 253u8, 16u8, 125u8, 128u8, 52u8, + 166u8, 174u8, 60u8, 17u8, 144u8, 226u8, 83u8, 199u8, 35u8, + 195u8, 77u8, 57u8, 13u8, 128u8, 49u8, 47u8, 115u8, 239u8, + 33u8, 33u8, 127u8, 154u8, 247u8, + ], + ) + } + #[doc = " Attributes of a collection."] + pub fn attribute( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + ::core::option::Option<::core::primitive::u32>, + >, + _2: impl ::std::borrow::Borrow< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "Attribute" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [101u8 , 37u8 , 8u8 , 243u8 , 33u8 , 252u8 , 251u8 , 102u8 , 206u8 , 223u8 , 64u8 , 117u8 , 252u8 , 22u8 , 122u8 , 201u8 , 99u8 , 126u8 , 64u8 , 208u8 , 136u8 , 97u8 , 244u8 , 139u8 , 17u8 , 112u8 , 67u8 , 70u8 , 148u8 , 164u8 , 167u8 , 188u8 ,]) + } + #[doc = " Attributes of a collection."] + pub fn attribute_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ::core::primitive::u128, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "Attribute", + Vec::new(), + [ + 101u8, 37u8, 8u8, 243u8, 33u8, 252u8, 251u8, 102u8, 206u8, + 223u8, 64u8, 117u8, 252u8, 22u8, 122u8, 201u8, 99u8, 126u8, + 64u8, 208u8, 136u8, 97u8, 244u8, 139u8, 17u8, 112u8, 67u8, + 70u8, 148u8, 164u8, 167u8, 188u8, + ], + ) + } + #[doc = " Price of an asset instance."] + pub fn item_price_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + ::core::primitive::u128, + ::core::option::Option<::subxt::utils::AccountId32>, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "ItemPriceOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [63u8 , 143u8 , 204u8 , 99u8 , 128u8 , 218u8 , 233u8 , 140u8 , 216u8 , 44u8 , 248u8 , 111u8 , 204u8 , 40u8 , 248u8 , 249u8 , 24u8 , 130u8 , 50u8 , 255u8 , 30u8 , 42u8 , 220u8 , 136u8 , 228u8 , 64u8 , 158u8 , 195u8 , 233u8 , 105u8 , 137u8 , 216u8 ,]) + } + #[doc = " Price of an asset instance."] + pub fn item_price_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + ::core::primitive::u128, + ::core::option::Option<::subxt::utils::AccountId32>, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "ItemPriceOf", + Vec::new(), + [ + 63u8, 143u8, 204u8, 99u8, 128u8, 218u8, 233u8, 140u8, 216u8, + 44u8, 248u8, 111u8, 204u8, 40u8, 248u8, 249u8, 24u8, 130u8, + 50u8, 255u8, 30u8, 42u8, 220u8, 136u8, 228u8, 64u8, 158u8, + 195u8, 233u8, 105u8, 137u8, 216u8, + ], + ) + } + #[doc = " Keeps track of the number of items a collection might have."] + pub fn collection_max_supply( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "CollectionMaxSupply", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 86u8, 134u8, 143u8, 101u8, 154u8, 17u8, 75u8, 144u8, 113u8, + 61u8, 172u8, 98u8, 72u8, 224u8, 127u8, 136u8, 27u8, 129u8, + 56u8, 236u8, 141u8, 59u8, 174u8, 48u8, 29u8, 214u8, 36u8, + 121u8, 25u8, 141u8, 122u8, 196u8, + ], + ) + } + #[doc = " Keeps track of the number of items a collection might have."] + pub fn collection_max_supply_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Uniques", + "CollectionMaxSupply", + Vec::new(), + [ + 86u8, 134u8, 143u8, 101u8, 154u8, 17u8, 75u8, 144u8, 113u8, + 61u8, 172u8, 98u8, 72u8, 224u8, 127u8, 136u8, 27u8, 129u8, + 56u8, 236u8, 141u8, 59u8, 174u8, 48u8, 29u8, 214u8, 36u8, + 121u8, 25u8, 141u8, 122u8, 196u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The basic amount of funds that must be reserved for collection."] + pub fn collection_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "CollectionDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved for an item."] + pub fn item_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "ItemDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved when adding metadata to your item."] + pub fn metadata_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "MetadataDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved when adding an attribute to an item."] + pub fn attribute_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "AttributeDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The additional funds that must be reserved for the number of bytes store in metadata,"] + #[doc = " either \"normal\" metadata or attribute metadata."] + pub fn deposit_per_byte( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "DepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum length of data stored on-chain."] + pub fn string_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "StringLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The maximum length of an attribute key."] + pub fn key_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "KeyLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of an attribute value."] + pub fn value_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Uniques", + "ValueLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 nfts { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceXcmVersion { - pub location: ::std::boxed::Box< - runtime_types::xcm::v1::multilocation::MultiLocation, + pub struct Create { + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, >, - pub xcm_version: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30774,8 +29432,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceDefaultXcmVersion { - pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + pub struct ForceCreate { + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30786,9 +29452,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSubscribeVersionNotify { - pub location: - ::std::boxed::Box, + pub struct Destroy { + pub collection: ::core::primitive::u32, + pub witness: runtime_types::pallet_nfts::types::DestroyWitness, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30799,9 +29465,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnsubscribeVersionNotify { - pub location: - ::std::boxed::Box, + pub struct Mint { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub mint_to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub witness_data: ::core::option::Option< + runtime_types::pallet_nfts::types::MintWitness< + ::core::primitive::u32, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30812,13 +29487,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedReserveTransferAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: - ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v2::WeightLimit, + pub struct ForceMint { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub mint_to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub item_config: runtime_types::pallet_nfts::types::ItemConfig, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -30829,336 +29505,33 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LimitedTeleportAssets { - pub dest: ::std::boxed::Box, - pub beneficiary: - ::std::boxed::Box, - pub assets: ::std::boxed::Box, - pub fee_asset_item: ::core::primitive::u32, - pub weight_limit: runtime_types::xcm::v2::WeightLimit, + pub struct Burn { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub check_owner: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, } - pub struct TransactionApi; - impl TransactionApi { - pub fn send( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - message: runtime_types::xcm::VersionedXcm, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "send", - Send { - dest: ::std::boxed::Box::new(dest), - message: ::std::boxed::Box::new(message), - }, - [ - 190u8, 88u8, 197u8, 248u8, 111u8, 198u8, 199u8, 206u8, 39u8, - 121u8, 23u8, 121u8, 93u8, 82u8, 22u8, 61u8, 96u8, 210u8, - 142u8, 249u8, 195u8, 78u8, 44u8, 8u8, 118u8, 120u8, 113u8, - 168u8, 99u8, 94u8, 232u8, 4u8, - ], - ) - } - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - pub fn teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "teleport_assets", - TeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 255u8, 5u8, 68u8, 38u8, 44u8, 181u8, 75u8, 221u8, 239u8, - 103u8, 88u8, 47u8, 136u8, 90u8, 253u8, 55u8, 0u8, 122u8, - 217u8, 126u8, 13u8, 77u8, 209u8, 41u8, 7u8, 35u8, 235u8, - 171u8, 150u8, 235u8, 202u8, 240u8, - ], - ) - } - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - pub fn reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "reserve_transfer_assets", - ReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - }, - [ - 177u8, 160u8, 188u8, 106u8, 153u8, 135u8, 121u8, 12u8, 83u8, - 233u8, 43u8, 161u8, 133u8, 26u8, 104u8, 79u8, 113u8, 8u8, - 33u8, 128u8, 82u8, 62u8, 30u8, 46u8, 203u8, 199u8, 175u8, - 193u8, 55u8, 130u8, 206u8, 28u8, - ], - ) - } - #[doc = "Execute an XCM message from a local, signed, origin."] - #[doc = ""] - #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] - #[doc = "partially."] - #[doc = ""] - #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] - #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] - #[doc = "attempt will be made."] - #[doc = ""] - #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] - #[doc = "to completion; only that *some* of it was executed."] - pub fn execute( - &self, - message: runtime_types::xcm::VersionedXcm, - max_weight: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "execute", - Execute { - message: ::std::boxed::Box::new(message), - max_weight, - }, - [ - 191u8, 177u8, 39u8, 21u8, 1u8, 110u8, 39u8, 58u8, 94u8, 27u8, - 44u8, 18u8, 253u8, 135u8, 100u8, 205u8, 0u8, 231u8, 68u8, - 247u8, 5u8, 140u8, 131u8, 184u8, 251u8, 197u8, 100u8, 113u8, - 253u8, 255u8, 120u8, 206u8, - ], - ) - } - #[doc = "Extoll that a particular destination can be communicated with through a particular"] - #[doc = "version of XCM."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The destination that is being described."] - #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] - pub fn force_xcm_version( - &self, - location: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm_version: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "force_xcm_version", - ForceXcmVersion { - location: ::std::boxed::Box::new(location), - xcm_version, - }, - [ - 231u8, 106u8, 60u8, 226u8, 31u8, 25u8, 20u8, 115u8, 107u8, - 246u8, 248u8, 11u8, 71u8, 183u8, 93u8, 3u8, 219u8, 21u8, - 97u8, 188u8, 119u8, 121u8, 239u8, 72u8, 200u8, 81u8, 6u8, - 177u8, 111u8, 188u8, 168u8, 86u8, - ], - ) - } - #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] - #[doc = "version a destination can accept is unknown)."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] - pub fn force_default_xcm_version( - &self, - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "force_default_xcm_version", - ForceDefaultXcmVersion { maybe_xcm_version }, - [ - 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, - 214u8, 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, - 157u8, 165u8, 18u8, 152u8, 81u8, 209u8, 255u8, 137u8, 237u8, - 28u8, 126u8, 224u8, 141u8, - ], - ) - } - #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] - pub fn force_subscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "force_subscribe_version_notify", - ForceSubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, - [ - 136u8, 216u8, 207u8, 51u8, 42u8, 153u8, 92u8, 70u8, 140u8, - 169u8, 172u8, 89u8, 69u8, 28u8, 200u8, 100u8, 209u8, 226u8, - 194u8, 240u8, 71u8, 38u8, 18u8, 6u8, 6u8, 83u8, 103u8, 254u8, - 248u8, 241u8, 62u8, 189u8, - ], - ) - } - #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] - #[doc = "version changes."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] - #[doc = " notifications which we no longer desire."] - pub fn force_unsubscribe_version_notify( - &self, - location: runtime_types::xcm::VersionedMultiLocation, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "force_unsubscribe_version_notify", - ForceUnsubscribeVersionNotify { - location: ::std::boxed::Box::new(location), - }, - [ - 51u8, 72u8, 5u8, 227u8, 251u8, 243u8, 199u8, 9u8, 8u8, 213u8, - 191u8, 52u8, 21u8, 215u8, 170u8, 6u8, 53u8, 242u8, 225u8, - 89u8, 150u8, 142u8, 104u8, 249u8, 225u8, 209u8, 142u8, 234u8, - 161u8, 100u8, 153u8, 120u8, - ], - ) - } - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - pub fn limited_reserve_transfer_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::tx::StaticTxPayload - { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "limited_reserve_transfer_assets", - LimitedReserveTransferAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 191u8, 81u8, 68u8, 116u8, 196u8, 125u8, 226u8, 154u8, 144u8, - 126u8, 159u8, 149u8, 17u8, 124u8, 205u8, 60u8, 249u8, 106u8, - 38u8, 251u8, 136u8, 128u8, 81u8, 201u8, 164u8, 242u8, 216u8, - 80u8, 21u8, 234u8, 20u8, 70u8, - ], - ) - } - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - pub fn limited_teleport_assets( - &self, - dest: runtime_types::xcm::VersionedMultiLocation, - beneficiary: runtime_types::xcm::VersionedMultiLocation, - assets: runtime_types::xcm::VersionedMultiAssets, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( - "XcmPallet", - "limited_teleport_assets", - LimitedTeleportAssets { - dest: ::std::boxed::Box::new(dest), - beneficiary: ::std::boxed::Box::new(beneficiary), - assets: ::std::boxed::Box::new(assets), - fee_asset_item, - weight_limit, - }, - [ - 29u8, 31u8, 229u8, 83u8, 40u8, 60u8, 36u8, 185u8, 169u8, - 74u8, 30u8, 47u8, 118u8, 118u8, 22u8, 15u8, 246u8, 220u8, - 169u8, 135u8, 72u8, 154u8, 109u8, 192u8, 195u8, 58u8, 121u8, - 240u8, 166u8, 243u8, 29u8, 29u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::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_xcm::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -31168,13 +29541,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Execution of an XCM message was attempted."] - #[doc = ""] - #[doc = "\\[ outcome \\]"] - pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); - impl ::subxt::events::StaticEvent for Attempted { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Attempted"; + pub struct Redeposit { + pub collection: ::core::primitive::u32, + pub items: ::std::vec::Vec<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31185,17 +29554,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A XCM message was sent."] - #[doc = ""] - #[doc = "\\[ origin, destination, message \\]"] - pub struct Sent( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::v2::Xcm, - ); - impl ::subxt::events::StaticEvent for Sent { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Sent"; + pub struct LockItemTransfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31206,18 +29567,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response received which does not match a registered query. This may be because a"] - #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] - #[doc = "because the query timed out."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - pub struct UnexpectedResponse( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for UnexpectedResponse { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "UnexpectedResponse"; + pub struct UnlockItemTransfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31228,17 +29580,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] - #[doc = "no registered notification call."] - #[doc = ""] - #[doc = "\\[ id, response \\]"] - pub struct ResponseReady( - pub ::core::primitive::u64, - pub runtime_types::xcm::v2::Response, - ); - impl ::subxt::events::StaticEvent for ResponseReady { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseReady"; + pub struct LockCollection { + pub collection: ::core::primitive::u32, + pub lock_settings: runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::CollectionSetting, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31249,18 +29595,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response has been received and query is removed. The registered notification has"] - #[doc = "been dispatched and executed successfully."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct Notified( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for Notified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "Notified"; + pub struct TransferOwnership { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31271,21 +29611,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response has been received and query is removed. The registered notification could"] - #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] - #[doc = "originally budgeted by this runtime for the query result."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] - pub struct NotifyOverweight( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - pub runtime_types::sp_weights::weight_v2::Weight, - pub runtime_types::sp_weights::weight_v2::Weight, - ); - impl ::subxt::events::StaticEvent for NotifyOverweight { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyOverweight"; + pub struct SetTeam { + pub collection: ::core::primitive::u32, + pub issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31296,18 +29635,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response has been received and query is removed. There was a general error with"] - #[doc = "dispatching the notification call."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct NotifyDispatchError( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for NotifyDispatchError { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDispatchError"; + pub struct ForceCollectionOwner { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31318,19 +29651,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] - #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] - #[doc = "is not `(origin, QueryId, Response)`."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - pub struct NotifyDecodeFailed( - pub ::core::primitive::u64, - pub ::core::primitive::u8, - pub ::core::primitive::u8, - ); - impl ::subxt::events::StaticEvent for NotifyDecodeFailed { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyDecodeFailed"; + pub struct ForceCollectionConfig { + pub collection: ::core::primitive::u32, + pub config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31341,21 +29668,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Expected query response has been received but the origin location of the response does"] - #[doc = "not match that expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected location \\]"] - pub struct InvalidResponder( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub ::core::option::Option< - runtime_types::xcm::v1::multilocation::MultiLocation, + pub struct ApproveTransfer { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - ); - impl ::subxt::events::StaticEvent for InvalidResponder { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponder"; + pub maybe_deadline: ::core::option::Option<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31366,25 +29686,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Expected query response has been received but the expected origin location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - pub struct InvalidResponderVersion( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for InvalidResponderVersion { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "InvalidResponderVersion"; + pub struct CancelApproval { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31393,13 +29703,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Received query response has been read and removed."] - #[doc = ""] - #[doc = "\\[ id \\]"] - pub struct ResponseTaken(pub ::core::primitive::u64); - impl ::subxt::events::StaticEvent for ResponseTaken { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "ResponseTaken"; + pub struct ClearAllTransferApprovals { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31410,17 +29716,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some assets have been placed in an asset trap."] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - pub struct AssetsTrapped( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - impl ::subxt::events::StaticEvent for AssetsTrapped { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "AssetsTrapped"; + pub struct LockItemProperties { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub lock_metadata: ::core::primitive::bool, + pub lock_attributes: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31431,16 +29731,43 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An XCM version change notification message has been attempted to be sent."] - #[doc = ""] - #[doc = "\\[ destination, result \\]"] - pub struct VersionChangeNotified( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for VersionChangeNotified { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "VersionChangeNotified"; + pub struct SetAttribute { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSetAttribute { pub set_as : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearAttribute { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ApproveItemAttributes { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31451,17 +29778,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The supported version of a location has been changed. This might be through an"] - #[doc = "automatic notification or a manual intervention."] - #[doc = ""] - #[doc = "\\[ location, XCM version \\]"] - pub struct SupportedVersionChanged( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u32, - ); - impl ::subxt::events::StaticEvent for SupportedVersionChanged { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "SupportedVersionChanged"; + pub struct CancelItemAttributesApproval { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub witness: + runtime_types::pallet_nfts::types::CancelAttributesApprovalWitness, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31472,18 +29797,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "sending the notification to it."] - #[doc = ""] - #[doc = "\\[ location, query ID, error \\]"] - pub struct NotifyTargetSendFail( - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub ::core::primitive::u64, - pub runtime_types::xcm::v2::traits::Error, - ); - impl ::subxt::events::StaticEvent for NotifyTargetSendFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetSendFail"; + pub struct SetMetadata { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31494,17 +29813,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "migrating the location to our new XCM format."] - #[doc = ""] - #[doc = "\\[ location, query ID \\]"] - pub struct NotifyTargetMigrationFail( - pub runtime_types::xcm::VersionedMultiLocation, - pub ::core::primitive::u64, - ); - impl ::subxt::events::StaticEvent for NotifyTargetMigrationFail { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "NotifyTargetMigrationFail"; + pub struct ClearMetadata { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31515,342 +29826,87 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some assets have been claimed from an asset trap"] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - pub struct AssetsClaimed( - pub ::subxt::utils::H256, - pub runtime_types::xcm::v1::multilocation::MultiLocation, - pub runtime_types::xcm::VersionedMultiAssets, - ); - impl ::subxt::events::StaticEvent for AssetsClaimed { - const PALLET: &'static str = "XcmPallet"; - const EVENT: &'static str = "AssetsClaimed"; + pub struct SetCollectionMetadata { + pub collection: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The latest available query index."] - pub fn query_counter( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "QueryCounter", - vec![], - [ - 137u8, 58u8, 184u8, 88u8, 247u8, 22u8, 151u8, 64u8, 50u8, - 77u8, 49u8, 10u8, 234u8, 84u8, 213u8, 156u8, 26u8, 200u8, - 214u8, 225u8, 125u8, 231u8, 42u8, 93u8, 159u8, 168u8, 86u8, - 201u8, 116u8, 153u8, 41u8, 127u8, - ], - ) - } - #[doc = " The ongoing queries."] - pub fn queries( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u64>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "Queries", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, - 231u8, 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, - 59u8, 44u8, 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, - 29u8, 71u8, 49u8, 248u8, 48u8, - ], - ) - } - #[doc = " The ongoing queries."] - pub fn queries_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_xcm::pallet::QueryStatus< - ::core::primitive::u32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "Queries", - Vec::new(), - [ - 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, - 231u8, 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, - 59u8, 44u8, 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, - 29u8, 71u8, 49u8, 248u8, 48u8, - ], - ) - } - #[doc = " The existing asset traps."] - #[doc = ""] - #[doc = " Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of"] - #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] - pub fn asset_traps( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "AssetTraps", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, - 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, - 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, - 147u8, 44u8, 19u8, 239u8, - ], - ) - } - #[doc = " The existing asset traps."] - #[doc = ""] - #[doc = " Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of"] - #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] - pub fn asset_traps_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "AssetTraps", - Vec::new(), - [ - 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, - 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, - 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, - 147u8, 44u8, 19u8, 239u8, - ], - ) - } - #[doc = " Default version to encode XCM when latest version of destination is unknown. If `None`,"] - #[doc = " then the destinations whose XCM version is unknown are considered unreachable."] - pub fn safe_xcm_version( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "SafeXcmVersion", - vec![], - [ - 1u8, 223u8, 218u8, 204u8, 222u8, 129u8, 137u8, 237u8, 197u8, - 142u8, 233u8, 66u8, 229u8, 153u8, 138u8, 222u8, 113u8, 164u8, - 135u8, 213u8, 233u8, 34u8, 24u8, 23u8, 215u8, 59u8, 40u8, - 188u8, 45u8, 244u8, 205u8, 199u8, - ], - ) - } - #[doc = " The Latest versions that we know various locations support."] - pub fn supported_version( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "SupportedVersion" , 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)] , [112u8 , 34u8 , 251u8 , 179u8 , 217u8 , 54u8 , 125u8 , 242u8 , 190u8 , 8u8 , 44u8 , 14u8 , 138u8 , 76u8 , 241u8 , 95u8 , 233u8 , 96u8 , 141u8 , 26u8 , 151u8 , 196u8 , 219u8 , 137u8 , 165u8 , 27u8 , 87u8 , 128u8 , 19u8 , 35u8 , 222u8 , 202u8 ,]) - } - #[doc = " The Latest versions that we know various locations support."] - pub fn supported_version_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "SupportedVersion", - Vec::new(), - [ - 112u8, 34u8, 251u8, 179u8, 217u8, 54u8, 125u8, 242u8, 190u8, - 8u8, 44u8, 14u8, 138u8, 76u8, 241u8, 95u8, 233u8, 96u8, - 141u8, 26u8, 151u8, 196u8, 219u8, 137u8, 165u8, 27u8, 87u8, - 128u8, 19u8, 35u8, 222u8, 202u8, - ], - ) - } - #[doc = " All locations that we have requested version notifications from."] - pub fn version_notifiers( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "VersionNotifiers" , 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)] , [233u8 , 217u8 , 119u8 , 102u8 , 41u8 , 77u8 , 198u8 , 24u8 , 161u8 , 22u8 , 104u8 , 149u8 , 204u8 , 128u8 , 123u8 , 166u8 , 17u8 , 36u8 , 202u8 , 92u8 , 190u8 , 44u8 , 73u8 , 239u8 , 88u8 , 17u8 , 92u8 , 41u8 , 236u8 , 80u8 , 154u8 , 10u8 ,]) - } - #[doc = " All locations that we have requested version notifications from."] - pub fn version_notifiers_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<::core::primitive::u64>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "VersionNotifiers", - Vec::new(), - [ - 233u8, 217u8, 119u8, 102u8, 41u8, 77u8, 198u8, 24u8, 161u8, - 22u8, 104u8, 149u8, 204u8, 128u8, 123u8, 166u8, 17u8, 36u8, - 202u8, 92u8, 190u8, 44u8, 73u8, 239u8, 88u8, 17u8, 92u8, - 41u8, 236u8, 80u8, 154u8, 10u8, - ], - ) - } - #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] - #[doc = " of our versions we informed them of."] - pub fn version_notify_targets( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u64, - ::core::primitive::u64, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("XcmPallet" , "VersionNotifyTargets" , 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)] , [108u8 , 104u8 , 137u8 , 191u8 , 2u8 , 2u8 , 240u8 , 174u8 , 32u8 , 174u8 , 150u8 , 136u8 , 33u8 , 84u8 , 30u8 , 74u8 , 95u8 , 94u8 , 20u8 , 112u8 , 101u8 , 204u8 , 15u8 , 47u8 , 136u8 , 56u8 , 40u8 , 66u8 , 1u8 , 42u8 , 16u8 , 247u8 ,]) - } - #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] - #[doc = " of our versions we informed them of."] - pub fn version_notify_targets_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType<( - ::core::primitive::u64, - ::core::primitive::u64, + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClearCollectionMetadata { + pub collection: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetAcceptOwnership { + pub maybe_collection: ::core::option::Option<::core::primitive::u32>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetCollectionMaxSupply { + pub collection: ::core::primitive::u32, + pub max_supply: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdateMintSettings { + pub collection: ::core::primitive::u32, + pub mint_settings: runtime_types::pallet_nfts::types::MintSettings< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPrice { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::option::Option<::core::primitive::u128>, + pub whitelisted_buyer: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, ::core::primitive::u32, - )>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "VersionNotifyTargets", - Vec::new(), - [ - 108u8, 104u8, 137u8, 191u8, 2u8, 2u8, 240u8, 174u8, 32u8, - 174u8, 150u8, 136u8, 33u8, 84u8, 30u8, 74u8, 95u8, 94u8, - 20u8, 112u8, 101u8, 204u8, 15u8, 47u8, 136u8, 56u8, 40u8, - 66u8, 1u8, 42u8, 16u8, 247u8, - ], - ) - } - #[doc = " Destinations whose latest XCM version we would like to know. Duplicates not allowed, and"] - #[doc = " the `u32` counter is the number of times that a send to the destination has been attempted,"] - #[doc = " which is used as a prioritization."] - pub fn version_discovery_queue( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u32, - )>, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "VersionDiscoveryQueue", - vec![], - [ - 30u8, 163u8, 210u8, 133u8, 30u8, 63u8, 36u8, 9u8, 162u8, - 133u8, 99u8, 170u8, 34u8, 205u8, 27u8, 41u8, 226u8, 141u8, - 165u8, 151u8, 46u8, 140u8, 150u8, 242u8, 178u8, 88u8, 164u8, - 12u8, 129u8, 118u8, 25u8, 79u8, - ], - ) - } - #[doc = " The current migration's stage, if any."] - pub fn current_migration( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::metadata::DecodeStaticType< - runtime_types::pallet_xcm::pallet::VersionMigrationStage, >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "XcmPallet", - "CurrentMigration", - vec![], - [ - 137u8, 144u8, 168u8, 185u8, 158u8, 90u8, 127u8, 243u8, 227u8, - 134u8, 150u8, 73u8, 15u8, 99u8, 23u8, 47u8, 68u8, 18u8, 39u8, - 16u8, 24u8, 43u8, 161u8, 56u8, 66u8, 111u8, 16u8, 7u8, 252u8, - 125u8, 100u8, 225u8, - ], - ) - } + >, } - } - } - pub mod runtime_types { - use super::runtime_types; - pub mod finality_grandpa { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -31860,11 +29916,10 @@ pub mod api { )] #[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), + pub struct BuyItem { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub bid_price: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31875,9 +29930,15 @@ pub mod api { )] #[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, + pub struct PayTips { + pub tips: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_nfts::types::ItemTip< + ::core::primitive::u32, + ::core::primitive::u32, + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31888,162 +29949,30 @@ pub mod api { )] #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, - } + pub struct CreateSwap { + pub offered_collection: ::core::primitive::u32, + pub offered_item: ::core::primitive::u32, + pub desired_collection: ::core::primitive::u32, + pub maybe_desired_item: ::core::option::Option<::core::primitive::u32>, + pub maybe_price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + pub duration: ::core::primitive::u32, } - 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelSwap { + pub offered_collection: ::core::primitive::u32, + pub offered_item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32054,817 +29983,1393 @@ pub mod api { )] #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckWeight; - } + pub struct ClaimSwap { + pub send_collection: ::core::primitive::u32, + pub send_item: ::core::primitive::u32, + pub receive_collection: ::core::primitive::u32, + pub receive_item: ::core::primitive::u32, + pub witness_price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, } - 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, - Debug, - )] - #[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< + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Issue a new collection of non-fungible items from a public origin."] + #[doc = ""] + #[doc = "This new collection has no items initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must have sufficient funds free."] + #[doc = ""] + #[doc = "`ItemDeposit` funds of sender are reserved."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] + #[doc = "member of the collection's admin team."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn create( + &self, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, ::core::primitive::u32, >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "create", + Create { admin, config }, + [ + 39u8, 4u8, 38u8, 44u8, 147u8, 41u8, 137u8, 135u8, 131u8, + 186u8, 47u8, 61u8, 129u8, 151u8, 187u8, 234u8, 92u8, 11u8, + 75u8, 150u8, 166u8, 187u8, 114u8, 41u8, 74u8, 33u8, 200u8, + 13u8, 104u8, 73u8, 35u8, 58u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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< - runtime_types::sp_weights::weight_v2::Weight, - >, - pub max_total: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, + #[doc = "Issue a new collection of non-fungible items from a privileged origin."] + #[doc = ""] + #[doc = "This new collection has no items initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] + #[doc = " permissions over this item, but may later change and configure the permissions using"] + #[doc = " `transfer_ownership` and `set_team`."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_create( + &self, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - pub reserved: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, + config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "force_create", + ForceCreate { owner, config }, + [ + 90u8, 0u8, 154u8, 141u8, 23u8, 101u8, 243u8, 20u8, 255u8, + 61u8, 114u8, 183u8, 127u8, 92u8, 131u8, 14u8, 179u8, 96u8, + 133u8, 180u8, 69u8, 67u8, 133u8, 205u8, 167u8, 207u8, 173u8, + 56u8, 185u8, 241u8, 129u8, 74u8, + ], + ) } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 1)] - #[doc = "Make some on-chain remark."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`"] - #[doc = "# "] - remark { - remark: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 2)] - #[doc = "Set the number of pages in the WebAssembly environment's heap."] - set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 3)] - #[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 = 4)] - #[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 = 5)] - #[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 = 6)] - #[doc = "Kill some items from storage."] - kill_storage { - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - }, - #[codec(index = 7)] - #[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 = 8)] - #[doc = "Make some on-chain remark and emit event."] - remark_with_event { - remark: ::std::vec::Vec<::core::primitive::u8>, - }, + #[doc = "Destroy a collection of fungible items."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] + #[doc = "owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to be destroyed."] + #[doc = "- `witness`: Information on the items minted in the collection. This must be"] + #[doc = "correct."] + #[doc = ""] + #[doc = "Emits `Destroyed` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(n + m)` where:"] + #[doc = "- `n = witness.items`"] + #[doc = "- `m = witness.item_metadatas`"] + #[doc = "- `a = witness.attributes`"] + pub fn destroy( + &self, + collection: ::core::primitive::u32, + witness: runtime_types::pallet_nfts::types::DestroyWitness, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "destroy", + Destroy { + collection, + witness, + }, + [ + 194u8, 219u8, 14u8, 11u8, 254u8, 25u8, 217u8, 157u8, 117u8, + 236u8, 144u8, 148u8, 151u8, 141u8, 40u8, 60u8, 243u8, 241u8, + 140u8, 184u8, 45u8, 153u8, 33u8, 177u8, 248u8, 79u8, 67u8, + 249u8, 47u8, 244u8, 198u8, 138u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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, + #[doc = "Mint an item of a particular collection."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be minted."] + #[doc = "- `item`: An identifier of the new item."] + #[doc = "- `mint_to`: Account into which the item will be minted."] + #[doc = "- `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned"] + #[doc = " item_id from that collection needs to be provided within the witness data object."] + #[doc = ""] + #[doc = "Note: the deposit will be taken from the `origin` and not the `owner` of the `item`."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn mint( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + mint_to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + witness_data: ::core::option::Option< + runtime_types::pallet_nfts::types::MintWitness< + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "mint", + Mint { + collection, + item, + mint_to, + witness_data, + }, + [ + 242u8, 13u8, 249u8, 201u8, 133u8, 131u8, 113u8, 75u8, 214u8, + 186u8, 242u8, 24u8, 48u8, 50u8, 241u8, 168u8, 60u8, 18u8, + 132u8, 151u8, 84u8, 243u8, 93u8, 128u8, 215u8, 66u8, 14u8, + 218u8, 138u8, 88u8, 185u8, 56u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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, - }, + #[doc = "Mint an item of a particular collection from a privileged origin."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] + #[doc = "Issuer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be minted."] + #[doc = "- `item`: An identifier of the new item."] + #[doc = "- `mint_to`: Account into which the item will be minted."] + #[doc = "- `item_config`: A config of the new item."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_mint( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + mint_to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + item_config: runtime_types::pallet_nfts::types::ItemConfig, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "force_mint", + ForceMint { + collection, + item, + mint_to, + item_config, + }, + [ + 178u8, 21u8, 236u8, 7u8, 99u8, 52u8, 79u8, 176u8, 166u8, + 27u8, 167u8, 111u8, 15u8, 106u8, 139u8, 203u8, 173u8, 57u8, + 103u8, 167u8, 241u8, 196u8, 201u8, 16u8, 245u8, 68u8, 26u8, + 71u8, 152u8, 132u8, 107u8, 73u8, + ], + ) } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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 pallet_authorship { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Provide a set of uncles."] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, + #[doc = "Destroy a single item."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be burned."] + #[doc = "- `item`: The item to be burned."] + #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] + #[doc = " item is owned by this value."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: `check_owner.is_some()`."] + pub fn burn( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + check_owner: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "burn", + Burn { + collection, + item, + check_owner, + }, + [ + 215u8, 138u8, 65u8, 126u8, 201u8, 135u8, 73u8, 194u8, 2u8, + 196u8, 229u8, 103u8, 140u8, 74u8, 21u8, 144u8, 111u8, 99u8, + 200u8, 210u8, 191u8, 108u8, 220u8, 56u8, 64u8, 89u8, 216u8, + 181u8, 175u8, 57u8, 41u8, 173u8, + ], + ) } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), - } - } - pub mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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 = "Move an item from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item to be transferred."] + #[doc = "- `item`: The item to be transferred."] + #[doc = "- `dest`: The account to receive ownership of the item."] + #[doc = ""] + #[doc = "Emits `Transferred`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "transfer", + Transfer { + collection, + item, + dest, + }, + [ + 223u8, 90u8, 63u8, 140u8, 84u8, 72u8, 67u8, 84u8, 225u8, + 84u8, 4u8, 197u8, 17u8, 53u8, 151u8, 209u8, 163u8, 114u8, + 253u8, 225u8, 44u8, 171u8, 240u8, 8u8, 112u8, 8u8, 20u8, + 25u8, 224u8, 131u8, 175u8, 40u8, + ], + ) } - } - } - 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, - Debug, - )] - #[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>, + #[doc = "Re-evaluate the deposits on some items."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the items to be reevaluated."] + #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] + #[doc = ""] + #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] + #[doc = "in the case that the owner account does not have reservable funds to pay for a"] + #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] + #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] + #[doc = "so it's of little consequence."] + #[doc = ""] + #[doc = "It will still return an error in the case that the collection is unknown or the signer"] + #[doc = "is not permitted to call it."] + #[doc = ""] + #[doc = "Weight: `O(items.len())`"] + pub fn redeposit( + &self, + collection: ::core::primitive::u32, + items: ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "redeposit", + Redeposit { collection, items }, + [ + 81u8, 142u8, 143u8, 126u8, 12u8, 71u8, 139u8, 28u8, 170u8, + 219u8, 195u8, 22u8, 146u8, 69u8, 202u8, 7u8, 202u8, 113u8, + 93u8, 187u8, 113u8, 16u8, 8u8, 76u8, 3u8, 124u8, 248u8, 38u8, + 17u8, 232u8, 120u8, 145u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ListError { - #[codec(index = 0)] - Duplicate, - #[codec(index = 1)] - NotHeavier, - #[codec(index = 2)] - NotInSameBag, - #[codec(index = 3)] - NodeNotFound, + #[doc = "Disallow further unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be changed."] + #[doc = "- `item`: The item to become non-transferable."] + #[doc = ""] + #[doc = "Emits `ItemTransferLocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn lock_item_transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "lock_item_transfer", + LockItemTransfer { collection, item }, + [ + 234u8, 3u8, 222u8, 142u8, 68u8, 171u8, 104u8, 48u8, 216u8, + 153u8, 167u8, 77u8, 161u8, 153u8, 191u8, 245u8, 190u8, 228u8, + 255u8, 138u8, 215u8, 196u8, 189u8, 121u8, 251u8, 56u8, 158u8, + 157u8, 156u8, 189u8, 135u8, 16u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + #[doc = "Re-allow unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be changed."] + #[doc = "- `item`: The item to become transferable."] + #[doc = ""] + #[doc = "Emits `ItemTransferUnlocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn unlock_item_transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "unlock_item_transfer", + UnlockItemTransfer { collection, item }, + [ + 33u8, 30u8, 131u8, 204u8, 136u8, 8u8, 180u8, 37u8, 180u8, + 93u8, 79u8, 20u8, 113u8, 73u8, 213u8, 68u8, 158u8, 72u8, + 10u8, 46u8, 204u8, 109u8, 132u8, 127u8, 42u8, 78u8, 196u8, + 228u8, 84u8, 61u8, 139u8, 85u8, + ], + ) } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - }, - #[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, ()>, - }, + #[doc = "Disallows specified settings for the whole collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be locked."] + #[doc = "- `lock_settings`: The settings to be locked."] + #[doc = ""] + #[doc = "Note: it's possible to only lock(set) the setting, but not to unset it."] + #[doc = "Emits `CollectionLocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn lock_collection( + &self, + collection: ::core::primitive::u32, + lock_settings: runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::CollectionSetting, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "lock_collection", + LockCollection { + collection, + lock_settings, + }, + [ + 116u8, 190u8, 188u8, 12u8, 163u8, 231u8, 39u8, 163u8, 83u8, + 109u8, 15u8, 248u8, 154u8, 19u8, 9u8, 27u8, 160u8, 66u8, + 105u8, 55u8, 164u8, 61u8, 8u8, 139u8, 210u8, 192u8, 116u8, + 44u8, 75u8, 4u8, 166u8, 215u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "A error in the list interface implementation."] - List(runtime_types::pallet_bags_list::list::ListError), + #[doc = "Change the Owner of a collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose owner should be changed."] + #[doc = "- `owner`: The new Owner of this collection. They must have called"] + #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_ownership( + &self, + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "transfer_ownership", + TransferOwnership { collection, owner }, + [ + 217u8, 228u8, 51u8, 96u8, 179u8, 215u8, 163u8, 137u8, 231u8, + 239u8, 181u8, 113u8, 48u8, 144u8, 91u8, 140u8, 50u8, 175u8, + 81u8, 251u8, 128u8, 208u8, 38u8, 246u8, 103u8, 219u8, 65u8, + 179u8, 153u8, 4u8, 154u8, 181u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - }, + #[doc = "Change the Issuer, Admin and Freezer of a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose team should be changed."] + #[doc = "- `issuer`: The new Issuer of this collection."] + #[doc = "- `admin`: The new Admin of this collection."] + #[doc = "- `freezer`: The new Freezer of this collection."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_team( + &self, + collection: ::core::primitive::u32, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_team", + SetTeam { + collection, + issuer, + admin, + freezer, + }, + [ + 34u8, 168u8, 70u8, 30u8, 29u8, 186u8, 131u8, 181u8, 132u8, + 63u8, 163u8, 22u8, 244u8, 41u8, 205u8, 234u8, 17u8, 238u8, + 54u8, 64u8, 158u8, 136u8, 50u8, 40u8, 242u8, 117u8, 111u8, + 211u8, 168u8, 156u8, 156u8, 27u8, + ], + ) + } + #[doc = "Change the Owner of a collection."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection."] + #[doc = "- `owner`: The new Owner of this collection."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_collection_owner( + &self, + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "force_collection_owner", + ForceCollectionOwner { collection, owner }, + [ + 170u8, 152u8, 48u8, 227u8, 138u8, 164u8, 130u8, 169u8, 175u8, + 227u8, 210u8, 90u8, 78u8, 126u8, 18u8, 171u8, 115u8, 42u8, + 102u8, 13u8, 221u8, 210u8, 188u8, 170u8, 230u8, 105u8, 40u8, + 124u8, 168u8, 127u8, 17u8, 53u8, + ], + ) + } + #[doc = "Change the config of a collection."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection."] + #[doc = "- `config`: The new config of this collection."] + #[doc = ""] + #[doc = "Emits `CollectionConfigChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_collection_config( + &self, + collection: ::core::primitive::u32, + config: runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "force_collection_config", + ForceCollectionConfig { collection, config }, + [ + 6u8, 58u8, 170u8, 231u8, 3u8, 28u8, 161u8, 69u8, 157u8, + 145u8, 67u8, 247u8, 153u8, 129u8, 105u8, 169u8, 227u8, 12u8, + 166u8, 11u8, 219u8, 186u8, 145u8, 102u8, 192u8, 36u8, 44u8, + 230u8, 213u8, 63u8, 240u8, 227u8, + ], + ) + } + #[doc = "Approve an item to be transferred by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] + #[doc = "- `item`: The item to be approved for delegated transfer."] + #[doc = "- `delegate`: The account to delegate permission to transfer the item."] + #[doc = "- `maybe_deadline`: Optional deadline for the approval. Specified by providing the"] + #[doc = "\tnumber of blocks after which the approval will expire"] + #[doc = ""] + #[doc = "Emits `TransferApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn approve_transfer( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + maybe_deadline: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "approve_transfer", + ApproveTransfer { + collection, + item, + delegate, + maybe_deadline, + }, + [ + 203u8, 41u8, 60u8, 28u8, 226u8, 166u8, 64u8, 195u8, 219u8, + 2u8, 245u8, 4u8, 171u8, 221u8, 218u8, 209u8, 31u8, 160u8, + 142u8, 215u8, 93u8, 49u8, 174u8, 105u8, 117u8, 52u8, 166u8, + 177u8, 206u8, 189u8, 101u8, 113u8, + ], + ) + } + #[doc = "Cancel one of the transfer approvals for a specific item."] + #[doc = ""] + #[doc = "Origin must be either:"] + #[doc = "- the `Force` origin;"] + #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] + #[doc = "- `Signed` with the signer being the Owner of the `item`;"] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] + #[doc = "- `item`: The item of the collection of whose approval will be cancelled."] + #[doc = "- `delegate`: The account that is going to loose their approval."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn cancel_approval( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "cancel_approval", + CancelApproval { + collection, + item, + delegate, + }, + [ + 129u8, 99u8, 206u8, 28u8, 18u8, 72u8, 197u8, 126u8, 239u8, + 204u8, 219u8, 232u8, 160u8, 110u8, 206u8, 64u8, 162u8, 54u8, + 134u8, 7u8, 221u8, 61u8, 95u8, 23u8, 71u8, 10u8, 25u8, 244u8, + 14u8, 31u8, 179u8, 58u8, + ], + ) + } + #[doc = "Cancel all the approvals of a specific item."] + #[doc = ""] + #[doc = "Origin must be either:"] + #[doc = "- the `Force` origin;"] + #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] + #[doc = "- `Signed` with the signer being the Owner of the `item`;"] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item of whose approvals will be cleared."] + #[doc = "- `item`: The item of the collection of whose approvals will be cleared."] + #[doc = ""] + #[doc = "Emits `AllApprovalsCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_all_transfer_approvals( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "clear_all_transfer_approvals", + ClearAllTransferApprovals { collection, item }, + [ + 95u8, 218u8, 189u8, 248u8, 199u8, 163u8, 184u8, 65u8, 200u8, + 240u8, 134u8, 224u8, 12u8, 139u8, 222u8, 193u8, 78u8, 71u8, + 63u8, 57u8, 124u8, 249u8, 239u8, 188u8, 38u8, 15u8, 203u8, + 184u8, 243u8, 87u8, 17u8, 166u8, + ], + ) + } + #[doc = "Disallows changing the metadata or attributes of the item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection if the `item`."] + #[doc = "- `item`: An item to be locked."] + #[doc = "- `lock_metadata`: Specifies whether the metadata should be locked."] + #[doc = "- `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace"] + #[doc = " should be locked."] + #[doc = ""] + #[doc = "Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace"] + #[doc = "only. When the metadata or attributes are locked, it won't be possible the unlock them."] + #[doc = ""] + #[doc = "Emits `ItemPropertiesLocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn lock_item_properties( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + lock_metadata: ::core::primitive::bool, + lock_attributes: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "lock_item_properties", + LockItemProperties { + collection, + item, + lock_metadata, + lock_attributes, + }, + [ + 243u8, 23u8, 227u8, 8u8, 254u8, 177u8, 170u8, 38u8, 48u8, + 179u8, 166u8, 53u8, 131u8, 186u8, 211u8, 107u8, 186u8, 116u8, + 204u8, 188u8, 15u8, 206u8, 79u8, 136u8, 179u8, 141u8, 146u8, + 22u8, 156u8, 90u8, 21u8, 213u8, + ], + ) + } + #[doc = "Set an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be Signed and must conform to the namespace ruleset:"] + #[doc = "- `CollectionOwner` namespace could be modified by the `collection` owner only;"] + #[doc = "- `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`"] + #[doc = " should be set in that case;"] + #[doc = "- `Account(AccountId)` namespace could be modified only when the `origin` was given a"] + #[doc = " permission to do so;"] + #[doc = ""] + #[doc = "The funds of `origin` are reserved according to the formula:"] + #[doc = "`AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] + #[doc = "- `namespace`: Attribute's namespace."] + #[doc = "- `key`: The key of the attribute."] + #[doc = "- `value`: The value to which to set the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_attribute( + &self, + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_attribute", + SetAttribute { + collection, + maybe_item, + namespace, + key, + value, + }, + [ + 191u8, 30u8, 39u8, 37u8, 65u8, 243u8, 40u8, 67u8, 160u8, + 45u8, 63u8, 196u8, 221u8, 105u8, 159u8, 211u8, 198u8, 125u8, + 14u8, 233u8, 59u8, 208u8, 197u8, 137u8, 88u8, 101u8, 234u8, + 71u8, 102u8, 161u8, 219u8, 179u8, + ], + ) + } + #[doc = "Force-set an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "If the attribute already exists and it was set by another account, the deposit"] + #[doc = "will be returned to the previous owner."] + #[doc = ""] + #[doc = "- `set_as`: An optional owner of the attribute."] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] + #[doc = "- `namespace`: Attribute's namespace."] + #[doc = "- `key`: The key of the attribute."] + #[doc = "- `value`: The value to which to set the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_set_attribute( + &self, + set_as: ::core::option::Option<::subxt::utils::AccountId32>, + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "force_set_attribute", + ForceSetAttribute { + set_as, + collection, + maybe_item, + namespace, + key, + value, + }, + [ + 8u8, 111u8, 29u8, 35u8, 198u8, 9u8, 1u8, 219u8, 122u8, 60u8, + 134u8, 199u8, 254u8, 1u8, 85u8, 126u8, 58u8, 137u8, 243u8, + 228u8, 252u8, 143u8, 95u8, 8u8, 251u8, 3u8, 86u8, 11u8, 40u8, + 87u8, 138u8, 230u8, + ], + ) + } + #[doc = "Clear an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "attribute."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] + #[doc = "- `namespace`: Attribute's namespace."] + #[doc = "- `key`: The key of the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_attribute( + &self, + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "clear_attribute", + ClearAttribute { + collection, + maybe_item, + namespace, + key, + }, + [ + 110u8, 144u8, 255u8, 153u8, 138u8, 39u8, 100u8, 38u8, 242u8, + 147u8, 177u8, 103u8, 167u8, 154u8, 46u8, 57u8, 16u8, 82u8, + 153u8, 228u8, 3u8, 161u8, 198u8, 61u8, 73u8, 28u8, 93u8, + 216u8, 120u8, 194u8, 183u8, 220u8, + ], + ) + } + #[doc = "Approve item's attributes to be changed by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and must be an owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: A collection of the item."] + #[doc = "- `item`: The item that holds attributes."] + #[doc = "- `delegate`: The account to delegate permission to change attributes of the item."] + #[doc = ""] + #[doc = "Emits `ItemAttributesApprovalAdded` on success."] + pub fn approve_item_attributes( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "approve_item_attributes", + ApproveItemAttributes { + collection, + item, + delegate, + }, + [ + 194u8, 174u8, 249u8, 37u8, 88u8, 207u8, 198u8, 238u8, 83u8, + 11u8, 170u8, 0u8, 56u8, 5u8, 64u8, 138u8, 30u8, 184u8, 71u8, + 79u8, 178u8, 189u8, 125u8, 249u8, 141u8, 173u8, 164u8, 109u8, + 192u8, 0u8, 179u8, 67u8, + ], + ) + } + #[doc = "Cancel the previously provided approval to change item's attributes."] + #[doc = "All the previously set attributes by the `delegate` will be removed."] + #[doc = ""] + #[doc = "Origin must be Signed and must be an owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: Collection that the item is contained within."] + #[doc = "- `item`: The item that holds attributes."] + #[doc = "- `delegate`: The previously approved account to remove."] + #[doc = ""] + #[doc = "Emits `ItemAttributesApprovalRemoved` on success."] + pub fn cancel_item_attributes_approval( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + witness : runtime_types :: pallet_nfts :: types :: CancelAttributesApprovalWitness, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "cancel_item_attributes_approval", + CancelItemAttributesApproval { + collection, + item, + delegate, + witness, + }, + [ + 237u8, 139u8, 12u8, 197u8, 94u8, 100u8, 182u8, 14u8, 202u8, + 190u8, 87u8, 148u8, 61u8, 240u8, 8u8, 197u8, 28u8, 18u8, + 85u8, 86u8, 215u8, 201u8, 54u8, 187u8, 141u8, 68u8, 156u8, + 231u8, 15u8, 219u8, 234u8, 26u8, + ], + ) + } + #[doc = "Set the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `item`: The identifier of the item whose metadata to set."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = ""] + #[doc = "Emits `ItemMetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_metadata( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_metadata", + SetMetadata { + collection, + item, + data, + }, + [ + 45u8, 223u8, 215u8, 10u8, 235u8, 165u8, 61u8, 151u8, 170u8, + 176u8, 34u8, 182u8, 95u8, 218u8, 7u8, 115u8, 99u8, 241u8, + 221u8, 190u8, 211u8, 24u8, 44u8, 121u8, 79u8, 93u8, 37u8, + 154u8, 155u8, 205u8, 176u8, 158u8, + ], + ) + } + #[doc = "Clear the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `item`: The identifier of the item whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `ItemMetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_metadata( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "clear_metadata", + ClearMetadata { collection, item }, + [ + 113u8, 75u8, 211u8, 250u8, 129u8, 61u8, 231u8, 204u8, 141u8, + 151u8, 65u8, 108u8, 230u8, 68u8, 51u8, 165u8, 126u8, 211u8, + 51u8, 33u8, 9u8, 47u8, 50u8, 71u8, 123u8, 71u8, 43u8, 162u8, + 76u8, 1u8, 90u8, 222u8, + ], + ) + } + #[doc = "Set the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the item whose metadata to update."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_collection_metadata( + &self, + collection: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_collection_metadata", + SetCollectionMetadata { collection, data }, + [ + 32u8, 118u8, 96u8, 38u8, 27u8, 73u8, 98u8, 37u8, 105u8, 42u8, + 127u8, 130u8, 202u8, 159u8, 214u8, 72u8, 127u8, 178u8, 5u8, + 184u8, 217u8, 59u8, 205u8, 120u8, 161u8, 177u8, 186u8, 204u8, + 117u8, 111u8, 5u8, 10u8, + ], + ) + } + #[doc = "Clear the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_collection_metadata( + &self, + collection: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "clear_collection_metadata", + ClearCollectionMetadata { collection }, + [ + 218u8, 108u8, 43u8, 96u8, 85u8, 130u8, 198u8, 167u8, 28u8, + 4u8, 151u8, 185u8, 162u8, 123u8, 120u8, 42u8, 72u8, 37u8, + 250u8, 135u8, 100u8, 37u8, 193u8, 232u8, 62u8, 91u8, 18u8, + 120u8, 241u8, 47u8, 73u8, 209u8, + ], + ) + } + #[doc = "Set (or reset) the acceptance of ownership for a particular account."] + #[doc = ""] + #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] + #[doc = "provider reference."] + #[doc = ""] + #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] + #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] + #[doc = " ownership transferal."] + #[doc = ""] + #[doc = "Emits `OwnershipAcceptanceChanged`."] + pub fn set_accept_ownership( + &self, + maybe_collection: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_accept_ownership", + SetAcceptOwnership { maybe_collection }, + [ + 171u8, 174u8, 217u8, 70u8, 115u8, 1u8, 231u8, 149u8, 223u8, + 227u8, 6u8, 226u8, 190u8, 144u8, 101u8, 21u8, 147u8, 243u8, + 123u8, 228u8, 42u8, 27u8, 126u8, 58u8, 31u8, 233u8, 54u8, + 157u8, 193u8, 212u8, 114u8, 232u8, + ], + ) + } + #[doc = "Set the maximum number of items a collection could have."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to change."] + #[doc = "- `max_supply`: The maximum number of items a collection could have."] + #[doc = ""] + #[doc = "Emits `CollectionMaxSupplySet` event when successful."] + pub fn set_collection_max_supply( + &self, + collection: ::core::primitive::u32, + max_supply: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_collection_max_supply", + SetCollectionMaxSupply { + collection, + max_supply, + }, + [ + 116u8, 134u8, 93u8, 228u8, 6u8, 198u8, 26u8, 168u8, 154u8, + 137u8, 0u8, 151u8, 1u8, 187u8, 36u8, 154u8, 62u8, 193u8, + 250u8, 83u8, 41u8, 135u8, 187u8, 4u8, 132u8, 234u8, 207u8, + 127u8, 153u8, 157u8, 76u8, 80u8, + ], + ) + } + #[doc = "Update mint settings."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to change."] + #[doc = "- `mint_settings`: The new mint settings."] + #[doc = ""] + #[doc = "Emits `CollectionMintSettingsUpdated` event when successful."] + pub fn update_mint_settings( + &self, + collection: ::core::primitive::u32, + mint_settings: runtime_types::pallet_nfts::types::MintSettings< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "update_mint_settings", + UpdateMintSettings { + collection, + mint_settings, + }, + [ + 194u8, 13u8, 39u8, 21u8, 179u8, 228u8, 251u8, 99u8, 247u8, + 10u8, 0u8, 247u8, 69u8, 226u8, 191u8, 143u8, 182u8, 128u8, + 112u8, 142u8, 138u8, 99u8, 197u8, 62u8, 246u8, 150u8, 184u8, + 172u8, 100u8, 238u8, 236u8, 236u8, + ], + ) + } + #[doc = "Set (or reset) the price for an item."] + #[doc = ""] + #[doc = "Origin must be Signed and must be the owner of the asset `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item to set the price for."] + #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] + #[doc = "- `buyer`: Restricts the buy operation to a specific account."] + #[doc = ""] + #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] + #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] + pub fn set_price( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + price: ::core::option::Option<::core::primitive::u128>, + whitelisted_buyer: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "set_price", + SetPrice { + collection, + item, + price, + whitelisted_buyer, + }, + [ + 159u8, 178u8, 134u8, 144u8, 165u8, 80u8, 141u8, 253u8, 194u8, + 11u8, 8u8, 215u8, 7u8, 82u8, 138u8, 62u8, 81u8, 178u8, 75u8, + 84u8, 97u8, 175u8, 161u8, 97u8, 125u8, 175u8, 70u8, 247u8, + 209u8, 132u8, 48u8, 196u8, + ], + ) + } + #[doc = "Allows to buy an item if it's up for sale."] + #[doc = ""] + #[doc = "Origin must be Signed and must not be the owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item the sender wants to buy."] + #[doc = "- `bid_price`: The price the sender is willing to pay."] + #[doc = ""] + #[doc = "Emits `ItemBought` on success."] + pub fn buy_item( + &self, + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + bid_price: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "buy_item", + BuyItem { + collection, + item, + bid_price, + }, + [ + 79u8, 39u8, 106u8, 21u8, 227u8, 244u8, 7u8, 107u8, 125u8, + 114u8, 24u8, 254u8, 208u8, 67u8, 31u8, 123u8, 134u8, 29u8, + 94u8, 243u8, 164u8, 137u8, 191u8, 71u8, 17u8, 170u8, 226u8, + 172u8, 233u8, 198u8, 226u8, 33u8, + ], + ) + } + #[doc = "Allows to pay the tips."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `tips`: Tips array."] + #[doc = ""] + #[doc = "Emits `TipSent` on every tip transfer."] + pub fn pay_tips( + &self, + tips: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_nfts::types::ItemTip< + ::core::primitive::u32, + ::core::primitive::u32, + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "pay_tips", + PayTips { tips }, + [ + 139u8, 37u8, 187u8, 31u8, 201u8, 46u8, 235u8, 234u8, 117u8, + 184u8, 146u8, 246u8, 127u8, 116u8, 180u8, 166u8, 69u8, 43u8, + 152u8, 109u8, 10u8, 43u8, 67u8, 92u8, 118u8, 242u8, 217u8, + 166u8, 35u8, 73u8, 148u8, 226u8, + ], + ) + } + #[doc = "Register a new atomic swap, declaring an intention to send an `item` in exchange for"] + #[doc = "`desired_item` from origin to target on the current blockchain."] + #[doc = "The target can execute the swap during the specified `duration` of blocks (if set)."] + #[doc = "Additionally, the price could be set for the desired `item`."] + #[doc = ""] + #[doc = "Origin must be Signed and must be an owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item an owner wants to give."] + #[doc = "- `desired_collection`: The collection of the desired item."] + #[doc = "- `desired_item`: The desired item an owner wants to receive."] + #[doc = "- `maybe_price`: The price an owner is willing to pay or receive for the desired `item`."] + #[doc = "- `duration`: A deadline for the swap. Specified by providing the number of blocks"] + #[doc = "\tafter which the swap will expire."] + #[doc = ""] + #[doc = "Emits `SwapCreated` on success."] + pub fn create_swap( + &self, + offered_collection: ::core::primitive::u32, + offered_item: ::core::primitive::u32, + desired_collection: ::core::primitive::u32, + maybe_desired_item: ::core::option::Option<::core::primitive::u32>, + maybe_price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + duration: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "create_swap", + CreateSwap { + offered_collection, + offered_item, + desired_collection, + maybe_desired_item, + maybe_price, + duration, + }, + [ + 71u8, 97u8, 120u8, 17u8, 181u8, 119u8, 135u8, 247u8, 45u8, + 11u8, 240u8, 111u8, 120u8, 47u8, 66u8, 66u8, 104u8, 248u8, + 224u8, 129u8, 153u8, 148u8, 233u8, 20u8, 105u8, 169u8, 54u8, + 191u8, 22u8, 169u8, 148u8, 31u8, + ], + ) + } + #[doc = "Cancel an atomic swap."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = "Origin must be an owner of the `item` if the deadline hasn't expired."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item an owner wants to give."] + #[doc = ""] + #[doc = "Emits `SwapCancelled` on success."] + pub fn cancel_swap( + &self, + offered_collection: ::core::primitive::u32, + offered_item: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "cancel_swap", + CancelSwap { + offered_collection, + offered_item, + }, + [ + 87u8, 2u8, 127u8, 158u8, 82u8, 37u8, 1u8, 140u8, 227u8, 31u8, + 131u8, 188u8, 250u8, 66u8, 147u8, 211u8, 65u8, 6u8, 251u8, + 60u8, 82u8, 45u8, 217u8, 114u8, 204u8, 161u8, 25u8, 166u8, + 135u8, 7u8, 119u8, 91u8, + ], + ) + } + #[doc = "Claim an atomic swap."] + #[doc = "This method executes a pending swap, that was created by a counterpart before."] + #[doc = ""] + #[doc = "Origin must be Signed and must be an owner of the `item`."] + #[doc = ""] + #[doc = "- `send_collection`: The collection of the item to be sent."] + #[doc = "- `send_item`: The item to be sent."] + #[doc = "- `receive_collection`: The collection of the item to be received."] + #[doc = "- `receive_item`: The item to be received."] + #[doc = "- `witness_price`: A price that was previously agreed on."] + #[doc = ""] + #[doc = "Emits `SwapClaimed` on success."] + pub fn claim_swap( + &self, + send_collection: ::core::primitive::u32, + send_item: ::core::primitive::u32, + receive_collection: ::core::primitive::u32, + receive_item: ::core::primitive::u32, + witness_price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Nfts", + "claim_swap", + ClaimSwap { + send_collection, + send_item, + receive_collection, + receive_item, + witness_price, + }, + [ + 221u8, 120u8, 31u8, 254u8, 154u8, 243u8, 53u8, 56u8, 138u8, + 174u8, 83u8, 58u8, 78u8, 240u8, 177u8, 153u8, 1u8, 27u8, + 203u8, 147u8, 53u8, 24u8, 186u8, 196u8, 22u8, 161u8, 106u8, + 125u8, 166u8, 212u8, 116u8, 247u8, + ], + ) } } } - pub mod pallet_balances { + #[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_nfts::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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - #[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, ()>, - #[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, ()>, - dest: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[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, ()>, - #[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, ()>, - 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, ()>, - amount: ::core::primitive::u128, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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, - Debug, - )] - #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A `collection` was created."] + pub struct Created { + pub collection: ::core::primitive::u32, + pub creator: ::subxt::utils::AccountId32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Created"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32875,13 +31380,17 @@ pub mod api { )] #[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, + #[doc = "A `collection` was force-created."] + pub struct ForceCreated { + pub collection: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ForceCreated { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ForceCreated"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -32890,10 +31399,13 @@ pub mod api { )] #[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, + #[doc = "A `collection` was destroyed."] + pub struct Destroyed { + pub collection: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Destroyed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32904,13 +31416,15 @@ pub mod api { )] #[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, + #[doc = "An `item` was issued."] + pub struct Issued { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Issued { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Issued"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32921,11 +31435,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V1_0_0, - #[codec(index = 1)] - V2_0_0, + #[doc = "An `item` was transferred."] + pub struct Transferred { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub from: ::subxt::utils::AccountId32, + pub to: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Transferred { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Transferred"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32936,262 +31455,15 @@ pub mod api { )] #[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, + #[doc = "An `item` was destroyed."] + pub struct Burned { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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::ApproveOrigin`."] - #[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::ApproveOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - propose_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - curator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[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, ()>, - }, - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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 }, - } + impl ::subxt::events::StaticEvent for Burned { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Burned"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33202,13 +31474,14 @@ pub mod api { )] #[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>, + #[doc = "An `item` became non-transferable."] + pub struct ItemTransferLocked { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ItemTransferLocked { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemTransferLocked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33219,299 +31492,14 @@ pub mod api { )] #[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, - }, + #[doc = "An `item` became transferable."] + pub struct ItemTransferUnlocked { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, } - } - pub mod pallet_child_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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a new child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of parent"] - #[doc = "bounty and the parent bounty must be in \"active\" state."] - #[doc = ""] - #[doc = "Child-bounty gets added successfully & fund gets transferred from"] - #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] - #[doc = "funds, else the call fails."] - #[doc = ""] - #[doc = "Upper bound to maximum number of active child bounties that can be"] - #[doc = "added are managed via runtime trait config"] - #[doc = "[`Config::MaxActiveChildBountyCount`]."] - #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] - #[doc = "- `value`: Value for executing the proposal."] - #[doc = "- `description`: Text description for the child-bounty."] - add_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Propose curator for funded child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be curator of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `curator`: Address of child-bounty curator."] - #[doc = "- `fee`: payment fee to child-bounty curator for execution."] - propose_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - curator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Accept the curator role for the child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this"] - #[doc = "child-bounty."] - #[doc = ""] - #[doc = "A deposit will be reserved from the curator and refund upon"] - #[doc = "successful payout or cancellation."] - #[doc = ""] - #[doc = "Fee for curator is deducted from curator fee of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] - #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - accept_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Unassign curator from a child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] - #[doc = "the curator of the parent bounty, or any signed origin."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] - #[doc = "curator, parent bounty must be in active state, for this call to"] - #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] - #[doc = "this call irrespective of the parent bounty state."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin` or the"] - #[doc = "parent bounty curator, we assume that the child-bounty curator is"] - #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] - #[doc = "slashed."] - #[doc = ""] - #[doc = "If the origin is the child-bounty curator, we take this as a sign"] - #[doc = "that they are unable to do their job, and are willingly giving up."] - #[doc = "We could slash the deposit, but for now we allow them to unreserve"] - #[doc = "their deposit and exit without issue. (We may want to change this if"] - #[doc = "it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] - #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] - #[doc = "inactive state of child-bounty curator."] - #[doc = ""] - #[doc = "This allows anyone in the community to call out that a child-bounty"] - #[doc = "curator is not doing their due diligence, and we should pick a new"] - #[doc = "one. In this case the child-bounty curator deposit is slashed."] - #[doc = ""] - #[doc = "State of child-bounty is moved to Added state on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - unassign_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Award child-bounty to a beneficiary."] - #[doc = ""] - #[doc = "The beneficiary will be able to claim the funds after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the parent curator or"] - #[doc = "curator of this child-bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in active state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `beneficiary`: Beneficiary account."] - award_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - beneficiary: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 5)] - #[doc = "Claim the payout from an awarded child-bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call may be any signed origin."] - #[doc = ""] - #[doc = "Call works independent of parent bounty state, No need for parent"] - #[doc = "bounty to be in active state."] - #[doc = ""] - #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] - #[doc = "paid & curator deposit is unreserved."] - #[doc = ""] - #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] - #[doc = "call. And instance of child-bounty is removed from the state on"] - #[doc = "successful call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - claim_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] - #[doc = "are transferred to parent bounty account. The child-bounty curator"] - #[doc = "deposit may be unreserved if possible."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be either parent curator or"] - #[doc = "`T::RejectOrigin`."] - #[doc = ""] - #[doc = "If the state of child-bounty is `Active`, curator deposit is"] - #[doc = "unreserved."] - #[doc = ""] - #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] - #[doc = "returns `PendingPayout` error."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] - #[doc = "active state, for this child-bounty call to work. For origin"] - #[doc = "T::RejectOrigin execution is forced."] - #[doc = ""] - #[doc = "Instance of child-bounty is removed from the state on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - close_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 parent bounty is not in active state."] - ParentBountyNotActive, - #[codec(index = 1)] - #[doc = "The bounty balance is not enough to add new child-bounty."] - InsufficientBountyBalance, - #[codec(index = 2)] - #[doc = "Number of child bounties exceeds limit `MaxActiveChildBountyCount`."] - TooManyChildBounties, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 child-bounty is added."] - Added { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A child-bounty is awarded to a beneficiary."] - Awarded { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 2)] - #[doc = "A child-bounty is claimed by beneficiary."] - Claimed { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 3)] - #[doc = "A child-bounty is cancelled."] - Canceled { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - } + impl ::subxt::events::StaticEvent for ItemTransferUnlocked { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemTransferUnlocked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33522,15 +31510,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChildBounty<_0, _1, _2> { - pub parent_bounty: _2, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub status: - runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, + #[doc = "`item` metadata or attributes were locked."] + pub struct ItemPropertiesLocked { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub lock_metadata: ::core::primitive::bool, + pub lock_attributes: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for ItemPropertiesLocked { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemPropertiesLocked"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -33539,357 +31531,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ChildBountyStatus<_0, _1> { - #[codec(index = 0)] - Added, - #[codec(index = 1)] - CuratorProposed { curator: _0 }, - #[codec(index = 2)] - Active { curator: _0 }, - #[codec(index = 3)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, + #[doc = "Some `collection` was locked."] + pub struct CollectionLocked { + pub collection: ::core::primitive::u32, } - } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - }, - } + impl ::subxt::events::StaticEvent for CollectionLocked { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionLocked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33900,13 +31548,14 @@ pub mod api { )] #[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, + #[doc = "The owner changed."] + pub struct OwnerChanged { + pub collection: ::core::primitive::u32, + pub new_owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for OwnerChanged { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "OwnerChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33917,1073 +31566,1342 @@ pub mod api { )] #[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, + #[doc = "The management team changed."] + pub struct TeamChanged { + pub collection: ::core::primitive::u32, + pub issuer: ::subxt::utils::AccountId32, + pub admin: ::subxt::utils::AccountId32, + pub freezer: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for TeamChanged { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "TeamChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] + #[doc = "a `delegate`."] + pub struct TransferApproved { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, + pub deadline: ::core::option::Option<::core::primitive::u32>, + } + impl ::subxt::events::StaticEvent for TransferApproved { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "TransferApproved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] + #[doc = "`collection` was cancelled by its `owner`."] + pub struct ApprovalCancelled { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + pub delegate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ApprovalCancelled { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ApprovalCancelled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "All approvals of an item got cancelled."] + pub struct AllApprovalsCancelled { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub owner: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for AllApprovalsCancelled { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "AllApprovalsCancelled"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A `collection` has had its config changed by the `Force` origin."] + pub struct CollectionConfigChanged { + pub collection: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for CollectionConfigChanged { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionConfigChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New metadata has been set for a `collection`."] + pub struct CollectionMetadataSet { + pub collection: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + impl ::subxt::events::StaticEvent for CollectionMetadataSet { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionMetadataSet"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Metadata has been cleared for a `collection`."] + pub struct CollectionMetadataCleared { + pub collection: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for CollectionMetadataCleared { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionMetadataCleared"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New metadata has been set for an item."] + pub struct ItemMetadataSet { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + impl ::subxt::events::StaticEvent for ItemMetadataSet { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemMetadataSet"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Metadata has been cleared for an item."] + pub struct ItemMetadataCleared { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ItemMetadataCleared { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemMetadataCleared"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The deposit for a set of `item`s within a `collection` has been updated."] + pub struct Redeposited { + pub collection: ::core::primitive::u32, + pub successful_items: ::std::vec::Vec<::core::primitive::u32>, + } + impl ::subxt::events::StaticEvent for Redeposited { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "Redeposited"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "New attribute metadata has been set for a `collection` or `item`."] + pub struct AttributeSet { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } + impl ::subxt::events::StaticEvent for AttributeSet { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "AttributeSet"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] + pub struct AttributeCleared { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } + impl ::subxt::events::StaticEvent for AttributeCleared { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "AttributeCleared"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new approval to modify item attributes was added."] + pub struct ItemAttributesApprovalAdded { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ItemAttributesApprovalAdded { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemAttributesApprovalAdded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new approval to modify item attributes was removed."] + pub struct ItemAttributesApprovalRemoved { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub delegate: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ItemAttributesApprovalRemoved { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemAttributesApprovalRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Ownership acceptance has changed for an account."] + pub struct OwnershipAcceptanceChanged { + pub who: ::subxt::utils::AccountId32, + pub maybe_collection: ::core::option::Option<::core::primitive::u32>, + } + impl ::subxt::events::StaticEvent for OwnershipAcceptanceChanged { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "OwnershipAcceptanceChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Max supply has been set for a collection."] + pub struct CollectionMaxSupplySet { + pub collection: ::core::primitive::u32, + pub max_supply: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for CollectionMaxSupplySet { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionMaxSupplySet"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Mint settings for a collection had changed."] + pub struct CollectionMintSettingsUpdated { + pub collection: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for CollectionMintSettingsUpdated { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "CollectionMintSettingsUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Event gets emitted when the `NextCollectionId` gets incremented."] + pub struct NextCollectionIdIncremented { + pub next_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for NextCollectionIdIncremented { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "NextCollectionIdIncremented"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The price was set for the item."] + pub struct ItemPriceSet { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::primitive::u128, + pub whitelisted_buyer: + ::core::option::Option<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for ItemPriceSet { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemPriceSet"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The price for the item was removed."] + pub struct ItemPriceRemoved { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ItemPriceRemoved { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemPriceRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An item was bought."] + pub struct ItemBought { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub price: ::core::primitive::u128, + pub seller: ::subxt::utils::AccountId32, + pub buyer: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for ItemBought { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "ItemBought"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A tip was sent."] + pub struct TipSent { + pub collection: ::core::primitive::u32, + pub item: ::core::primitive::u32, + pub sender: ::subxt::utils::AccountId32, + pub receiver: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for TipSent { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "TipSent"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An `item` swap intent was created."] + pub struct SwapCreated { + pub offered_collection: ::core::primitive::u32, + pub offered_item: ::core::primitive::u32, + pub desired_collection: ::core::primitive::u32, + pub desired_item: ::core::option::Option<::core::primitive::u32>, + pub price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + pub deadline: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SwapCreated { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "SwapCreated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The swap was cancelled."] + pub struct SwapCancelled { + pub offered_collection: ::core::primitive::u32, + pub offered_item: ::core::primitive::u32, + pub desired_collection: ::core::primitive::u32, + pub desired_item: ::core::option::Option<::core::primitive::u32>, + pub price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + pub deadline: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SwapCancelled { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "SwapCancelled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The swap has been claimed."] + pub struct SwapClaimed { + pub sent_collection: ::core::primitive::u32, + pub sent_item: ::core::primitive::u32, + pub sent_item_owner: ::subxt::utils::AccountId32, + pub received_collection: ::core::primitive::u32, + pub received_item: ::core::primitive::u32, + pub received_item_owner: ::subxt::utils::AccountId32, + pub price: ::core::option::Option< + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + >, + pub deadline: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for SwapClaimed { + const PALLET: &'static str = "Nfts"; + const EVENT: &'static str = "SwapClaimed"; } } - pub mod pallet_democracy { + pub mod storage { use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, + pub struct StorageApi; + impl StorageApi { + #[doc = " Details of a collection."] + pub fn collection( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "Collection", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 145u8, 183u8, 254u8, 29u8, 238u8, 211u8, 62u8, 231u8, 207u8, + 208u8, 244u8, 89u8, 247u8, 204u8, 29u8, 15u8, 30u8, 28u8, + 182u8, 28u8, 190u8, 236u8, 133u8, 125u8, 89u8, 46u8, 31u8, + 212u8, 86u8, 211u8, 108u8, 195u8, + ], + ) } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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::polkadot_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::polkadot_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::polkadot_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::polkadot_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, ()>, - 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, ()>, - }, - #[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, ()>, - 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, - }, + #[doc = " Details of a collection."] + pub fn collection_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionDetails< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "Collection", + Vec::new(), + [ + 145u8, 183u8, 254u8, 29u8, 238u8, 211u8, 62u8, 231u8, 207u8, + 208u8, 244u8, 89u8, 247u8, 204u8, 29u8, 15u8, 30u8, 28u8, + 182u8, 28u8, 190u8, 236u8, 133u8, 125u8, 89u8, 46u8, 31u8, + 212u8, 86u8, 211u8, 108u8, 195u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, + #[doc = " The collection, if any, of which an account is willing to take ownership."] + pub fn ownership_acceptance( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "OwnershipAcceptance", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, + 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, + 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, + 90u8, 51u8, 167u8, 189u8, 39u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, + #[doc = " The collection, if any, of which an account is willing to take ownership."] + pub fn ownership_acceptance_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "OwnershipAcceptance", + Vec::new(), + [ + 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, + 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, + 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, + 90u8, 51u8, 167u8, 189u8, 39u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >, - ), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, + #[doc = " The items held by any given account; set out this way so that items owned by a single"] + #[doc = " account can be enumerated."] + pub fn account( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + _2: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [83u8 , 188u8 , 8u8 , 123u8 , 84u8 , 224u8 , 52u8 , 18u8 , 81u8 , 207u8 , 139u8 , 149u8 , 209u8 , 246u8 , 211u8 , 132u8 , 63u8 , 86u8 , 145u8 , 33u8 , 4u8 , 252u8 , 90u8 , 88u8 , 89u8 , 145u8 , 147u8 , 164u8 , 223u8 , 162u8 , 119u8 , 161u8 ,]) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal: _1, - pub threshold: - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + #[doc = " The items held by any given account; set out this way so that items owned by a single"] + #[doc = " account can be enumerated."] + pub fn account_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "Account", + Vec::new(), + [ + 83u8, 188u8, 8u8, 123u8, 84u8, 224u8, 52u8, 18u8, 81u8, + 207u8, 139u8, 149u8, 209u8, 246u8, 211u8, 132u8, 63u8, 86u8, + 145u8, 33u8, 4u8, 252u8, 90u8, 88u8, 89u8, 145u8, 147u8, + 164u8, 223u8, 162u8, 119u8, 161u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, + #[doc = " The collections owned by any given account; set out this way so that collections owned by"] + #[doc = " a single account can be enumerated."] + pub fn collection_account( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "CollectionAccount" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [173u8 , 183u8 , 58u8 , 232u8 , 121u8 , 133u8 , 40u8 , 226u8 , 60u8 , 146u8 , 31u8 , 110u8 , 186u8 , 235u8 , 206u8 , 160u8 , 36u8 , 221u8 , 27u8 , 222u8 , 91u8 , 107u8 , 93u8 , 19u8 , 5u8 , 24u8 , 51u8 , 220u8 , 79u8 , 26u8 , 216u8 , 26u8 ,]) } - } - pub mod vote { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, + #[doc = " The collections owned by any given account; set out this way so that collections owned by"] + #[doc = " a single account can be enumerated."] + pub fn collection_account_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionAccount", + Vec::new(), + [ + 173u8, 183u8, 58u8, 232u8, 121u8, 133u8, 40u8, 226u8, 60u8, + 146u8, 31u8, 110u8, 186u8, 235u8, 206u8, 160u8, 36u8, 221u8, + 27u8, 222u8, 91u8, 107u8, 93u8, 19u8, 5u8, 24u8, 51u8, 220u8, + 79u8, 26u8, 216u8, 26u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote(pub ::core::primitive::u8); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Voting<_0, _1, _2> { - #[codec(index = 0)] - Direct { - votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: - runtime_types::pallet_democracy::conviction::Conviction, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, + #[doc = " The items in existence and their ownership details."] + #[doc = " Stores collection roles as per account."] + pub fn collection_role_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::CollectionRole, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "CollectionRoleOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [220u8 , 76u8 , 45u8 , 235u8 , 74u8 , 231u8 , 161u8 , 241u8 , 235u8 , 154u8 , 69u8 , 168u8 , 62u8 , 45u8 , 234u8 , 106u8 , 17u8 , 17u8 , 152u8 , 220u8 , 144u8 , 67u8 , 159u8 , 137u8 , 39u8 , 130u8 , 169u8 , 111u8 , 109u8 , 195u8 , 9u8 , 96u8 ,]) } - } - pub mod vote_threshold { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, + #[doc = " The items in existence and their ownership details."] + #[doc = " Stores collection roles as per account."] + pub fn collection_role_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::CollectionRole, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionRoleOf", + Vec::new(), + [ + 220u8, 76u8, 45u8, 235u8, 74u8, 231u8, 161u8, 241u8, 235u8, + 154u8, 69u8, 168u8, 62u8, 45u8, 234u8, 106u8, 17u8, 17u8, + 152u8, 220u8, 144u8, 67u8, 159u8, 137u8, 39u8, 130u8, 169u8, + 111u8, 109u8, 195u8, 9u8, 96u8, + ], + ) } - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "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 :: polkadot_runtime :: NposCompactSolution16 > > , 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 :: polkadot_runtime :: NposCompactSolution16 > > , } , # [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, - Debug, - )] - #[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, + #[doc = " The items in existence and their ownership details."] pub fn item (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > , _1 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_nfts :: types :: ItemDetails < :: subxt :: utils :: AccountId32 , runtime_types :: pallet_nfts :: types :: ItemDeposit < :: core :: primitive :: u128 , :: subxt :: utils :: AccountId32 > , runtime_types :: sp_core :: bounded :: bounded_btree_map :: BoundedBTreeMap < :: subxt :: utils :: AccountId32 , :: core :: option :: Option < :: core :: primitive :: u32 > > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "Item" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [159u8 , 81u8 , 47u8 , 170u8 , 54u8 , 246u8 , 176u8 , 130u8 , 225u8 , 246u8 , 29u8 , 6u8 , 214u8 , 178u8 , 133u8 , 248u8 , 248u8 , 1u8 , 237u8 , 171u8 , 64u8 , 2u8 , 83u8 , 107u8 , 225u8 , 36u8 , 30u8 , 194u8 , 185u8 , 218u8 , 245u8 , 62u8 ,]) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , 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 = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } - } - 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, - Debug, - )] - #[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, + #[doc = " The items in existence and their ownership details."] pub fn item_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_nfts :: types :: ItemDetails < :: subxt :: utils :: AccountId32 , runtime_types :: pallet_nfts :: types :: ItemDeposit < :: core :: primitive :: u128 , :: subxt :: utils :: AccountId32 > , runtime_types :: sp_core :: bounded :: bounded_btree_map :: BoundedBTreeMap < :: subxt :: utils :: AccountId32 , :: core :: option :: Option < :: core :: primitive :: u32 > > > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "Item", + Vec::new(), + [ + 159u8, 81u8, 47u8, 170u8, 54u8, 246u8, 176u8, 130u8, 225u8, + 246u8, 29u8, 6u8, 214u8, 178u8, 133u8, 248u8, 248u8, 1u8, + 237u8, 171u8, 64u8, 2u8, 83u8, 107u8, 225u8, 36u8, 30u8, + 194u8, 185u8, 218u8, 245u8, 62u8, + ], + ) + } + #[doc = " Metadata of a collection."] + pub fn collection_metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionMetadata< + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionMetadataOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 174u8, 253u8, 204u8, 147u8, 93u8, 148u8, 155u8, 23u8, 38u8, + 174u8, 76u8, 126u8, 200u8, 105u8, 78u8, 38u8, 173u8, 92u8, + 153u8, 190u8, 200u8, 130u8, 172u8, 131u8, 96u8, 181u8, 133u8, + 163u8, 219u8, 113u8, 233u8, 135u8, + ], + ) + } + #[doc = " Metadata of a collection."] + pub fn collection_metadata_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionMetadata< + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionMetadataOf", + Vec::new(), + [ + 174u8, 253u8, 204u8, 147u8, 93u8, 148u8, 155u8, 23u8, 38u8, + 174u8, 76u8, 126u8, 200u8, 105u8, 78u8, 38u8, 173u8, 92u8, + 153u8, 190u8, 200u8, 130u8, 172u8, 131u8, 96u8, 181u8, 133u8, + 163u8, 219u8, 113u8, 233u8, 135u8, + ], + ) + } + #[doc = " Metadata of an item."] + pub fn item_metadata_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::ItemMetadata< + runtime_types::pallet_nfts::types::ItemMetadataDeposit< + ::core::primitive::u128, + ::subxt::utils::AccountId32, >, - pub call_fee: _1, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemMetadataOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [73u8 , 89u8 , 88u8 , 237u8 , 245u8 , 109u8 , 23u8 , 98u8 , 221u8 , 5u8 , 107u8 , 61u8 , 161u8 , 23u8 , 73u8 , 171u8 , 55u8 , 141u8 , 210u8 , 35u8 , 37u8 , 54u8 , 72u8 , 206u8 , 172u8 , 41u8 , 250u8 , 142u8 , 52u8 , 133u8 , 131u8 , 111u8 ,]) } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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< + #[doc = " Metadata of an item."] + pub fn item_metadata_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::ItemMetadata< + runtime_types::pallet_nfts::types::ItemMetadataDeposit< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "ItemMetadataOf", + Vec::new(), + [ + 73u8, 89u8, 88u8, 237u8, 245u8, 109u8, 23u8, 98u8, 221u8, + 5u8, 107u8, 61u8, 161u8, 23u8, 73u8, 171u8, 55u8, 141u8, + 210u8, 35u8, 37u8, 54u8, 72u8, 206u8, 172u8, 41u8, 250u8, + 142u8, 52u8, 133u8, 131u8, 111u8, + ], + ) + } + #[doc = " Attributes of a collection."] + pub fn attribute( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + ::core::option::Option<::core::primitive::u32>, + >, + _2 : impl :: std :: borrow :: Borrow < runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > >, + _3: impl ::std::borrow::Borrow< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::pallet_nfts::types::AttributeDeposit< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "Attribute" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_3 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [140u8 , 179u8 , 237u8 , 237u8 , 226u8 , 18u8 , 187u8 , 225u8 , 239u8 , 191u8 , 94u8 , 239u8 , 157u8 , 110u8 , 226u8 , 85u8 , 61u8 , 199u8 , 159u8 , 141u8 , 250u8 , 254u8 , 187u8 , 83u8 , 57u8 , 232u8 , 133u8 , 119u8 , 118u8 , 41u8 , 201u8 , 25u8 ,]) + } + #[doc = " Attributes of a collection."] + pub fn attribute_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::pallet_nfts::types::AttributeDeposit< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + >, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "Attribute", + Vec::new(), + [ + 140u8, 179u8, 237u8, 237u8, 226u8, 18u8, 187u8, 225u8, 239u8, + 191u8, 94u8, 239u8, 157u8, 110u8, 226u8, 85u8, 61u8, 199u8, + 159u8, 141u8, 250u8, 254u8, 187u8, 83u8, 57u8, 232u8, 133u8, + 119u8, 118u8, 41u8, 201u8, 25u8, + ], + ) + } + #[doc = " A price of an item."] + pub fn item_price_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + ::core::primitive::u128, + ::core::option::Option<::subxt::utils::AccountId32>, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemPriceOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [63u8 , 143u8 , 204u8 , 99u8 , 128u8 , 218u8 , 233u8 , 140u8 , 216u8 , 44u8 , 248u8 , 111u8 , 204u8 , 40u8 , 248u8 , 249u8 , 24u8 , 130u8 , 50u8 , 255u8 , 30u8 , 42u8 , 220u8 , 136u8 , 228u8 , 64u8 , 158u8 , 195u8 , 233u8 , 105u8 , 137u8 , 216u8 ,]) + } + #[doc = " A price of an item."] + pub fn item_price_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ( + ::core::primitive::u128, + ::core::option::Option<::subxt::utils::AccountId32>, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "ItemPriceOf", + Vec::new(), + [ + 63u8, 143u8, 204u8, 99u8, 128u8, 218u8, 233u8, 140u8, 216u8, + 44u8, 248u8, 111u8, 204u8, 40u8, 248u8, 249u8, 24u8, 130u8, + 50u8, 255u8, 30u8, 42u8, 220u8, 136u8, 228u8, 64u8, 158u8, + 195u8, 233u8, 105u8, 137u8, 216u8, + ], + ) + } + #[doc = " Item attribute approvals."] + pub fn item_attributes_approvals_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< ::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, - Debug, - )] - #[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::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemAttributesApprovalsOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [11u8 , 53u8 , 249u8 , 252u8 , 0u8 , 48u8 , 6u8 , 72u8 , 254u8 , 133u8 , 66u8 , 97u8 , 165u8 , 132u8 , 215u8 , 65u8 , 111u8 , 64u8 , 99u8 , 228u8 , 48u8 , 188u8 , 240u8 , 246u8 , 69u8 , 9u8 , 165u8 , 33u8 , 155u8 , 249u8 , 164u8 , 237u8 ,]) + } + #[doc = " Item attribute approvals."] + pub fn item_attributes_approvals_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< ::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, - Debug, - )] - #[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, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "ItemAttributesApprovalsOf", + Vec::new(), + [ + 11u8, 53u8, 249u8, 252u8, 0u8, 48u8, 6u8, 72u8, 254u8, 133u8, + 66u8, 97u8, 165u8, 132u8, 215u8, 65u8, 111u8, 64u8, 99u8, + 228u8, 48u8, 188u8, 240u8, 246u8, 69u8, 9u8, 165u8, 33u8, + 155u8, 249u8, 164u8, 237u8, + ], + ) + } + #[doc = " Stores the `CollectionId` that is going to be used for the next collection."] + #[doc = " This gets incremented whenever a new collection is created."] + pub fn next_collection_id( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "NextCollectionId", + vec![], + [ + 247u8, 80u8, 254u8, 162u8, 36u8, 233u8, 151u8, 211u8, 1u8, + 156u8, 102u8, 9u8, 21u8, 175u8, 224u8, 254u8, 255u8, 73u8, + 26u8, 42u8, 112u8, 107u8, 159u8, 108u8, 25u8, 22u8, 84u8, + 113u8, 108u8, 18u8, 253u8, 66u8, + ], + ) + } + #[doc = " Handles all the pending swaps."] + pub fn pending_swap_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::PendingSwap< + ::core::primitive::u32, + ::core::primitive::u32, + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "PendingSwapOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [230u8 , 132u8 , 138u8 , 201u8 , 217u8 , 119u8 , 35u8 , 191u8 , 184u8 , 202u8 , 9u8 , 3u8 , 29u8 , 246u8 , 228u8 , 210u8 , 195u8 , 141u8 , 179u8 , 160u8 , 130u8 , 40u8 , 121u8 , 133u8 , 209u8 , 218u8 , 64u8 , 18u8 , 36u8 , 62u8 , 1u8 , 203u8 ,]) + } + #[doc = " Handles all the pending swaps."] + pub fn pending_swap_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::PendingSwap< + ::core::primitive::u32, + ::core::primitive::u32, + runtime_types::pallet_nfts::types::PriceWithDirection< + ::core::primitive::u128, + >, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "PendingSwapOf", + Vec::new(), + [ + 230u8, 132u8, 138u8, 201u8, 217u8, 119u8, 35u8, 191u8, 184u8, + 202u8, 9u8, 3u8, 29u8, 246u8, 228u8, 210u8, 195u8, 141u8, + 179u8, 160u8, 130u8, 40u8, 121u8, 133u8, 209u8, 218u8, 64u8, + 18u8, 36u8, 62u8, 1u8, 203u8, + ], + ) + } + #[doc = " Config of a collection."] + pub fn collection_config_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionConfigOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 65u8, 20u8, 107u8, 140u8, 134u8, 116u8, 78u8, 79u8, 217u8, + 215u8, 30u8, 185u8, 18u8, 87u8, 127u8, 59u8, 152u8, 94u8, + 144u8, 138u8, 24u8, 9u8, 250u8, 225u8, 7u8, 176u8, 31u8, + 75u8, 171u8, 24u8, 132u8, 168u8, + ], + ) + } + #[doc = " Config of a collection."] + pub fn collection_config_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::CollectionConfig< + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "CollectionConfigOf", + Vec::new(), + [ + 65u8, 20u8, 107u8, 140u8, 134u8, 116u8, 78u8, 79u8, 217u8, + 215u8, 30u8, 185u8, 18u8, 87u8, 127u8, 59u8, 152u8, 94u8, + 144u8, 138u8, 24u8, 9u8, 250u8, 225u8, 7u8, 176u8, 31u8, + 75u8, 171u8, 24u8, 132u8, 168u8, + ], + ) + } + #[doc = " Config of an item."] + pub fn item_config_of( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::ItemConfig, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemConfigOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [13u8 , 64u8 , 28u8 , 168u8 , 121u8 , 178u8 , 11u8 , 143u8 , 107u8 , 185u8 , 148u8 , 54u8 , 212u8 , 83u8 , 251u8 , 165u8 , 19u8 , 222u8 , 130u8 , 90u8 , 111u8 , 144u8 , 146u8 , 255u8 , 68u8 , 66u8 , 225u8 , 62u8 , 89u8 , 33u8 , 200u8 , 120u8 ,]) + } + #[doc = " Config of an item."] + pub fn item_config_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nfts::types::ItemConfig, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Nfts", + "ItemConfigOf", + Vec::new(), + [ + 13u8, 64u8, 28u8, 168u8, 121u8, 178u8, 11u8, 143u8, 107u8, + 185u8, 148u8, 54u8, 212u8, 83u8, 251u8, 165u8, 19u8, 222u8, + 130u8, 90u8, 111u8, 144u8, 146u8, 255u8, 68u8, 66u8, 225u8, + 62u8, 89u8, 33u8, 200u8, 120u8, + ], + ) + } } } - pub mod pallet_elections_phragmen { + pub mod constants { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - 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, - }, + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The basic amount of funds that must be reserved for collection."] + pub fn collection_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "CollectionDeposit", + [ + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, + #[doc = " The basic amount of funds that must be reserved for an item."] + pub fn item_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "ItemDeposit", + [ + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - }, + #[doc = " The basic amount of funds that must be reserved when adding metadata to your item."] + pub fn metadata_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "MetadataDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved when adding an attribute to an item."] + pub fn attribute_deposit_base( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "AttributeDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The additional funds that must be reserved for the number of bytes store in metadata,"] + #[doc = " either \"normal\" metadata or attribute metadata."] + pub fn deposit_per_byte( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "DepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum length of data stored on-chain."] + pub fn string_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "StringLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The maximum length of an attribute key."] + pub fn key_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "KeyLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of an attribute value."] + pub fn value_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "ValueLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 approvals an item could have."] + pub fn approvals_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "ApprovalsLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 attributes approvals an item could have."] + pub fn item_attributes_approvals_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "ItemAttributesApprovalsLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 max number of tips a user could send."] + pub fn max_tips( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "MaxTips", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 max duration in blocks for deadlines."] + pub fn max_deadline_duration( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "MaxDeadlineDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Disables some of pallet's features."] + pub fn features( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::PalletFeature, + >, + > { + ::subxt::constants::StaticConstantAddress::new( + "Nfts", + "Features", + [ + 6u8, 4u8, 24u8, 100u8, 110u8, 86u8, 4u8, 252u8, 70u8, 43u8, + 169u8, 124u8, 204u8, 27u8, 252u8, 91u8, 99u8, 13u8, 149u8, + 202u8, 65u8, 211u8, 125u8, 108u8, 127u8, 4u8, 146u8, 163u8, + 41u8, 193u8, 25u8, 103u8, + ], + ) } } + } + } + pub mod transaction_storage { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -34993,13 +32911,8 @@ pub mod api { )] #[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), + pub struct Store { + pub data: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35010,10 +32923,9 @@ pub mod api { )] #[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, + pub struct Renew { + pub block: ::core::primitive::u32, + pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35024,291 +32936,452 @@ pub mod api { )] #[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 struct CheckProof { + pub proof: + runtime_types::sp_transaction_storage_proof::TransactionStorageProof, } - } - pub mod pallet_fast_unstake { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Register oneself for fast-unstake."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] - #[doc = "`staking::unbond`."] - #[doc = ""] - #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] - #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] - #[doc = "to be checked in further blocks."] - #[doc = ""] - #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] - #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] - #[doc = ""] - #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] - #[doc = "unstaked."] - #[doc = ""] - #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] - #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] - #[doc = "the chain's resources."] - register_fast_unstake, - #[codec(index = 1)] - #[doc = "Deregister oneself from the fast-unstake."] - #[doc = ""] - #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] - #[doc = ""] - #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] - #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] - #[doc = "`Staking::rebond`."] - deregister, - #[codec(index = 2)] - #[doc = "Control the operation of this pallet."] - #[doc = ""] - #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] - control { - unchecked_eras_to_check: ::core::primitive::u32, - }, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Index and store data off chain. Minimum data size is 1 bytes, maximum is"] + #[doc = "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`"] + #[doc = "is called. # "] + #[doc = "- n*log(n) of data size, as all data is pushed to an in-memory trie."] + #[doc = "Additionally contains a DB write."] + #[doc = "# "] + pub fn store( + &self, + data: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TransactionStorage", + "store", + Store { data }, + [ + 43u8, 208u8, 69u8, 186u8, 52u8, 197u8, 110u8, 180u8, 94u8, + 179u8, 108u8, 83u8, 54u8, 128u8, 76u8, 158u8, 198u8, 25u8, + 251u8, 31u8, 79u8, 228u8, 104u8, 120u8, 79u8, 187u8, 167u8, + 112u8, 133u8, 201u8, 208u8, 28u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The provided Controller account was not found."] - #[doc = ""] - #[doc = "This means that the given account is not bonded."] - NotController, - #[codec(index = 1)] - #[doc = "The bonded account has already been queued."] - AlreadyQueued, - #[codec(index = 2)] - #[doc = "The bonded account has active unlocking chunks."] - NotFullyBonded, - #[codec(index = 3)] - #[doc = "The provided un-staker is not in the `Queue`."] - NotQueued, - #[codec(index = 4)] - #[doc = "The provided un-staker is already in Head, and cannot deregister."] - AlreadyHead, - #[codec(index = 5)] - #[doc = "The call is not allowed at this point because the pallet is not active."] - CallNotAllowed, + #[doc = "Renew previously stored data. Parameters are the block number that contains"] + #[doc = "previous `store` or `renew` call and transaction index within that block."] + #[doc = "Transaction index is emitted in the `Stored` or `Renewed` event."] + #[doc = "Applies same fees as `store`."] + #[doc = "# "] + #[doc = "- Constant."] + #[doc = "# "] + pub fn renew( + &self, + block: ::core::primitive::u32, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TransactionStorage", + "renew", + Renew { block, index }, + [ + 72u8, 33u8, 43u8, 220u8, 210u8, 211u8, 107u8, 206u8, 156u8, + 0u8, 45u8, 233u8, 72u8, 154u8, 47u8, 176u8, 73u8, 116u8, + 93u8, 121u8, 197u8, 15u8, 166u8, 53u8, 101u8, 202u8, 21u8, + 208u8, 62u8, 115u8, 100u8, 66u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The events of this pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "A staker was unstaked."] - Unstaked { - stash: ::subxt::utils::AccountId32, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] - Slashed { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] - #[doc = "consequence."] - Errored { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 3)] - #[doc = "An internal error happened. Operations will be paused now."] - InternalError, - #[codec(index = 4)] - #[doc = "A batch was partially checked for the given eras, but the process did not finish."] - BatchChecked { - eras: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 5)] - #[doc = "A batch was terminated."] - #[doc = ""] - #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] - #[doc = "of the batch. A new batch will be created upon next block."] - BatchFinished, + #[doc = "Check storage proof for block number `block_number() - StoragePeriod`."] + #[doc = "If such block does not exist the proof is expected to be `None`."] + #[doc = "# "] + #[doc = "- Linear w.r.t the number of indexed transactions in the proved block for random"] + #[doc = " probing."] + #[doc = "There's a DB read for each transaction."] + #[doc = "Here we assume a maximum of 100 probed transactions."] + #[doc = "# "] + pub fn check_proof( + &self, + proof : runtime_types :: sp_transaction_storage_proof :: TransactionStorageProof, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "TransactionStorage", + "check_proof", + CheckProof { proof }, + [ + 102u8, 90u8, 179u8, 228u8, 197u8, 192u8, 53u8, 148u8, 7u8, + 97u8, 25u8, 243u8, 247u8, 161u8, 108u8, 197u8, 137u8, 219u8, + 154u8, 198u8, 4u8, 7u8, 47u8, 150u8, 156u8, 234u8, 20u8, + 51u8, 180u8, 134u8, 10u8, 19u8, + ], + ) } } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnstakeRequest { - pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - (::subxt::utils::AccountId32, ::core::primitive::u128), + } + #[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_storage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Stored data under specified index."] + pub struct Stored { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Stored { + const PALLET: &'static str = "TransactionStorage"; + const EVENT: &'static str = "Stored"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Renewed data under specified index."] + pub struct Renewed { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Renewed { + const PALLET: &'static str = "TransactionStorage"; + const EVENT: &'static str = "Renewed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Storage proof was successfully checked."] + pub struct ProofChecked; + impl ::subxt::events::StaticEvent for ProofChecked { + const PALLET: &'static str = "TransactionStorage"; + const EVENT: &'static str = "ProofChecked"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Collection of transaction metadata by block number."] + pub fn transactions( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_transaction_storage::TransactionInfo, >, - pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "Transactions", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 135u8, 204u8, 74u8, 229u8, 33u8, 97u8, 220u8, 224u8, 215u8, + 234u8, 152u8, 113u8, 14u8, 232u8, 161u8, 97u8, 235u8, 241u8, + 216u8, 115u8, 252u8, 15u8, 116u8, 110u8, 239u8, 105u8, 246u8, + 15u8, 154u8, 213u8, 163u8, 87u8, + ], + ) + } + #[doc = " Collection of transaction metadata by block number."] + pub fn transactions_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_transaction_storage::TransactionInfo, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "Transactions", + Vec::new(), + [ + 135u8, 204u8, 74u8, 229u8, 33u8, 97u8, 220u8, 224u8, 215u8, + 234u8, 152u8, 113u8, 14u8, 232u8, 161u8, 97u8, 235u8, 241u8, + 216u8, 115u8, 252u8, 15u8, 116u8, 110u8, 239u8, 105u8, 246u8, + 15u8, 154u8, 213u8, 163u8, 87u8, + ], + ) + } + #[doc = " Count indexed chunks for each block."] + pub fn chunk_count( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "ChunkCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 28u8, 45u8, 130u8, 130u8, 223u8, 108u8, 11u8, 246u8, 112u8, + 28u8, 132u8, 216u8, 71u8, 251u8, 141u8, 186u8, 179u8, 73u8, + 225u8, 87u8, 38u8, 182u8, 117u8, 213u8, 79u8, 107u8, 92u8, + 43u8, 167u8, 155u8, 213u8, 135u8, + ], + ) + } + #[doc = " Count indexed chunks for each block."] + pub fn chunk_count_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "ChunkCount", + Vec::new(), + [ + 28u8, 45u8, 130u8, 130u8, 223u8, 108u8, 11u8, 246u8, 112u8, + 28u8, 132u8, 216u8, 71u8, 251u8, 141u8, 186u8, 179u8, 73u8, + 225u8, 87u8, 38u8, 182u8, 117u8, 213u8, 79u8, 107u8, 92u8, + 43u8, 167u8, 155u8, 213u8, 135u8, + ], + ) + } + #[doc = " Storage fee per byte."] + pub fn byte_fee( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "ByteFee", + vec![], + [ + 175u8, 21u8, 92u8, 118u8, 196u8, 19u8, 87u8, 215u8, 167u8, + 205u8, 139u8, 138u8, 17u8, 164u8, 85u8, 191u8, 90u8, 206u8, + 35u8, 255u8, 50u8, 63u8, 0u8, 20u8, 222u8, 219u8, 77u8, + 220u8, 57u8, 143u8, 24u8, 185u8, + ], + ) + } + #[doc = " Storage fee per transaction."] + pub fn entry_fee( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "EntryFee", + vec![], + [ + 66u8, 20u8, 76u8, 16u8, 189u8, 156u8, 164u8, 45u8, 163u8, + 66u8, 121u8, 196u8, 103u8, 131u8, 30u8, 188u8, 166u8, 46u8, + 142u8, 113u8, 38u8, 138u8, 109u8, 33u8, 59u8, 61u8, 239u8, + 4u8, 135u8, 76u8, 105u8, 137u8, + ], + ) + } + #[doc = " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`"] + #[doc = " for block authoring."] + pub fn storage_period( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "StoragePeriod", + vec![], + [ + 10u8, 53u8, 101u8, 7u8, 28u8, 0u8, 14u8, 145u8, 138u8, 50u8, + 14u8, 182u8, 105u8, 25u8, 57u8, 166u8, 116u8, 232u8, 84u8, + 255u8, 71u8, 88u8, 85u8, 28u8, 21u8, 223u8, 119u8, 122u8, + 204u8, 44u8, 171u8, 118u8, + ], + ) + } + pub fn block_transactions( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_transaction_storage::TransactionInfo, >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "BlockTransactions", + vec![], + [ + 238u8, 72u8, 1u8, 41u8, 254u8, 6u8, 252u8, 199u8, 151u8, + 11u8, 246u8, 236u8, 68u8, 18u8, 147u8, 235u8, 60u8, 178u8, + 21u8, 120u8, 216u8, 53u8, 83u8, 29u8, 132u8, 91u8, 14u8, + 120u8, 238u8, 88u8, 160u8, 208u8, + ], + ) + } + #[doc = " Was the proof checked in this block?"] + pub fn proof_checked( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "TransactionStorage", + "ProofChecked", + vec![], + [ + 120u8, 50u8, 236u8, 167u8, 184u8, 166u8, 35u8, 208u8, 129u8, + 112u8, 151u8, 218u8, 123u8, 60u8, 71u8, 12u8, 210u8, 162u8, + 52u8, 7u8, 192u8, 197u8, 117u8, 101u8, 102u8, 179u8, 62u8, + 240u8, 146u8, 249u8, 190u8, 18u8, + ], + ) } } } - pub mod pallet_grandpa { + } + pub mod voter_list { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Rebag { + pub dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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< + ::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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "VoterList", + "put_in_front_of", + PutInFrontOf { lighter }, + [ + 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, + ], + ) } } + } + #[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, @@ -35318,15 +33391,15 @@ pub mod api { )] #[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>, + #[doc = "Moved an account from one bag to another."] + pub struct Rebagged { + pub who: ::subxt::utils::AccountId32, + pub from: ::core::primitive::u64, + pub to: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for Rebagged { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "Rebagged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -35337,783 +33410,487 @@ pub mod api { )] #[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 }, + #[doc = "Updated the score of some account to the given amount."] + pub struct ScoreUpdated { + pub who: ::subxt::utils::AccountId32, + pub new_score: ::core::primitive::u64, + } + impl ::subxt::events::StaticEvent for ScoreUpdated { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "ScoreUpdated"; } } - pub mod pallet_identity { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Identity pallet declaration."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a registrar to the system."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] - #[doc = ""] - #[doc = "- `account`: the account of the registrar."] - #[doc = ""] - #[doc = "Emits `RegistrarAdded` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] - #[doc = "- One storage mutation (codec `O(R)`)."] - #[doc = "- One event."] - #[doc = "# "] - add_registrar { - account: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 1)] - #[doc = "Set an account's identity information and reserve the appropriate deposit."] - #[doc = ""] - #[doc = "If the account already has identity information, the deposit is taken as part payment"] - #[doc = "for the new deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `info`: The identity information."] - #[doc = ""] - #[doc = "Emits `IdentitySet` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(X + X' + R)`"] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] - #[doc = " - where `R` judgements-count (registrar-count-bounded)"] - #[doc = "- One balance reserve operation."] - #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] - #[doc = "- One event."] - #[doc = "# "] - set_identity { - info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - }, - #[codec(index = 2)] - #[doc = "Set the sub-accounts of the sender."] - #[doc = ""] - #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] - #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "- `subs`: The identity's (new) sub-accounts."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(P + S)`"] - #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = "- At most one balance operations."] - #[doc = "- DB:"] - #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] - #[doc = " - One storage read (codec complexity `O(P)`)."] - #[doc = " - One storage write (codec complexity `O(S)`)."] - #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] - #[doc = "# "] - set_subs { - subs: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, - }, - #[codec(index = 3)] - #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] - #[doc = ""] - #[doc = "Payment: All reserved balances on the account are returned."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "Emits `IdentityCleared` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`"] - #[doc = " - where `R` registrar-count (governance-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] - #[doc = "- One balance-unreserve operation."] - #[doc = "- `2` storage reads and `S + 2` storage deletions."] - #[doc = "- One event."] - #[doc = "# "] - clear_identity, - #[codec(index = 4)] - #[doc = "Request a judgement from a registrar."] - #[doc = ""] - #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] - #[doc = "given."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] - #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] - #[doc = ""] - #[doc = "```nocompile"] - #[doc = "Self::registrars().get(reg_index).unwrap().fee"] - #[doc = "```"] - #[doc = ""] - #[doc = "Emits `JudgementRequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] - #[doc = "- One event."] - #[doc = "# "] - request_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - #[codec(compact)] - max_fee: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "Cancel a previous request."] - #[doc = ""] - #[doc = "Payment: A previously reserved deposit is returned on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] - #[doc = ""] - #[doc = "Emits `JudgementUnrequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- One storage mutation `O(R + X)`."] - #[doc = "- One event"] - #[doc = "# "] - cancel_request { reg_index: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "Set the fee required for a judgement to be requested from a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fee`: the new fee."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] - #[doc = "# "] - set_fee { - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "Change the account associated with a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `new`: the new account ID."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] - #[doc = "# "] - set_account_id { - #[codec(compact)] - index: ::core::primitive::u32, - new: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 8)] - #[doc = "Set the field information for a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fields`: the fields that the registrar concerns themselves with."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] - #[doc = "# "] - set_fields { - #[codec(compact)] - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - }, - #[codec(index = 9)] - #[doc = "Provide a judgement for an account's identity."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `reg_index`."] - #[doc = ""] - #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] - #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] - #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] - #[doc = ""] - #[doc = "Emits `JudgementGiven` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-transfer operation."] - #[doc = "- Up to one account-lookup operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] - #[doc = "- One event."] - #[doc = "# "] - provide_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - target: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - identity: ::subxt::utils::H256, - }, - #[codec(index = 10)] - #[doc = "Remove an account's identity and sub-account information and slash the deposits."] - #[doc = ""] - #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] - #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] - #[doc = "manually using `cancel_request`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - #[doc = ""] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] - #[doc = ""] - #[doc = "Emits `IdentityKilled` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- `S + 2` storage mutations."] - #[doc = "- One event."] - #[doc = "# "] - kill_identity { - target: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 11)] - #[doc = "Add the given account to the sender's subs."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - add_sub { - sub: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 12)] - #[doc = "Alter the associated name of the given sub-account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - rename_sub { - sub: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 13)] - #[doc = "Remove the given account from the sender's subs."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - remove_sub { - sub: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 14)] - #[doc = "Remove the sender as a sub-account."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender (*not* the original depositor)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "super-identity."] - #[doc = ""] - #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] - #[doc = "controller of an account is maliciously registered as a sub-account."] - quit_sub, + 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::StaticStorageAddress< + runtime_types::pallet_bags_list::list::Node, + ::subxt::storage::address::Yes, + (), + ::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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Too many subs-accounts."] - TooManySubAccounts, - #[codec(index = 1)] - #[doc = "Account isn't found."] - NotFound, - #[codec(index = 2)] - #[doc = "Account isn't named."] - NotNamed, - #[codec(index = 3)] - #[doc = "Empty index."] - EmptyIndex, - #[codec(index = 4)] - #[doc = "Fee is changed."] - FeeChanged, - #[codec(index = 5)] - #[doc = "No identity found."] - NoIdentity, - #[codec(index = 6)] - #[doc = "Sticky judgement."] - StickyJudgement, - #[codec(index = 7)] - #[doc = "Judgement given."] - JudgementGiven, - #[codec(index = 8)] - #[doc = "Invalid judgement."] - InvalidJudgement, - #[codec(index = 9)] - #[doc = "The index is invalid."] - InvalidIndex, - #[codec(index = 10)] - #[doc = "The target is invalid."] - InvalidTarget, - #[codec(index = 11)] - #[doc = "Too many additional fields."] - TooManyFields, - #[codec(index = 12)] - #[doc = "Maximum amount of registrars reached. Cannot add any more."] - TooManyRegistrars, - #[codec(index = 13)] - #[doc = "Account ID is already named."] - AlreadyClaimed, - #[codec(index = 14)] - #[doc = "Sender is not a sub-account."] - NotSub, - #[codec(index = 15)] - #[doc = "Sub-account isn't owned by sender."] - NotOwned, - #[codec(index = 16)] - #[doc = "The provided judgement was for a different identity."] - JudgementForDifferentIdentity, - #[codec(index = 17)] - #[doc = "Error that occurs when there is an issue paying for judgement."] - JudgementPaymentFailed, + #[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< + 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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 name was set or reset (which will remove all judgements)."] - IdentitySet { who: ::subxt::utils::AccountId32 }, - #[codec(index = 1)] - #[doc = "A name was cleared, and the given balance returned."] - IdentityCleared { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "A name was removed and the given balance slashed."] - IdentityKilled { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A judgement was asked from a registrar."] - JudgementRequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A judgement request was retracted."] - JudgementUnrequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "A judgement was given by a registrar."] - JudgementGiven { - target: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "A registrar was added."] - RegistrarAdded { - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 7)] - #[doc = "A sub-identity was added to an identity and the deposit paid."] - SubIdentityAdded { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "A sub-identity was removed from an identity and the deposit freed."] - SubIdentityRemoved { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] - #[doc = "main identity account to the sub-identity account."] - SubIdentityRevoked { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::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, + ], + ) + } + #[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::StaticStorageAddress< + runtime_types::pallet_bags_list::list::Bag, + ::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, + )], + [ + 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< + runtime_types::pallet_bags_list::list::Bag, + (), + (), + ::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, + ], + ) } } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BitFlags<_0>( - pub ::core::primitive::u64, - #[codec(skip)] pub ::core::marker::PhantomData<_0>, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Data { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Raw0([::core::primitive::u8; 0usize]), - #[codec(index = 2)] - Raw1([::core::primitive::u8; 1usize]), - #[codec(index = 3)] - Raw2([::core::primitive::u8; 2usize]), - #[codec(index = 4)] - Raw3([::core::primitive::u8; 3usize]), - #[codec(index = 5)] - Raw4([::core::primitive::u8; 4usize]), - #[codec(index = 6)] - Raw5([::core::primitive::u8; 5usize]), - #[codec(index = 7)] - Raw6([::core::primitive::u8; 6usize]), - #[codec(index = 8)] - Raw7([::core::primitive::u8; 7usize]), - #[codec(index = 9)] - Raw8([::core::primitive::u8; 8usize]), - #[codec(index = 10)] - Raw9([::core::primitive::u8; 9usize]), - #[codec(index = 11)] - Raw10([::core::primitive::u8; 10usize]), - #[codec(index = 12)] - Raw11([::core::primitive::u8; 11usize]), - #[codec(index = 13)] - Raw12([::core::primitive::u8; 12usize]), - #[codec(index = 14)] - Raw13([::core::primitive::u8; 13usize]), - #[codec(index = 15)] - Raw14([::core::primitive::u8; 14usize]), - #[codec(index = 16)] - Raw15([::core::primitive::u8; 15usize]), - #[codec(index = 17)] - Raw16([::core::primitive::u8; 16usize]), - #[codec(index = 18)] - Raw17([::core::primitive::u8; 17usize]), - #[codec(index = 19)] - Raw18([::core::primitive::u8; 18usize]), - #[codec(index = 20)] - Raw19([::core::primitive::u8; 19usize]), - #[codec(index = 21)] - Raw20([::core::primitive::u8; 20usize]), - #[codec(index = 22)] - Raw21([::core::primitive::u8; 21usize]), - #[codec(index = 23)] - Raw22([::core::primitive::u8; 22usize]), - #[codec(index = 24)] - Raw23([::core::primitive::u8; 23usize]), - #[codec(index = 25)] - Raw24([::core::primitive::u8; 24usize]), - #[codec(index = 26)] - Raw25([::core::primitive::u8; 25usize]), - #[codec(index = 27)] - Raw26([::core::primitive::u8; 26usize]), - #[codec(index = 28)] - Raw27([::core::primitive::u8; 27usize]), - #[codec(index = 29)] - Raw28([::core::primitive::u8; 28usize]), - #[codec(index = 30)] - Raw29([::core::primitive::u8; 29usize]), - #[codec(index = 31)] - Raw30([::core::primitive::u8; 30usize]), - #[codec(index = 32)] - Raw31([::core::primitive::u8; 31usize]), - #[codec(index = 33)] - Raw32([::core::primitive::u8; 32usize]), - #[codec(index = 34)] - BlakeTwo256([::core::primitive::u8; 32usize]), - #[codec(index = 35)] - Sha256([::core::primitive::u8; 32usize]), - #[codec(index = 36)] - Keccak256([::core::primitive::u8; 32usize]), - #[codec(index = 37)] - ShaThree256([::core::primitive::u8; 32usize]), + } + 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::StaticConstantAddress< + ::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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum IdentityField { - #[codec(index = 1)] - Display, - #[codec(index = 2)] - Legal, - #[codec(index = 4)] - Web, - #[codec(index = 8)] - Riot, - #[codec(index = 16)] - Email, - #[codec(index = 32)] - PgpFingerprint, - #[codec(index = 64)] - Image, - #[codec(index = 128)] - Twitter, + } + } + } + pub mod state_trie_migration { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ControlAutoMigration { + pub maybe_config: ::core::option::Option< + runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ContinueMigrate { + pub limits: + runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, + pub real_size_upper: ::core::primitive::u32, + pub witness_task: + runtime_types::pallet_state_trie_migration::pallet::MigrationTask, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MigrateCustomTop { + pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub witness_size: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MigrateCustomChild { + pub root: ::std::vec::Vec<::core::primitive::u8>, + pub child_keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub total_size: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetSignedMaxLimits { + pub limits: + runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceSetProgress { + pub progress_top: + runtime_types::pallet_state_trie_migration::pallet::Progress, + pub progress_child: + runtime_types::pallet_state_trie_migration::pallet::Progress, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Control the automatic migration."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be [`Config::ControlOrigin`]."] + pub fn control_auto_migration( + &self, + maybe_config : :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "control_auto_migration", + ControlAutoMigration { maybe_config }, + [ + 162u8, 96u8, 125u8, 236u8, 212u8, 188u8, 150u8, 69u8, 75u8, + 40u8, 116u8, 249u8, 80u8, 248u8, 180u8, 38u8, 167u8, 228u8, + 116u8, 130u8, 201u8, 59u8, 27u8, 3u8, 24u8, 209u8, 40u8, 0u8, + 238u8, 100u8, 173u8, 128u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentityInfo { - pub additional: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::pallet_identity::types::Data, - runtime_types::pallet_identity::types::Data, - )>, - pub display: runtime_types::pallet_identity::types::Data, - pub legal: runtime_types::pallet_identity::types::Data, - pub web: runtime_types::pallet_identity::types::Data, - pub riot: runtime_types::pallet_identity::types::Data, - pub email: runtime_types::pallet_identity::types::Data, - pub pgp_fingerprint: - ::core::option::Option<[::core::primitive::u8; 20usize]>, - pub image: runtime_types::pallet_identity::types::Data, - pub twitter: runtime_types::pallet_identity::types::Data, + #[doc = "Continue the migration for the given `limits`."] + #[doc = ""] + #[doc = "The dispatch origin of this call can be any signed account."] + #[doc = ""] + #[doc = "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,"] + #[doc = "Upon successful execution, the transaction fee is returned."] + #[doc = ""] + #[doc = "The (potentially over-estimated) of the byte length of all the data read must be"] + #[doc = "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing"] + #[doc = "that executing the current `MigrationTask` with the given `limits` will not exceed"] + #[doc = "`real_size_upper` bytes of read data."] + #[doc = ""] + #[doc = "The `witness_task` is merely a helper to prevent the caller from being slashed or"] + #[doc = "generally trigger a migration that they do not intend. This parameter is just a message"] + #[doc = "from caller, saying that they believed `witness_task` was the last state of the"] + #[doc = "migration, and they only wish for their transaction to do anything, if this assumption"] + #[doc = "holds. In case `witness_task` does not match, the transaction fails."] + #[doc = ""] + #[doc = "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the"] + #[doc = "recommended way of doing this is to pass a `limit` that only bounds `count`, as the"] + #[doc = "`size` limit can always be overwritten."] + pub fn continue_migrate( + &self, + limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, + real_size_upper: ::core::primitive::u32, + witness_task : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationTask, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "continue_migrate", + ContinueMigrate { + limits, + real_size_upper, + witness_task, + }, + [ + 13u8, 29u8, 35u8, 220u8, 79u8, 73u8, 159u8, 203u8, 121u8, + 137u8, 71u8, 108u8, 143u8, 95u8, 183u8, 127u8, 247u8, 1u8, + 63u8, 10u8, 69u8, 1u8, 196u8, 237u8, 175u8, 147u8, 252u8, + 168u8, 152u8, 217u8, 135u8, 109u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Judgement<_0> { - #[codec(index = 0)] - Unknown, - #[codec(index = 1)] - FeePaid(_0), - #[codec(index = 2)] - Reasonable, - #[codec(index = 3)] - KnownGood, - #[codec(index = 4)] - OutOfDate, - #[codec(index = 5)] - LowQuality, - #[codec(index = 6)] - Erroneous, + #[doc = "Migrate the list of top keys by iterating each of them one by one."] + #[doc = ""] + #[doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] + #[doc = "should only be used in case any keys are leftover due to a bug."] + pub fn migrate_custom_top( + &self, + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + witness_size: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "migrate_custom_top", + MigrateCustomTop { keys, witness_size }, + [ + 186u8, 249u8, 25u8, 216u8, 251u8, 100u8, 32u8, 31u8, 174u8, + 158u8, 202u8, 41u8, 18u8, 130u8, 187u8, 105u8, 83u8, 125u8, + 131u8, 212u8, 98u8, 120u8, 152u8, 207u8, 208u8, 1u8, 183u8, + 181u8, 169u8, 129u8, 163u8, 161u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegistrarInfo<_0, _1> { - pub account: _1, - pub fee: _0, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, + #[doc = "Migrate the list of child keys by iterating each of them one by one."] + #[doc = ""] + #[doc = "All of the given child keys must be present under one `child_root`."] + #[doc = ""] + #[doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] + #[doc = "should only be used in case any keys are leftover due to a bug."] + pub fn migrate_custom_child( + &self, + root: ::std::vec::Vec<::core::primitive::u8>, + child_keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + total_size: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "migrate_custom_child", + MigrateCustomChild { + root, + child_keys, + total_size, + }, + [ + 79u8, 93u8, 66u8, 136u8, 84u8, 153u8, 42u8, 104u8, 242u8, + 99u8, 225u8, 125u8, 233u8, 196u8, 151u8, 160u8, 164u8, 228u8, + 36u8, 186u8, 12u8, 247u8, 118u8, 12u8, 96u8, 218u8, 38u8, + 120u8, 33u8, 147u8, 2u8, 214u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Registration<_0> { - pub judgements: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - )>, - pub deposit: _0, - pub info: runtime_types::pallet_identity::types::IdentityInfo, + #[doc = "Set the maximum limit of the signed migration."] + pub fn set_signed_max_limits( + &self, + limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "set_signed_max_limits", + SetSignedMaxLimits { limits }, + [ + 95u8, 185u8, 123u8, 100u8, 144u8, 68u8, 67u8, 101u8, 101u8, + 137u8, 229u8, 154u8, 172u8, 128u8, 4u8, 164u8, 230u8, 63u8, + 196u8, 243u8, 118u8, 187u8, 220u8, 168u8, 73u8, 51u8, 254u8, + 233u8, 214u8, 238u8, 16u8, 227u8, + ], + ) + } + #[doc = "Forcefully set the progress the running migration."] + #[doc = ""] + #[doc = "This is only useful in one case: the next key to migrate is too big to be migrated with"] + #[doc = "a signed account, in a parachain context, and we simply want to skip it. A reasonable"] + #[doc = "example of this would be `:code:`, which is both very expensive to migrate, and commonly"] + #[doc = "used, so probably it is already migrated."] + #[doc = ""] + #[doc = "In case you mess things up, you can also, in principle, use this to reset the migration"] + #[doc = "process."] + pub fn force_set_progress( + &self, + progress_top : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, + progress_child : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "StateTrieMigration", + "force_set_progress", + ForceSetProgress { + progress_top, + progress_child, + }, + [ + 29u8, 180u8, 184u8, 136u8, 24u8, 192u8, 64u8, 95u8, 243u8, + 171u8, 184u8, 20u8, 62u8, 5u8, 1u8, 25u8, 12u8, 105u8, 137u8, + 81u8, 161u8, 39u8, 215u8, 180u8, 225u8, 24u8, 122u8, 124u8, + 122u8, 183u8, 141u8, 224u8, + ], + ) } } } - pub mod pallet_im_online { + #[doc = "Inner events of this pallet."] + pub type Event = runtime_types::pallet_state_trie_migration::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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "# "] # [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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - >, - )>, - }, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Given number of `(top, child)` keys were migrated respectively, with the given"] + #[doc = "`compute`."] + pub struct Migrated { + pub top: ::core::primitive::u32, + pub child: ::core::primitive::u32, + pub compute: + runtime_types::pallet_state_trie_migration::pallet::MigrationCompute, } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); - } + impl ::subxt::events::StaticEvent for Migrated { + const PALLET: &'static str = "StateTrieMigration"; + const EVENT: &'static str = "Migrated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36124,17 +33901,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedOpaqueNetworkState { - pub peer_id: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::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, - >, - >, + #[doc = "Some account got slashed by the given amount."] + pub struct Slashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "StateTrieMigration"; + const EVENT: &'static str = "Slashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36145,615 +33919,164 @@ pub mod api { )] #[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, + #[doc = "The auto migration task finished."] + pub struct AutoMigrationFinished; + impl ::subxt::events::StaticEvent for AutoMigrationFinished { + const PALLET: &'static str = "StateTrieMigration"; + const EVENT: &'static str = "AutoMigrationFinished"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Migration got halted due to an error or miss-configuration."] + pub struct Halted { + pub error: runtime_types::pallet_state_trie_migration::pallet::Error, + } + impl ::subxt::events::StaticEvent for Halted { + const PALLET: &'static str = "StateTrieMigration"; + const EVENT: &'static str = "Halted"; } } - pub mod pallet_indices { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - 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, ()>, - 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 }, + pub struct StorageApi; + impl StorageApi { + #[doc = " Migration progress."] + #[doc = ""] + #[doc = " This stores the snapshot of the last migrated keys. It can be set into motion and move"] + #[doc = " forward by any of the means provided by this pallet."] + pub fn migration_process( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_state_trie_migration::pallet::MigrationTask, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "StateTrieMigration", + "MigrationProcess", + vec![], + [ + 151u8, 248u8, 89u8, 241u8, 228u8, 249u8, 59u8, 199u8, 21u8, + 95u8, 182u8, 95u8, 205u8, 226u8, 119u8, 123u8, 241u8, 60u8, + 242u8, 52u8, 113u8, 101u8, 170u8, 140u8, 66u8, 66u8, 248u8, + 130u8, 130u8, 140u8, 206u8, 202u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The 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, + #[doc = " The limits that are imposed on automatic migrations."] + #[doc = ""] + #[doc = " If set to None, then no automatic migration happens."] pub fn auto_limits (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::StaticStorageAddress::new( + "StateTrieMigration", + "AutoLimits", + vec![], + [ + 214u8, 100u8, 160u8, 204u8, 4u8, 205u8, 205u8, 100u8, 60u8, + 127u8, 84u8, 243u8, 50u8, 164u8, 153u8, 1u8, 250u8, 123u8, + 134u8, 109u8, 115u8, 173u8, 102u8, 104u8, 18u8, 134u8, 43u8, + 3u8, 7u8, 26u8, 157u8, 39u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - }, + #[doc = " The maximum limits that the signed migration could use."] + #[doc = ""] + #[doc = " If not set, no signed submission is allowed."] + pub fn signed_migration_max_limits( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "StateTrieMigration", + "SignedMigrationMaxLimits", + vec![], + [ + 142u8, 87u8, 222u8, 135u8, 24u8, 133u8, 45u8, 18u8, 104u8, + 31u8, 147u8, 121u8, 17u8, 155u8, 64u8, 166u8, 209u8, 145u8, + 231u8, 65u8, 172u8, 104u8, 165u8, 19u8, 181u8, 240u8, 169u8, + 6u8, 249u8, 140u8, 63u8, 252u8, + ], + ) } } } - pub mod pallet_membership { + pub mod constants { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - }, - #[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, ()>, - }, - #[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, ()>, - add: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[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, ()>, - }, - #[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, ()>, - }, - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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 struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximal number of bytes that a key can have."] + #[doc = ""] + #[doc = " FRAME itself does not limit the key length."] + #[doc = " The concrete value must therefore depend on your storage usage."] + #[doc = " A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of"] + #[doc = " keys which are then hashed and concatenated, resulting in arbitrarily long keys."] + #[doc = ""] + #[doc = " Use the *state migration RPC* to retrieve the length of the longest key in your"] + #[doc = " storage: "] + #[doc = ""] + #[doc = " The migration will halt with a `Halted` event if this value is too small."] + #[doc = " Since there is no real penalty from over-estimating, it is advised to use a large"] + #[doc = " value. The default is 512 byte."] + #[doc = ""] + #[doc = " Some key lengths for reference:"] + #[doc = " - [`frame_support::storage::StorageValue`]: 32 byte"] + #[doc = " - [`frame_support::storage::StorageMap`]: 64 byte"] + #[doc = " - [`frame_support::storage::StorageDoubleMap`]: 96 byte"] + #[doc = ""] + #[doc = " For more info see"] + #[doc = " "] + pub fn max_key_len( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "StateTrieMigration", + "MaxKeyLen", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 pallet_multisig { + } + pub mod child_bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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], - }, - } + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36764,12 +34087,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Multisig<_0, _1, _2> { - pub when: runtime_types::pallet_multisig::Timepoint<_0>, - pub deposit: _1, - pub depositor: _2, - pub approvals: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<_2>, + pub struct ProposeCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub fee: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36780,492 +34108,380 @@ pub mod api { )] #[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 struct AcceptCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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. If"] - #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] - #[doc = "`NoMoreChunks` error from the staking system."] - unbond { - member_account: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - #[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, ()>, - 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, ()>, - nominator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[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, ()>, - nominator: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - state_toggler: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnassignCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AwardChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + pub fn add_child_bounty( + &self, + parent_bounty_id: ::core::primitive::u32, + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "add_child_bounty", + AddChildBounty { + parent_bounty_id, + value, + description, + }, + [ + 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, + 45u8, 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, + 203u8, 122u8, 77u8, 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, + 176u8, 102u8, 68u8, 188u8, 8u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DefensiveError { - #[codec(index = 0)] - NotEnoughSpaceInUnbondPool, - #[codec(index = 1)] - PoolNotFound, - #[codec(index = 2)] - RewardPoolNotFound, - #[codec(index = 3)] - SubPoolsNotFound, - #[codec(index = 4)] - BondedStashKilledPrematurely, + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + pub fn propose_curator( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + fee: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "propose_curator", + ProposeCurator { + parent_bounty_id, + child_bounty_id, + curator, + fee, + }, + [ + 147u8, 32u8, 161u8, 72u8, 92u8, 246u8, 250u8, 138u8, 98u8, + 84u8, 229u8, 228u8, 217u8, 128u8, 168u8, 20u8, 73u8, 113u8, + 55u8, 207u8, 117u8, 52u8, 9u8, 139u8, 223u8, 149u8, 48u8, + 1u8, 8u8, 82u8, 133u8, 112u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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 = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn accept_curator( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "accept_curator", + AcceptCurator { + parent_bounty_id, + child_bounty_id, + }, + [ + 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, + 228u8, 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, + 234u8, 142u8, 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, + 123u8, 125u8, 207u8, 10u8, 52u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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 = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn unassign_curator( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "unassign_curator", + UnassignCurator { + parent_bounty_id, + child_bounty_id, + }, + [ + 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, + 86u8, 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, + 89u8, 72u8, 203u8, 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, + 169u8, 118u8, 128u8, 13u8, 211u8, + ], + ) + } + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + pub fn award_child_bounty( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "award_child_bounty", + AwardChildBounty { + parent_bounty_id, + child_bounty_id, + beneficiary, + }, + [ + 214u8, 25u8, 53u8, 19u8, 146u8, 11u8, 223u8, 173u8, 22u8, + 235u8, 27u8, 57u8, 90u8, 171u8, 161u8, 45u8, 102u8, 37u8, + 171u8, 110u8, 215u8, 151u8, 46u8, 136u8, 93u8, 7u8, 254u8, + 112u8, 47u8, 42u8, 144u8, 140u8, + ], + ) + } + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn claim_child_bounty( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "claim_child_bounty", + ClaimChildBounty { + parent_bounty_id, + child_bounty_id, + }, + [ + 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, + 124u8, 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, + 234u8, 171u8, 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, + 107u8, 65u8, 92u8, 41u8, 45u8, + ], + ) + } + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn close_child_bounty( + &self, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ChildBounties", + "close_child_bounty", + CloseChildBounty { + parent_bounty_id, + child_bounty_id, + }, + [ + 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, + 240u8, 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, + 96u8, 142u8, 68u8, 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, + 213u8, 249u8, 222u8, 22u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_child_bounties::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -37275,11 +34491,14 @@ pub mod api { )] #[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, + #[doc = "A child-bounty is added."] + pub struct Added { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Added { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Added"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37290,13 +34509,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondedPoolInner { - pub points: ::core::primitive::u128, - pub state: runtime_types::pallet_nomination_pools::PoolState, - pub member_counter: ::core::primitive::u32, - pub roles: runtime_types::pallet_nomination_pools::PoolRoles< - ::subxt::utils::AccountId32, - >, + #[doc = "A child-bounty is awarded to a beneficiary."] + pub struct Awarded { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Awarded { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Awarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37307,13 +34528,16 @@ pub mod api { )] #[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, + #[doc = "A child-bounty is claimed by beneficiary."] + pub struct Claimed { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Claimed { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Claimed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37324,17 +34548,295 @@ pub mod api { )] #[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< + #[doc = "A child-bounty is cancelled."] + pub struct Canceled { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Canceled"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of total child bounties."] + pub fn child_bounty_count( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildBountyCount", + vec![], + [ + 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, + 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, + 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, + 93u8, 89u8, 26u8, 30u8, 95u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ParentChildBounties", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ParentChildBounties", + Vec::new(), + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildBounties", + 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, + ), + ], + [ + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_child_bounties::ChildBounty< + ::subxt::utils::AccountId32, ::core::primitive::u128, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildBounties", + Vec::new(), + [ + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, + ], + ) + } + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildBountyDescriptions", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, + ], + ) + } + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildBountyDescriptions", + Vec::new(), + [ + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, + ], + ) + } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildrenCuratorFees", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) + } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ChildBounties", + "ChildrenCuratorFees", + Vec::new(), + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of child bounties that can be added to a parent bounty."] + pub fn max_active_child_bounty_count( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ChildBounties", + "MaxActiveChildBountyCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 value for a child-bounty."] + pub fn child_bounty_value_minimum( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ChildBounties", + "ChildBountyValueMinimum", + [ + 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 referenda { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -37344,13 +34846,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolRoles<_0> { - pub depositor: _0, - pub root: ::core::option::Option<_0>, - pub nominator: ::core::option::Option<_0>, - pub state_toggler: ::core::option::Option<_0>, + pub struct Submit { + pub proposal_origin: + ::std::boxed::Box, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + pub enactment_moment: + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37359,15 +34867,11 @@ pub mod api { )] #[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, + pub struct PlaceDecisionDeposit { + pub index: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37376,13 +34880,11 @@ pub mod api { )] #[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, + pub struct RefundDecisionDeposit { + pub index: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37391,15 +34893,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SubPools { - pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, - pub with_era: - runtime_types::sp_core::bounded::bounded_btree_map::BoundedBTreeMap< - ::core::primitive::u32, - runtime_types::pallet_nomination_pools::UnbondPool, - >, + pub struct Cancel { + pub index: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37408,133 +34906,37 @@ pub mod api { )] #[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 struct Kill { + pub index: ::core::primitive::u32, } - } - 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, - Debug, - )] - #[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>, - }, - } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NudgeReferendum { + pub index: ::core::primitive::u32, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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 :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OneFewerDeciding { + pub track: ::core::primitive::u16, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -37543,313 +34945,210 @@ pub mod api { )] #[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 struct RefundSubmissionDeposit { + pub index: ::core::primitive::u32, } - } - pub mod pallet_proxy { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] - #[doc = "`add_proxy`."] - #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - proxy { - real: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[codec(index = 1)] - #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] - #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - add_proxy { - delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Unregister a proxy account for the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] - #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] - remove_proxy { - delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Unregister all proxy accounts for the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] - #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] - remove_proxies, - #[codec(index = 4)] - #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] - #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] - #[doc = ""] - #[doc = "Requires a `Signed` origin."] - #[doc = ""] - #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] - #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] - #[doc = "allow for maximum flexibility."] - #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] - #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] - #[doc = "want to use `0`."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - #[doc = ""] - #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] - #[doc = "same sender, with the same parameters."] - #[doc = ""] - #[doc = "Fails if there are insufficient funds to pay for deposit."] - create_pure { - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - }, - #[codec(index = 5)] - #[doc = "Removes a previously spawned pure proxy."] - #[doc = ""] - #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] - #[doc = "inaccessible."] - #[doc = ""] - #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] - #[doc = "`pure` with corresponding parameters."] - #[doc = ""] - #[doc = "- `spawner`: The account that originally called `pure` to create this account."] - #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] - #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] - #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] - #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] - #[doc = ""] - #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] - #[doc = "account whose `pure` call has corresponding parameters."] - kill_pure { - spawner: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - index: ::core::primitive::u16, - #[codec(compact)] - height: ::core::primitive::u32, - #[codec(compact)] - ext_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Publish the hash of a proxy-call that will be made in the future."] - #[doc = ""] - #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] - #[doc = "if the delay associated with the proxy relationship is greater than zero."] - #[doc = ""] - #[doc = "No more than `MaxPending` announcements may be made at any one time."] - #[doc = ""] - #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] - #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - announce { - real: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 7)] - #[doc = "Remove a given announcement."] - #[doc = ""] - #[doc = "May be called by a proxy account to remove a call they previously announced and return"] - #[doc = "the deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - remove_announcement { - real: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 8)] - #[doc = "Remove the given announcement of a delegate."] - #[doc = ""] - #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] - #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `delegate`: The account that previously announced the call."] - #[doc = "- `call_hash`: The hash of the call to be made."] - reject_announcement { - delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 9)] - #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] - #[doc = "`add_proxy`."] - #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - proxy_announced { - delegate: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - real: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - force_proxy_type: ::core::option::Option< - runtime_types::polkadot_runtime::ProxyType, - >, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + pub fn submit( + &self, + proposal_origin: runtime_types::kitchensink_runtime::OriginCaller, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "submit", + Submit { + proposal_origin: ::std::boxed::Box::new(proposal_origin), + proposal, + enactment_moment, + }, + [ + 91u8, 158u8, 209u8, 182u8, 19u8, 184u8, 252u8, 30u8, 200u8, + 62u8, 92u8, 254u8, 200u8, 245u8, 134u8, 143u8, 135u8, 67u8, + 95u8, 107u8, 115u8, 109u8, 12u8, 48u8, 111u8, 239u8, 84u8, + 255u8, 23u8, 26u8, 140u8, 187u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "There are too many proxies registered or too many announcements pending."] - TooMany, - #[codec(index = 1)] - #[doc = "Proxy registration not found."] - NotFound, - #[codec(index = 2)] - #[doc = "Sender is not a proxy of the account to be proxied."] - NotProxy, - #[codec(index = 3)] - #[doc = "A call which is incompatible with the proxy type's filter was attempted."] - Unproxyable, - #[codec(index = 4)] - #[doc = "Account is already a proxy."] - Duplicate, - #[codec(index = 5)] - #[doc = "Call may not be made by proxy because it may escalate its privileges."] - NoPermission, - #[codec(index = 6)] - #[doc = "Announcement, if made at all, was made too recently."] - Unannounced, - #[codec(index = 7)] - #[doc = "Cannot add self as proxy."] - NoSelfProxy, + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "place_decision_deposit", + PlaceDecisionDeposit { index }, + [ + 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, + 232u8, 119u8, 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, + 145u8, 159u8, 84u8, 111u8, 36u8, 4u8, 206u8, 5u8, 139u8, + 231u8, 11u8, 231u8, 6u8, 30u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A proxy was executed correctly, with the given."] - ProxyExecuted { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - PureCreated { - pure: ::subxt::utils::AccountId32, - who: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - disambiguation_index: ::core::primitive::u16, - }, - #[codec(index = 2)] - #[doc = "An announcement was placed to make a call in the future."] - Announced { - real: ::subxt::utils::AccountId32, - proxy: ::subxt::utils::AccountId32, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 3)] - #[doc = "A proxy was added."] - ProxyAdded { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A proxy was removed."] - ProxyRemoved { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::polkadot_runtime::ProxyType, - delay: ::core::primitive::u32, - }, + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "refund_decision_deposit", + RefundDecisionDeposit { index }, + [ + 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, + 93u8, 19u8, 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, + 244u8, 48u8, 202u8, 223u8, 201u8, 130u8, 112u8, 167u8, 29u8, + 207u8, 112u8, 181u8, 43u8, 93u8, + ], + ) + } + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + pub fn cancel( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "cancel", + Cancel { index }, + [ + 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, + 235u8, 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, + 223u8, 50u8, 245u8, 101u8, 97u8, 39u8, 226u8, 4u8, 196u8, + 16u8, 66u8, 177u8, 178u8, 252u8, + ], + ) + } + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "kill", + Kill { index }, + [ + 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, + 141u8, 104u8, 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, + 84u8, 178u8, 246u8, 26u8, 113u8, 224u8, 157u8, 94u8, 16u8, + 14u8, 158u8, 80u8, 148u8, 198u8, + ], + ) + } + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub fn nudge_referendum( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "nudge_referendum", + NudgeReferendum { index }, + [ + 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, + 170u8, 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, + 7u8, 230u8, 243u8, 15u8, 206u8, 114u8, 8u8, 128u8, 46u8, + 150u8, 114u8, 241u8, 112u8, 97u8, + ], + ) + } + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub fn one_fewer_deciding( + &self, + track: ::core::primitive::u16, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "one_fewer_deciding", + OneFewerDeciding { track }, + [ + 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, + 110u8, 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, + 16u8, 143u8, 233u8, 137u8, 247u8, 138u8, 96u8, 32u8, 223u8, + 149u8, 52u8, 214u8, 195u8, + ], + ) + } + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + pub fn refund_submission_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Referenda", + "refund_submission_deposit", + RefundSubmissionDeposit { index }, + [ + 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, + 92u8, 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, + 23u8, 132u8, 89u8, 19u8, 81u8, 238u8, 133u8, 243u8, 56u8, + 70u8, 143u8, 43u8, 176u8, 83u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_referenda::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -37859,10 +35158,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announcement<_0, _1, _2> { - pub real: _0, - pub call_hash: _1, - pub height: _2, + #[doc = "A referendum has been submitted."] + pub struct Submitted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + } + impl ::subxt::events::StaticEvent for Submitted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Submitted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -37873,180 +35179,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyDefinition<_0, _1, _2> { - pub delegate: _0, - pub proxy_type: _1, - pub delay: _2, + #[doc = "The decision deposit has been placed."] + pub struct DecisionDepositPlaced { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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]>, - }, - } + impl ::subxt::events::StaticEvent for DecisionDepositPlaced { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositPlaced"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38057,808 +35198,971 @@ pub mod api { )] #[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>, + #[doc = "The decision deposit has been refunded."] + pub struct DecisionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - } - pub 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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::polkadot_runtime::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, + impl ::subxt::events::StaticEvent for DecisionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionDepositRefunded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A deposit has been slashaed."] + pub struct DepositSlashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DepositSlashed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DepositSlashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has moved into the deciding phase."] + pub struct DecisionStarted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for DecisionStarted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "DecisionStarted"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ConfirmStarted { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ConfirmStarted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmStarted"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ConfirmAborted { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ConfirmAborted { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "ConfirmAborted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + pub struct Confirmed { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for Confirmed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Confirmed"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been approved and its proposal has been scheduled."] + pub struct Approved { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Approved { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Approved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal has been rejected by referendum."] + pub struct Rejected { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for Rejected { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Rejected"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been timed out without being decided."] + pub struct TimedOut { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for TimedOut { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "TimedOut"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for Cancelled { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Cancelled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been killed."] + pub struct Killed { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + } + impl ::subxt::events::StaticEvent for Killed { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "Killed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The submission deposit has been refunded."] + pub struct SubmissionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { + const PALLET: &'static str = "Referenda"; + const EVENT: &'static str = "SubmissionDepositRefunded"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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 = " Information concerning any given referendum."] + pub fn referendum_info_for( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::kitchensink_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "ReferendumInfoFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 25u8, 217u8, 0u8, 39u8, 178u8, 83u8, 21u8, 62u8, 224u8, + 149u8, 196u8, 86u8, 187u8, 173u8, 75u8, 17u8, 234u8, 126u8, + 202u8, 44u8, 196u8, 253u8, 214u8, 158u8, 119u8, 128u8, 69u8, + 239u8, 178u8, 51u8, 117u8, 16u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = " Information concerning any given referendum."] + pub fn referendum_info_for_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::kitchensink_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_conviction_voting::types::Tally< + ::core::primitive::u128, + >, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "ReferendumInfoFor", + Vec::new(), + [ + 25u8, 217u8, 0u8, 39u8, 178u8, 83u8, 21u8, 62u8, 224u8, + 149u8, 196u8, 86u8, 187u8, 173u8, 75u8, 17u8, 234u8, 126u8, + 202u8, 44u8, 196u8, 253u8, 214u8, 158u8, 119u8, 128u8, 69u8, + 239u8, 178u8, 51u8, 117u8, 16u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u128, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "TrackQueue", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, + 117u8, 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, + 244u8, 117u8, 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, + 202u8, 109u8, 39u8, 253u8, 240u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u128, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "TrackQueue", + Vec::new(), + [ + 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, + 117u8, 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, + 244u8, 117u8, 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, + 202u8, 109u8, 39u8, 253u8, 240u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "DecidingCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, + 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, + 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, + 234u8, 177u8, 223u8, 63u8, 150u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Referenda", + "DecidingCount", + Vec::new(), + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, + 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, + 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, + 234u8, 177u8, 223u8, 63u8, 150u8, + ], + ) } } } - pub mod pallet_staking { + pub mod constants { 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - (), - >, - #[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. In that case, [`Call::withdraw_unbonded`] need"] - #[doc = "to be called first 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, - (), - >, - >, - }, - #[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, - (), - >, - }, - #[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, + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn submission_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Referenda", + "SubmissionDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum size of the referendum queue for a single track."] + pub fn max_queued( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Referenda", + "MaxQueued", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The number of blocks after submission that a referendum must begin being decided by."] + #[doc = " Once this passes, then anyone may cancel the referendum."] + pub fn undeciding_timeout( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Referenda", + "UndecidingTimeout", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] + #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] + #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] + pub fn alarm_interval( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Referenda", + "AlarmInterval", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " Information concerning the different referendum tracks."] + pub fn tracks( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + ::std::vec::Vec<( + ::core::primitive::u16, + runtime_types::pallet_referenda::types::TrackInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + )>, + > { + ::subxt::constants::StaticConstantAddress::new( + "Referenda", + "Tracks", + [ + 71u8, 253u8, 246u8, 54u8, 168u8, 190u8, 182u8, 15u8, 207u8, + 26u8, 50u8, 138u8, 212u8, 124u8, 13u8, 203u8, 27u8, 35u8, + 224u8, 1u8, 176u8, 192u8, 197u8, 220u8, 147u8, 94u8, 196u8, + 150u8, 125u8, 23u8, 48u8, 255u8, + ], + ) + } + } + } + } + pub mod remark { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Store { + pub remark: ::std::vec::Vec<::core::primitive::u8>, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Index and store data off chain."] + pub fn store( + &self, + remark: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Remark", + "store", + Store { remark }, + [ + 55u8, 111u8, 88u8, 127u8, 252u8, 241u8, 51u8, 152u8, 154u8, + 138u8, 228u8, 171u8, 59u8, 29u8, 135u8, 236u8, 227u8, 108u8, + 169u8, 205u8, 25u8, 96u8, 118u8, 73u8, 105u8, 132u8, 150u8, + 148u8, 94u8, 230u8, 66u8, 73u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_remark::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Stored data off chain."] + pub struct Stored { + pub sender: ::subxt::utils::AccountId32, + pub content_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Stored { + const PALLET: &'static str = "Remark"; + const EVENT: &'static str = "Stored"; + } + } + } + pub mod root_testing { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FillBlock { + pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "A dispatch that will fill the block weight up to the given ratio."] + pub fn fill_block( + &self, + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RootTesting", + "fill_block", + FillBlock { ratio }, + [ + 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, + 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, + 191u8, 145u8, 130u8, 245u8, 177u8, 201u8, 169u8, 129u8, + 173u8, 105u8, 88u8, 45u8, 136u8, 191u8, + ], + ) + } + } + } + } + pub mod conviction_voting { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + #[codec(compact)] + pub poll_index: ::core::primitive::u32, + pub vote: runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegate { + pub class: ::core::primitive::u16, + pub to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub conviction: + runtime_types::pallet_conviction_voting::conviction::Conviction, + pub balance: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Undelegate { + pub class: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unlock { + pub class: ::core::primitive::u16, + pub target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveVote { + pub class: ::core::option::Option<::core::primitive::u16>, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 class: ::core::primitive::u16, + pub index: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `poll_index`: The index of the poll to vote for."] + #[doc = "- `vote`: The vote configuration."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] + pub fn vote( + &self, + poll_index: ::core::primitive::u32, + vote: runtime_types::pallet_conviction_voting::vote::AccountVote< + ::core::primitive::u128, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "vote", + Vote { poll_index, vote }, + [ + 255u8, 8u8, 191u8, 166u8, 7u8, 48u8, 227u8, 0u8, 34u8, 109u8, + 3u8, 172u8, 168u8, 37u8, 220u8, 229u8, 88u8, 61u8, 117u8, + 212u8, 131u8, 124u8, 74u8, 60u8, 83u8, 62u8, 193u8, 66u8, + 162u8, 121u8, 76u8, 180u8, + ], + ) + } + #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] + #[doc = "particular class of polls."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] + #[doc = " to this function are required."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] + #[doc = ""] + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn delegate( + &self, + class: ::core::primitive::u16, + to: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + conviction : runtime_types :: pallet_conviction_voting :: conviction :: Conviction, + balance: ::core::primitive::u128, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "delegate", + Delegate { + class, + to, + conviction, + balance, }, - #[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>, + [ + 171u8, 252u8, 251u8, 36u8, 176u8, 75u8, 66u8, 106u8, 199u8, + 126u8, 94u8, 221u8, 146u8, 1u8, 172u8, 60u8, 160u8, 245u8, + 47u8, 98u8, 183u8, 66u8, 96u8, 19u8, 129u8, 163u8, 118u8, + 216u8, 54u8, 109u8, 190u8, 103u8, + ], + ) + } + #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] + #[doc = ""] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued has passed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "- `class`: The class of polls to remove the delegation from."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] + #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] + pub fn undelegate( + &self, + class: ::core::primitive::u16, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "undelegate", + Undelegate { class }, + [ + 0u8, 244u8, 151u8, 108u8, 96u8, 240u8, 126u8, 247u8, 29u8, + 33u8, 25u8, 34u8, 253u8, 207u8, 107u8, 227u8, 139u8, 64u8, + 184u8, 112u8, 246u8, 81u8, 201u8, 41u8, 32u8, 201u8, 194u8, + 201u8, 4u8, 170u8, 40u8, 83u8, + ], + ) + } + #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] + #[doc = "class."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `class`: The class of polls to unlock."] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub fn unlock( + &self, + class: ::core::primitive::u16, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "unlock", + Unlock { class, target }, + [ + 165u8, 17u8, 167u8, 109u8, 53u8, 26u8, 241u8, 236u8, 105u8, + 144u8, 12u8, 61u8, 100u8, 52u8, 54u8, 88u8, 203u8, 255u8, + 63u8, 215u8, 137u8, 156u8, 112u8, 243u8, 79u8, 136u8, 147u8, + 185u8, 102u8, 0u8, 57u8, 223u8, + ], + ) + } + #[doc = "Remove a vote for a poll."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the poll was cancelled, or"] + #[doc = "- the poll is ongoing, or"] + #[doc = "- the poll has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] + #[doc = ""] + #[doc = "If, however, the poll has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for poll `index`."] + #[doc = ""] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] + #[doc = " which have finished or are cancelled, this must be `Some`."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_vote( + &self, + class: ::core::option::Option<::core::primitive::u16>, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "remove_vote", + RemoveVote { class, index }, + [ + 151u8, 255u8, 135u8, 195u8, 137u8, 27u8, 116u8, 193u8, 245u8, + 78u8, 38u8, 130u8, 233u8, 28u8, 235u8, 50u8, 144u8, 191u8, + 39u8, 68u8, 17u8, 214u8, 25u8, 2u8, 120u8, 14u8, 219u8, + 205u8, 59u8, 192u8, 125u8, 142u8, + ], + ) + } + #[doc = "Remove a vote for a poll."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the poll was cancelled, because the voter lost the poll or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] + #[doc = " `index`."] + #[doc = "- `index`: The index of poll of the vote to be removed."] + #[doc = "- `class`: The class of the poll."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_other_vote( + &self, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + class: ::core::primitive::u16, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "ConvictionVoting", + "remove_other_vote", + RemoveOtherVote { + target, + class, + index, }, - #[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::SlashCancelOrigin`."] - #[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, - (), - >, - >, - }, - #[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, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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 = "One staker (and potentially its nominators) has been slashed by the given amount."] - Slashed { - staker: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "An old slashing report from a prior era was discarded because it could"] - #[doc = "not be processed."] - OldSlashingReportDiscarded { - session_index: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A new set of stakers was elected."] - StakersElected, - #[codec(index = 5)] - #[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 = 6)] - #[doc = "An account has unbonded this amount."] - Unbonded { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] - #[doc = "from the unlocking queue."] - Withdrawn { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "A nominator has been kicked from a validator."] - Kicked { - nominator: ::subxt::utils::AccountId32, - stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 9)] - #[doc = "The election failed. No new era is planned."] - StakingElectionFailed, - #[codec(index = 10)] - #[doc = "An account has stopped participating as either a validator or nominator."] - Chilled { stash: ::subxt::utils::AccountId32 }, - #[codec(index = 11)] - #[doc = "The stakers' rewards are getting paid."] - PayoutStarted { - era_index: ::core::primitive::u32, - validator_stash: ::subxt::utils::AccountId32, - }, - #[codec(index = 12)] - #[doc = "A validator has set their preferences."] - ValidatorPrefsSet { - stash: ::subxt::utils::AccountId32, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - }, - } - } - } - 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, - Debug, - )] - #[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, - Debug, - )] - #[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, + [ + 9u8, 219u8, 232u8, 254u8, 85u8, 1u8, 189u8, 186u8, 87u8, + 95u8, 27u8, 248u8, 14u8, 165u8, 86u8, 167u8, 230u8, 18u8, + 225u8, 151u8, 105u8, 169u8, 84u8, 254u8, 201u8, 122u8, 157u8, + 189u8, 40u8, 29u8, 107u8, 21u8, + ], + ) } } + } + #[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_conviction_voting::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -38868,73 +36172,14 @@ pub mod api { )] #[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, - Debug, - )] - #[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, - Debug, - )] - #[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< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] + pub struct Delegated( + pub ::subxt::utils::AccountId32, + pub ::subxt::utils::AccountId32, + ); + impl ::subxt::events::StaticEvent for Delegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Delegated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -38945,69 +36190,193 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominations { - pub targets: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - pub submitted_in: ::core::primitive::u32, - pub suppressed: ::core::primitive::bool, + #[doc = "An \\[account\\] has cancelled a previous delegation operation."] + pub struct Undelegated(pub ::subxt::utils::AccountId32); + impl ::subxt::events::StaticEvent for Undelegated { + const PALLET: &'static str = "ConvictionVoting"; + const EVENT: &'static str = "Undelegated"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V1_0_0Ancient, - #[codec(index = 1)] - V2_0_0, - #[codec(index = 2)] - V3_0_0, - #[codec(index = 3)] - V4_0_0, - #[codec(index = 4)] - V5_0_0, - #[codec(index = 5)] - V6_0_0, - #[codec(index = 6)] - V7_0_0, - #[codec(index = 7)] - V8_0_0, - #[codec(index = 8)] - V9_0_0, - #[codec(index = 9)] - V10_0_0, - #[codec(index = 10)] - V11_0_0, - #[codec(index = 11)] - V12_0_0, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_conviction_voting::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ConvictionVoting", + "VotingFor", + 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, + ), + ], + [ + 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, + 73u8, 153u8, 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, + 57u8, 121u8, 24u8, 241u8, 161u8, 150u8, 252u8, 133u8, 65u8, + 232u8, 21u8, 28u8, 25u8, 75u8, + ], + ) + } + #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] + #[doc = " number of votes that we have recorded."] + pub fn voting_for_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_conviction_voting::vote::Voting< + ::core::primitive::u128, + ::subxt::utils::AccountId32, + ::core::primitive::u32, + ::core::primitive::u32, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ConvictionVoting", + "VotingFor", + Vec::new(), + [ + 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, + 73u8, 153u8, 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, + 57u8, 121u8, 24u8, 241u8, 161u8, 150u8, 252u8, 133u8, 65u8, + 232u8, 21u8, 28u8, 25u8, 75u8, + ], + ) + } + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u16, + ::core::primitive::u128, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ConvictionVoting", + "ClassLocksFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, + 178u8, 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, + 42u8, 207u8, 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, + 56u8, 243u8, 117u8, 228u8, 145u8, + ], + ) + } + #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] + #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] + #[doc = " this list."] + pub fn class_locks_for_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u16, + ::core::primitive::u128, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "ConvictionVoting", + "ClassLocksFor", + Vec::new(), + [ + 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, + 178u8, 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, + 42u8, 207u8, 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, + 56u8, 243u8, 117u8, 228u8, 145u8, + ], + ) + } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RewardDestination<_0> { - #[codec(index = 0)] - Staked, - #[codec(index = 1)] - Stash, - #[codec(index = 2)] - Controller, - #[codec(index = 3)] - Account(_0), - #[codec(index = 4)] - None, + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum number of concurrent votes an account may have."] + #[doc = ""] + #[doc = " Also used to compute weight, an overly large value can lead to extrinsics with large"] + #[doc = " weight estimation: see `delegate` for instance."] + pub fn max_votes( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ConvictionVoting", + "MaxVotes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The minimum period of vote locking."] + #[doc = ""] + #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] + #[doc = " those successful voters are locked into the consequences that their votes entail."] + pub fn vote_locking_period( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ConvictionVoting", + "VoteLockingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } } + } + } + pub mod whitelist { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39017,19 +36386,8 @@ pub mod api { )] #[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 struct WhitelistCall { + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39040,12 +36398,8 @@ pub mod api { )] #[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 struct RemoveWhitelistedCall { + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39056,11 +36410,10 @@ pub mod api { )] #[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 struct DispatchWhitelistedCall { + pub call_hash: ::subxt::utils::H256, + pub call_encoded_len: ::core::primitive::u32, + pub call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39071,271 +36424,92 @@ pub mod api { )] #[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 struct DispatchWhitelistedCallWithPreimage { + pub call: + ::std::boxed::Box, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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 struct TransactionApi; + impl TransactionApi { + pub fn whitelist_call( + &self, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Whitelist", + "whitelist_call", + WhitelistCall { call_hash }, + [ + 21u8, 246u8, 244u8, 176u8, 163u8, 80u8, 45u8, 191u8, 3u8, + 180u8, 150u8, 66u8, 168u8, 3u8, 196u8, 129u8, 177u8, 104u8, + 48u8, 5u8, 201u8, 208u8, 226u8, 76u8, 148u8, 116u8, 206u8, + 119u8, 145u8, 78u8, 86u8, 41u8, + ], + ) } - } - } - pub mod pallet_tips { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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, ()>, - }, - #[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, ()>, - #[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 }, + pub fn remove_whitelisted_call( + &self, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Whitelist", + "remove_whitelisted_call", + RemoveWhitelistedCall { call_hash }, + [ + 142u8, 227u8, 198u8, 110u8, 90u8, 127u8, 218u8, 117u8, 181u8, + 209u8, 210u8, 86u8, 133u8, 95u8, 244u8, 64u8, 50u8, 240u8, + 220u8, 50u8, 212u8, 106u8, 4u8, 189u8, 2u8, 72u8, 96u8, 52u8, + 187u8, 140u8, 144u8, 76u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The 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, + pub fn dispatch_whitelisted_call( + &self, + call_hash: ::subxt::utils::H256, + call_encoded_len: ::core::primitive::u32, + call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Whitelist", + "dispatch_whitelisted_call", + DispatchWhitelistedCall { + call_hash, + call_encoded_len, + call_weight_witness, + }, + [ + 243u8, 130u8, 216u8, 251u8, 131u8, 220u8, 75u8, 210u8, 203u8, + 137u8, 174u8, 95u8, 134u8, 252u8, 76u8, 33u8, 230u8, 185u8, + 125u8, 15u8, 200u8, 85u8, 46u8, 43u8, 34u8, 205u8, 245u8, + 85u8, 46u8, 78u8, 245u8, 135u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - }, + pub fn dispatch_whitelisted_call_with_preimage( + &self, + call: runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Whitelist", + "dispatch_whitelisted_call_with_preimage", + DispatchWhitelistedCallWithPreimage { + call: ::std::boxed::Box::new(call), + }, + [ + 251u8, 158u8, 241u8, 179u8, 149u8, 78u8, 101u8, 191u8, 245u8, + 245u8, 197u8, 72u8, 11u8, 187u8, 65u8, 76u8, 255u8, 68u8, + 156u8, 63u8, 249u8, 4u8, 98u8, 163u8, 94u8, 67u8, 68u8, 17u8, + 97u8, 32u8, 101u8, 166u8, + ], + ) } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_whitelist::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39345,40 +36519,12 @@ pub mod api { )] #[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 struct CallWhitelisted { + pub call_hash: ::subxt::utils::H256, } - } - 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, - Debug, - )] - #[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, - }, - } + impl ::subxt::events::StaticEvent for CallWhitelisted { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "CallWhitelisted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39389,9 +36535,13 @@ pub mod api { )] #[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, - ); + pub struct WhitelistedCallRemoved { + pub call_hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for WhitelistedCallRemoved { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallRemoved"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39401,193 +36551,79 @@ pub mod api { )] #[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 struct WhitelistedCallDispatched { + pub call_hash: ::subxt::utils::H256, + pub result: ::core::result::Result< + runtime_types::frame_support::dispatch::PostDispatchInfo, + runtime_types::sp_runtime::DispatchErrorWithPostInfo< + runtime_types::frame_support::dispatch::PostDispatchInfo, + >, + >, + } + impl ::subxt::events::StaticEvent for WhitelistedCallDispatched { + const PALLET: &'static str = "Whitelist"; + const EVENT: &'static str = "WhitelistedCallDispatched"; } } - pub mod pallet_treasury { + pub mod storage { use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, ()>, - }, - #[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, ()>, - }, - #[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, - Debug, - )] - #[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, + pub struct StorageApi; + impl StorageApi { + pub fn whitelisted_call( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Whitelist", + "WhitelistedCall", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, + 70u8, 96u8, 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, + 221u8, 206u8, 41u8, 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, + 3u8, 112u8, 167u8, 196u8, 77u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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, - }, + pub fn whitelisted_call_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + (), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Whitelist", + "WhitelistedCall", + Vec::new(), + [ + 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, + 70u8, 96u8, 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, + 221u8, 206u8, 41u8, 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, + 3u8, 112u8, 167u8, 196u8, 77u8, + ], + ) } } + } + } + pub mod alliance_motion { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -39597,391 +36633,25 @@ pub mod api { )] #[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 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, } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::polkadot_runtime::OriginCaller, - >, - call: ::std::boxed::Box< - runtime_types::polkadot_runtime::RuntimeCall, - >, - }, - #[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, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Too many calls batched."] - TooManyCalls, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 pallet_vesting { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = "# "] - vest, - #[codec(index = 1)] - #[doc = "Unlock any vested funds of a `target` account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] - #[doc = "# "] - vest_other { - target: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - }, - #[codec(index = 2)] - #[doc = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = "# "] - vested_transfer { - target: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = "# "] - force_vested_transfer { - source: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - target: - ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, - schedule: - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - merge_schedules { - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Error for the vesting pallet."] - pub enum Error { - #[codec(index = 0)] - #[doc = "The account given is not vesting."] - NotVesting, - #[codec(index = 1)] - #[doc = "The account already has `MaxVestingSchedules` count of schedules and thus"] - #[doc = "cannot add another one. Consider merging existing schedules in order to add another."] - AtMaxVestingSchedules, - #[codec(index = 2)] - #[doc = "Amount being transferred is too low to create a vesting schedule."] - AmountLow, - #[codec(index = 3)] - #[doc = "An index was out of bounds of the vesting schedules."] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - #[doc = "Failed to create a new schedule because some parameter was invalid."] - InvalidScheduleParams, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - VestingUpdated { - account: ::subxt::utils::AccountId32, - unvested: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "An \\[account\\] has become fully vested."] - VestingCompleted { - account: ::subxt::utils::AccountId32, - }, - } - } - pub mod vesting_info { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Execute { + pub proposal: + ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -39992,500 +36662,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } - } - pub mod pallet_xcm { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - send { - dest: - ::std::boxed::Box, - message: ::std::boxed::Box, - }, - #[codec(index = 1)] - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - teleport_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] - #[doc = "with all fees taken as needed from the asset."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - reserve_transfer_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Execute an XCM message from a local, signed, origin."] - #[doc = ""] - #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] - #[doc = "partially."] - #[doc = ""] - #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] - #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] - #[doc = "attempt will be made."] - #[doc = ""] - #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] - #[doc = "to completion; only that *some* of it was executed."] - execute { - message: ::std::boxed::Box, - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - #[doc = "Extoll that a particular destination can be communicated with through a particular"] - #[doc = "version of XCM."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The destination that is being described."] - #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] - force_xcm_version { - location: ::std::boxed::Box< - runtime_types::xcm::v1::multilocation::MultiLocation, - >, - xcm_version: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] - #[doc = "version a destination can accept is unknown)."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] - force_default_xcm_version { - maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 6)] - #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] - force_subscribe_version_notify { - location: - ::std::boxed::Box, - }, - #[codec(index = 7)] - #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] - #[doc = "version changes."] - #[doc = ""] - #[doc = "- `origin`: Must be Root."] - #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] - #[doc = " notifications which we no longer desire."] - force_unsubscribe_version_notify { - location: - ::std::boxed::Box, - }, - #[codec(index = 8)] - #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] - #[doc = "chain and forward a notification XCM."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] - #[doc = " `dest` side."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - limited_reserve_transfer_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 9)] - #[doc = "Teleport some assets from the local chain to some destination chain."] - #[doc = ""] - #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] - #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] - #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] - #[doc = "at risk."] - #[doc = ""] - #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] - #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] - #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] - #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] - #[doc = " an `AccountId32` value."] - #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] - #[doc = " `dest` side. May not be empty."] - #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] - #[doc = " fees."] - #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] - limited_teleport_assets { - dest: - ::std::boxed::Box, - beneficiary: - ::std::boxed::Box, - assets: - ::std::boxed::Box, - fee_asset_item: ::core::primitive::u32, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 desired destination was unreachable, generally because there is a no way of routing"] - #[doc = "to it."] - Unreachable, - #[codec(index = 1)] - #[doc = "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps"] - #[doc = "a lack of space for buffering the message."] - SendFailure, - #[codec(index = 2)] - #[doc = "The message execution fails the filter."] - Filtered, - #[codec(index = 3)] - #[doc = "The message's weight could not be determined."] - UnweighableMessage, - #[codec(index = 4)] - #[doc = "The destination `MultiLocation` provided cannot be inverted."] - DestinationNotInvertible, - #[codec(index = 5)] - #[doc = "The assets to be sent are empty."] - Empty, - #[codec(index = 6)] - #[doc = "Could not re-anchor the assets to declare the fees for the destination chain."] - CannotReanchor, - #[codec(index = 7)] - #[doc = "Too many assets have been attempted for transfer."] - TooManyAssets, - #[codec(index = 8)] - #[doc = "Origin is invalid for sending."] - InvalidOrigin, - #[codec(index = 9)] - #[doc = "The version of the `Versioned` value used is not able to be interpreted."] - BadVersion, - #[codec(index = 10)] - #[doc = "The given location could not be used (e.g. because it cannot be expressed in the"] - #[doc = "desired version of XCM)."] - BadLocation, - #[codec(index = 11)] - #[doc = "The referenced subscription could not be found."] - NoSubscription, - #[codec(index = 12)] - #[doc = "The location is invalid since it already has a subscription from us."] - AlreadySubscribed, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Execution of an XCM message was attempted."] - #[doc = ""] - #[doc = "\\[ outcome \\]"] - Attempted(runtime_types::xcm::v2::traits::Outcome), - #[codec(index = 1)] - #[doc = "A XCM message was sent."] - #[doc = ""] - #[doc = "\\[ origin, destination, message \\]"] - Sent( - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::v2::Xcm, - ), - #[codec(index = 2)] - #[doc = "Query response received which does not match a registered query. This may be because a"] - #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] - #[doc = "because the query timed out."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - UnexpectedResponse( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 3)] - #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] - #[doc = "no registered notification call."] - #[doc = ""] - #[doc = "\\[ id, response \\]"] - ResponseReady( - ::core::primitive::u64, - runtime_types::xcm::v2::Response, - ), - #[codec(index = 4)] - #[doc = "Query response has been received and query is removed. The registered notification has"] - #[doc = "been dispatched and executed successfully."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - Notified( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 5)] - #[doc = "Query response has been received and query is removed. The registered notification could"] - #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] - #[doc = "originally budgeted by this runtime for the query result."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] - NotifyOverweight( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - runtime_types::sp_weights::weight_v2::Weight, - runtime_types::sp_weights::weight_v2::Weight, - ), - #[codec(index = 6)] - #[doc = "Query response has been received and query is removed. There was a general error with"] - #[doc = "dispatching the notification call."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - NotifyDispatchError( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 7)] - #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] - #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] - #[doc = "is not `(origin, QueryId, Response)`."] - #[doc = ""] - #[doc = "\\[ id, pallet index, call index \\]"] - NotifyDecodeFailed( - ::core::primitive::u64, - ::core::primitive::u8, - ::core::primitive::u8, - ), - #[codec(index = 8)] - #[doc = "Expected query response has been received but the origin location of the response does"] - #[doc = "not match that expected. The query remains registered for a later, valid, response to"] - #[doc = "be received and acted upon."] - #[doc = ""] - #[doc = "\\[ origin location, id, expected location \\]"] - InvalidResponder( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ::core::option::Option< - runtime_types::xcm::v1::multilocation::MultiLocation, - >, - ), - #[codec(index = 9)] - #[doc = "Expected query response has been received but the expected origin location placed in"] - #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] - #[doc = ""] - #[doc = "This is unexpected (since a location placed in storage in a previously executing"] - #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] - #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] - #[doc = "needed."] - #[doc = ""] - #[doc = "\\[ origin location, id \\]"] - InvalidResponderVersion( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 10)] - #[doc = "Received query response has been read and removed."] - #[doc = ""] - #[doc = "\\[ id \\]"] - ResponseTaken(::core::primitive::u64), - #[codec(index = 11)] - #[doc = "Some assets have been placed in an asset trap."] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - AssetsTrapped( - ::subxt::utils::H256, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - #[codec(index = 12)] - #[doc = "An XCM version change notification message has been attempted to be sent."] - #[doc = ""] - #[doc = "\\[ destination, result \\]"] - VersionChangeNotified( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 13)] - #[doc = "The supported version of a location has been changed. This might be through an"] - #[doc = "automatic notification or a manual intervention."] - #[doc = ""] - #[doc = "\\[ location, XCM version \\]"] - SupportedVersionChanged( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u32, - ), - #[codec(index = 14)] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "sending the notification to it."] - #[doc = ""] - #[doc = "\\[ location, query ID, error \\]"] - NotifyTargetSendFail( - runtime_types::xcm::v1::multilocation::MultiLocation, - ::core::primitive::u64, - runtime_types::xcm::v2::traits::Error, - ), - #[codec(index = 15)] - #[doc = "A given location which had a version change subscription was dropped owing to an error"] - #[doc = "migrating the location to our new XCM format."] - #[doc = ""] - #[doc = "\\[ location, query ID \\]"] - NotifyTargetMigrationFail( - runtime_types::xcm::VersionedMultiLocation, - ::core::primitive::u64, - ), - #[codec(index = 16)] - #[doc = "Some assets have been claimed from an asset trap"] - #[doc = ""] - #[doc = "\\[ hash, origin, assets \\]"] - AssetsClaimed( - ::subxt::utils::H256, - runtime_types::xcm::v1::multilocation::MultiLocation, - runtime_types::xcm::VersionedMultiAssets, - ), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Origin { - #[codec(index = 0)] - Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), - #[codec(index = 1)] - Response(runtime_types::xcm::v1::multilocation::MultiLocation), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum QueryStatus<_0> { - #[codec(index = 0)] - Pending { - responder: runtime_types::xcm::VersionedMultiLocation, - maybe_notify: ::core::option::Option<( - ::core::primitive::u8, - ::core::primitive::u8, - )>, - timeout: _0, - }, - #[codec(index = 1)] - VersionNotifier { - origin: runtime_types::xcm::VersionedMultiLocation, - is_active: ::core::primitive::bool, - }, - #[codec(index = 2)] - Ready { - response: runtime_types::xcm::VersionedResponse, - at: _0, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionMigrationStage { - #[codec(index = 0)] - MigrateSupportedVersion, - #[codec(index = 1)] - MigrateVersionNotifiers, - #[codec(index = 2)] - NotifyCurrentTargets( - ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, - ), - #[codec(index = 3)] - MigrateAndNotifyOldTargets, - } + pub struct Propose { + #[codec(compact)] + pub threshold: ::core::primitive::u32, + pub proposal: + ::std::boxed::Box, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, } - } - pub mod polkadot_core_primitives { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -40495,7 +36679,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateHash(pub ::subxt::utils::H256); + 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, @@ -40505,9 +36694,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InboundDownwardMessage<_0> { - pub sent_at: _0, - pub msg: ::std::vec::Vec<::core::primitive::u8>, + 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, @@ -40518,9 +36712,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InboundHrmpMessage<_0> { - pub sent_at: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, + pub struct DisapproveProposal { + pub proposal_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -40531,588 +36724,669 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OutboundHrmpMessage<_0> { - pub recipient: _0, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - } - pub mod polkadot_parachain { - use super::runtime_types; - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpChannelId { - pub sender: runtime_types::polkadot_parachain::primitives::Id, - pub recipient: runtime_types::polkadot_parachain::primitives::Id, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Id(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidationCodeHash(pub ::subxt::utils::H256); + pub struct Close { + pub proposal_hash: ::subxt::utils::H256, + #[codec(compact)] + pub index: ::core::primitive::u32, + pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + pub length_bound: ::core::primitive::u32, } - } - pub mod polkadot_primitives { - use super::runtime_types; - pub mod v2 { - use super::runtime_types; - pub mod assignment_app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - } - pub mod collator_app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "set_members", + SetMembers { + new_members, + prime, + old_count, + }, + [ + 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, + 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, + 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, + 222u8, 90u8, 1u8, 2u8, 234u8, + ], + ) } - pub 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UncheckedSigned < _0 , _1 > { pub payload : _0 , pub validator_index : runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , pub signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _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 = "# "] + pub fn execute( + &self, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "execute", + Execute { + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + [ + 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, + 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, + 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, + 21u8, 24u8, 213u8, 28u8, 224u8, + ], + ) } - pub mod validator_app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AvailabilityBitfield( - pub ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BackedCandidate<_0> { - pub candidate: - runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt< - _0, - >, - pub validity_votes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidityAttestation, - >, - pub validator_indices: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateCommitments<_0> { - pub upward_messages: - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub horizontal_messages: ::std::vec::Vec< - runtime_types::polkadot_core_primitives::OutboundHrmpMessage< - runtime_types::polkadot_parachain::primitives::Id, - >, - >, - pub new_validation_code: ::core::option::Option< - runtime_types::polkadot_parachain::primitives::ValidationCode, - >, - pub head_data: - runtime_types::polkadot_parachain::primitives::HeadData, - pub processed_downward_messages: _0, - pub hrmp_watermark: _0, + #[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::kitchensink_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "propose", + Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, + }, + [ + 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, + 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, + 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, + 94u8, 45u8, 11u8, 127u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateDescriptor<_0> { - pub para_id: runtime_types::polkadot_parachain::primitives::Id, - pub relay_parent: _0, - pub collator: - runtime_types::polkadot_primitives::v2::collator_app::Public, - pub persisted_validation_data_hash: _0, - pub pov_hash: _0, - pub erasure_root: _0, - pub signature: - runtime_types::polkadot_primitives::v2::collator_app::Signature, - pub para_head: _0, - pub validation_code_hash: - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidateReceipt<_0> { - pub descriptor: - runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub commitments_hash: _0, + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "close_old_weight", + CloseOldWeight { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + [ + 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, + 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, + 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8, + 252u8, 244u8, 172u8, 60u8, 206u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CommittedCandidateReceipt<_0> { - pub descriptor: - runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub commitments: - runtime_types::polkadot_primitives::v2::CandidateCommitments< - ::core::primitive::u32, - >, + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "disapprove_proposal", + DisapproveProposal { proposal_hash }, + [ + 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, + 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, + 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8, + 164u8, 5u8, 194u8, 201u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CoreIndex(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum CoreOccupied { - #[codec(index = 0)] - Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), - #[codec(index = 1)] - Parachain, + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "AllianceMotion", + "close", + Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, + }, + [ + 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, + 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, + 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8, + 148u8, 206u8, 163u8, 154u8, 30u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeState<_0> { - pub validators_for: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - pub validators_against: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, + } + } + #[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, + Debug, + )] + #[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 Proposed { + const PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Proposed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Voted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Approved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Disapproved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Executed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "MemberExecuted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 PALLET: &'static str = "AllianceMotion"; + const EVENT: &'static str = "Closed"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The hashes of the active proposals."] + pub fn proposals( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::H256, >, - pub start: _0, - pub concluded_at: ::core::option::Option<_0>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeStatement { - # [codec (index = 0)] Valid (runtime_types :: polkadot_primitives :: v2 :: ValidDisputeStatementKind ,) , # [codec (index = 1)] Invalid (runtime_types :: polkadot_primitives :: v2 :: InvalidDisputeStatementKind ,) , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisputeStatementSet { - pub candidate_hash: - runtime_types::polkadot_core_primitives::CandidateHash, - pub session: ::core::primitive::u32, - pub statements: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::DisputeStatement, - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Signature, - )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "Proposals", + vec![], + [ + 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, + 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, + 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, + 220u8, 114u8, 217u8, 100u8, 27u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GroupIndex(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IndexedVec<_0, _1>( - pub ::std::vec::Vec<_1>, - #[codec(skip)] pub ::core::marker::PhantomData<_0>, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InherentData<_0> { - pub bitfields: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, - >, - >, - pub backed_candidates: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::BackedCandidate< - ::subxt::utils::H256, - >, - >, - pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, - >, - pub parent_header: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum InvalidDisputeStatementKind { - #[codec(index = 0)] - Explicit, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadClaim( - pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_primitives::v2::collator_app::Public, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadEntry { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, - pub retries: ::core::primitive::u32, + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::kitchensink_runtime::RuntimeCall, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "ProposalOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Identity, + )], + [ + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckStatement { - pub accept: ::core::primitive::bool, - pub subject: - runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub session_index: ::core::primitive::u32, - pub validator_index: - runtime_types::polkadot_primitives::v2::ValidatorIndex, + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::kitchensink_runtime::RuntimeCall, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "ProposalOf", + Vec::new(), + [ + 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, + 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, + 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, + 171u8, 51u8, 220u8, 127u8, 97u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScrapedOnChainVotes<_0> { - pub session: ::core::primitive::u32, - pub backing_validators_per_candidate: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::CandidateReceipt<_0>, - ::std::vec::Vec<( - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::ValidityAttestation, - )>, - )>, - pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::DisputeStatementSet, + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "Voting", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionInfo { - pub active_validator_indices: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - pub random_seed: [::core::primitive::u8; 32usize], - pub dispute_period: ::core::primitive::u32, - pub validators: runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - runtime_types::polkadot_primitives::v2::validator_app::Public, - >, - pub discovery_keys: ::std::vec::Vec< - runtime_types::sp_authority_discovery::app::Public, - >, - pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::assignment_app::Public, + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_collective::Votes< + ::subxt::utils::AccountId32, + ::core::primitive::u32, >, - pub validator_groups: - runtime_types::polkadot_primitives::v2::IndexedVec< - runtime_types::polkadot_primitives::v2::GroupIndex, - ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::ValidatorIndex, - >, - >, - pub n_cores: ::core::primitive::u32, - pub zeroth_delay_tranche_width: ::core::primitive::u32, - pub relay_vrf_modulo_samples: ::core::primitive::u32, - pub n_delay_tranches: ::core::primitive::u32, - pub no_show_slots: ::core::primitive::u32, - pub needed_approvals: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UpgradeGoAhead { - #[codec(index = 0)] - Abort, - #[codec(index = 1)] - GoAhead, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "Voting", + Vec::new(), + [ + 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, + 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, + 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, + 217u8, 240u8, 230u8, 107u8, 221u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UpgradeRestriction { - #[codec(index = 0)] - Present, + #[doc = " Proposals so far."] + pub fn proposal_count( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "ProposalCount", + vec![], + [ + 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, + 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, + 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, + 177u8, 127u8, 160u8, 34u8, 70u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ValidDisputeStatementKind { - #[codec(index = 0)] - Explicit, - #[codec(index = 1)] - BackingSeconded(::subxt::utils::H256), - #[codec(index = 2)] - BackingValid(::subxt::utils::H256), - #[codec(index = 3)] - ApprovalChecking, + #[doc = " The current members of the collective. This is stored sorted (just by value)."] + pub fn members( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::std::vec::Vec<::subxt::utils::AccountId32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "Members", + vec![], + [ + 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, + 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, + 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, + 71u8, 125u8, 56u8, 129u8, 222u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorIndex(pub ::core::primitive::u32); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ValidityAttestation { - #[codec(index = 1)] - Implicit( - runtime_types::polkadot_primitives::v2::validator_app::Signature, - ), - #[codec(index = 2)] - Explicit( - runtime_types::polkadot_primitives::v2::validator_app::Signature, - ), + #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] + pub fn prime( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "AllianceMotion", + "Prime", + vec![], + [ + 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, + 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, + 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, + 158u8, 159u8, 217u8, 244u8, 158u8, + ], + ) } } } - pub mod polkadot_runtime { + } + pub mod alliance { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41122,161 +37396,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NposCompactSolution16 { - 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 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, @@ -41287,33 +37413,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum OriginCaller { - #[codec(index = 0)] - system( - runtime_types::frame_support::dispatch::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 15)] - Council( - runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 16)] - TechnicalCommittee( - runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 50)] - ParachainsOrigin( - runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, - ), - #[codec(index = 99)] - XcmPallet(runtime_types::pallet_xcm::pallet::Origin), - #[codec(index = 5)] - Void(runtime_types::sp_core::Void), + 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, @@ -41324,21 +37428,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ProxyType { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - NonTransfer, - #[codec(index = 2)] - Governance, - #[codec(index = 3)] - Staking, - #[codec(index = 5)] - IdentityJudgement, - #[codec(index = 6)] - CancelProxy, - #[codec(index = 7)] - Auction, + 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, @@ -41349,7 +37446,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Runtime; + pub struct InitMembers { + pub fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub allies: ::std::vec::Vec<::subxt::utils::AccountId32>, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41359,8 +37459,9 @@ pub mod api { )] #[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)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Call ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: 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)] Indices (runtime_types :: pallet_indices :: pallet :: Call ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Call ,) , # [codec (index = 6)] Authorship (runtime_types :: pallet_authorship :: pallet :: Call ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Call ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Call ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Call ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Call ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Call ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Call ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Call ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Call ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Call ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Call ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Call ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Call ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Call ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Call ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Call ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Call ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Call ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Call ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Call ,) , # [codec (index = 51)] Configuration (runtime_types :: polkadot_runtime_parachains :: configuration :: pallet :: Call ,) , # [codec (index = 52)] ParasShared (runtime_types :: polkadot_runtime_parachains :: shared :: pallet :: Call ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Call ,) , # [codec (index = 54)] ParaInherent (runtime_types :: polkadot_runtime_parachains :: paras_inherent :: pallet :: Call ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Call ,) , # [codec (index = 57)] Initializer (runtime_types :: polkadot_runtime_parachains :: initializer :: pallet :: Call ,) , # [codec (index = 58)] Dmp (runtime_types :: polkadot_runtime_parachains :: dmp :: pallet :: Call ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Call ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Call ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Call ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Call ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Call ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Call ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Call ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Call ,) , } + pub struct Disband { + pub witness: runtime_types::pallet_alliance::types::DisbandWitness, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41370,8 +37471,9 @@ pub mod api { )] #[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)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Event ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Event ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Event ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Event ,) , # [codec (index = 32)] TransactionPayment (runtime_types :: pallet_transaction_payment :: pallet :: Event ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Event ,) , # [codec (index = 8)] Offences (runtime_types :: pallet_offences :: pallet :: Event ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Event ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Event ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Event ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Event ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Event ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Event ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Event ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Event ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Event ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Event ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Event ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Event ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Event ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Event ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Event ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Event ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Event ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Event ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Event ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Event ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Event ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Event ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Event ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Event ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Event ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Event ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Event ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Event ,) , } + pub struct SetRule { + pub rule: runtime_types::pallet_alliance::types::Cid, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -41381,2218 +37483,1125 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionKeys { - pub grandpa: runtime_types::sp_finality_grandpa::app::Public, - pub babe: runtime_types::sp_consensus_babe::app::Public, - pub im_online: - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub para_validator: - runtime_types::polkadot_primitives::v2::validator_app::Public, - pub para_assignment: - runtime_types::polkadot_primitives::v2::assignment_app::Public, - pub authority_discovery: - runtime_types::sp_authority_discovery::app::Public, + pub struct Announce { + pub announcement: runtime_types::pallet_alliance::types::Cid, } - } - pub mod polkadot_runtime_common { - use super::runtime_types; - pub mod auctions { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Create a new auction."] - #[doc = ""] - #[doc = "This can only happen when there isn't already an auction in progress and may only be"] - #[doc = "called by the root origin. Accepts the `duration` of this auction and the"] - #[doc = "`lease_period_index` of the initial lease period of the four that are to be auctioned."] - new_auction { - #[codec(compact)] - duration: ::core::primitive::u32, - #[codec(compact)] - lease_period_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Make a new bid from an account (including a parachain account) for deploying a new"] - #[doc = "parachain."] - #[doc = ""] - #[doc = "Multiple simultaneous bids from the same bidder are allowed only as long as all active"] - #[doc = "bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted."] - #[doc = ""] - #[doc = "- `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and"] - #[doc = "funded by) the same account."] - #[doc = "- `auction_index` is the index of the auction to bid on. Should just be the present"] - #[doc = "value of `AuctionCounter`."] - #[doc = "- `first_slot` is the first lease period index of the range to bid on. This is the"] - #[doc = "absolute lease period index value, not an auction-specific offset."] - #[doc = "- `last_slot` is the last lease period index of the range to bid on. This is the"] - #[doc = "absolute lease period index value, not an auction-specific offset."] - #[doc = "- `amount` is the amount to bid to be held as deposit for the parachain should the"] - #[doc = "bid win. This amount is held throughout the range."] - bid { - #[codec(compact)] - para: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - auction_index: ::core::primitive::u32, - #[codec(compact)] - first_slot: ::core::primitive::u32, - #[codec(compact)] - last_slot: ::core::primitive::u32, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Cancel an in-progress auction."] - #[doc = ""] - #[doc = "Can only be called by Root origin."] - cancel_auction, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "This auction is already in progress."] - AuctionInProgress, - #[codec(index = 1)] - #[doc = "The lease period is in the past."] - LeasePeriodInPast, - #[codec(index = 2)] - #[doc = "Para is not registered"] - ParaNotRegistered, - #[codec(index = 3)] - #[doc = "Not a current auction."] - NotCurrentAuction, - #[codec(index = 4)] - #[doc = "Not an auction."] - NotAuction, - #[codec(index = 5)] - #[doc = "Auction has already ended."] - AuctionEnded, - #[codec(index = 6)] - #[doc = "The para is already leased out for part of this range."] - AlreadyLeasedOut, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 auction started. Provides its index and the block number where it will begin to"] - #[doc = "close and the first lease period of the quadruplet that is auctioned."] - AuctionStarted { - auction_index: ::core::primitive::u32, - lease_period: ::core::primitive::u32, - ending: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "An auction ended. All funds become unreserved."] - AuctionClosed { - auction_index: ::core::primitive::u32, - }, - #[codec(index = 2)] - #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] - #[doc = "Second is the total."] - Reserved { - bidder: ::subxt::utils::AccountId32, - extra_reserved: ::core::primitive::u128, - total_amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] - Unreserved { - bidder: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] - #[doc = "but no parachain slot has been leased."] - ReserveConfiscated { - para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveAnnouncement { + pub announcement: runtime_types::pallet_alliance::types::Cid, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct JoinAlliance; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NominateAlly { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ElevateAlly { + pub ally: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct GiveRetirementNotice; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Retire; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct KickMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddUnscrupulousItems { + pub items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveUnscrupulousItems { + pub items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AbdicateFellowStatus; + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new proposal to be voted on."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + pub fn propose( + &self, + threshold: ::core::primitive::u32, + proposal: runtime_types::kitchensink_runtime::RuntimeCall, + length_bound: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "propose", + Propose { + threshold, + proposal: ::std::boxed::Box::new(proposal), + length_bound, }, - #[codec(index = 5)] - #[doc = "A new bid has been accepted as the current winner."] - BidAccepted { - bidder: ::subxt::utils::AccountId32, - para_id: runtime_types::polkadot_parachain::primitives::Id, - amount: ::core::primitive::u128, - first_slot: ::core::primitive::u32, - last_slot: ::core::primitive::u32, + [ + 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, + 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, + 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, + 94u8, 45u8, 11u8, 127u8, + ], + ) + } + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + pub fn vote( + &self, + proposal: ::subxt::utils::H256, + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "vote", + Vote { + proposal, + index, + approve, }, - #[codec(index = 6)] - #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] - WinningOffset { - auction_index: ::core::primitive::u32, - block_number: ::core::primitive::u32, + [ + 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 = "Must be called by a Fellow."] + 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "close_old_weight", + CloseOldWeight { + proposal_hash, + index, + proposal_weight_bound, + length_bound, }, - } + [ + 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, + 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, + 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8, + 252u8, 244u8, 172u8, 60u8, 206u8, + ], + ) } - } - pub mod claims { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Invalid Ethereum signature."] - InvalidEthereumSignature, - #[codec(index = 1)] - #[doc = "Ethereum address has no claim."] - SignerHasNoClaim, - #[codec(index = 2)] - #[doc = "Account ID sending transaction has no claim."] - SenderHasNoClaim, - #[codec(index = 3)] - #[doc = "There's not enough in the pot to pay out some unvested amount. Generally implies a logic"] - #[doc = "error."] - PotUnderflow, - #[codec(index = 4)] - #[doc = "A needed statement was not included."] - InvalidStatement, - #[codec(index = 5)] - #[doc = "The account already has a vested balance."] - VestedBalanceExists, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Someone claimed some DOTs."] Claimed { who : :: subxt :: utils :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } + #[doc = "Initialize the Alliance, onboard fellows and allies."] + #[doc = ""] + #[doc = "The Alliance must be empty, and the call must provide some founding members."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + pub fn init_members( + &self, + fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, + allies: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "init_members", + InitMembers { fellows, allies }, + [ + 182u8, 105u8, 49u8, 160u8, 26u8, 175u8, 215u8, 71u8, 58u8, + 176u8, 86u8, 29u8, 68u8, 186u8, 241u8, 47u8, 251u8, 136u8, + 123u8, 151u8, 246u8, 42u8, 232u8, 154u8, 210u8, 14u8, 165u8, + 104u8, 163u8, 140u8, 196u8, 164u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PrevalidateAttests; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum StatementKind { - #[codec(index = 0)] - Regular, - #[codec(index = 1)] - Saft, + #[doc = "Disband the Alliance, remove all active members and unreserve deposits."] + #[doc = ""] + #[doc = "Witness data must be set."] + pub fn disband( + &self, + witness: runtime_types::pallet_alliance::types::DisbandWitness, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "disband", + Disband { witness }, + [ + 140u8, 243u8, 193u8, 235u8, 169u8, 181u8, 78u8, 54u8, 75u8, + 109u8, 70u8, 148u8, 49u8, 154u8, 225u8, 76u8, 65u8, 92u8, + 149u8, 53u8, 62u8, 106u8, 228u8, 172u8, 10u8, 189u8, 108u8, + 144u8, 195u8, 6u8, 250u8, 202u8, + ], + ) } - } - pub mod crowdloan { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Create a new crowdloaning campaign for a parachain slot with the given lease period range."] - #[doc = ""] - #[doc = "This applies a lock to your parachain configuration, ensuring that it cannot be changed"] - #[doc = "by the parachain manager."] - create { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - cap: ::core::primitive::u128, - #[codec(compact)] - first_period: ::core::primitive::u32, - #[codec(compact)] - last_period: ::core::primitive::u32, - #[codec(compact)] - end: ::core::primitive::u32, - verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, + #[doc = "Set a new IPFS CID to the alliance rule."] + pub fn set_rule( + &self, + rule: runtime_types::pallet_alliance::types::Cid, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "set_rule", + SetRule { rule }, + [ + 31u8, 78u8, 248u8, 0u8, 135u8, 28u8, 162u8, 57u8, 155u8, + 173u8, 159u8, 212u8, 213u8, 135u8, 191u8, 88u8, 161u8, 119u8, + 122u8, 52u8, 190u8, 214u8, 31u8, 10u8, 210u8, 231u8, 245u8, + 248u8, 49u8, 60u8, 236u8, 67u8, + ], + ) + } + #[doc = "Make an announcement of a new IPFS CID about alliance issues."] + pub fn announce( + &self, + announcement: runtime_types::pallet_alliance::types::Cid, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "announce", + Announce { announcement }, + [ + 197u8, 120u8, 117u8, 49u8, 53u8, 91u8, 207u8, 16u8, 31u8, + 250u8, 85u8, 0u8, 111u8, 24u8, 222u8, 255u8, 121u8, 191u8, + 98u8, 85u8, 45u8, 237u8, 106u8, 60u8, 142u8, 69u8, 125u8, + 1u8, 128u8, 190u8, 99u8, 14u8, + ], + ) + } + #[doc = "Remove an announcement."] + pub fn remove_announcement( + &self, + announcement: runtime_types::pallet_alliance::types::Cid, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "remove_announcement", + RemoveAnnouncement { announcement }, + [ + 7u8, 152u8, 0u8, 165u8, 149u8, 198u8, 155u8, 138u8, 187u8, + 125u8, 30u8, 240u8, 229u8, 216u8, 215u8, 40u8, 150u8, 232u8, + 76u8, 242u8, 98u8, 11u8, 145u8, 165u8, 253u8, 6u8, 208u8, + 136u8, 122u8, 122u8, 176u8, 107u8, + ], + ) + } + #[doc = "Submit oneself for candidacy. A fixed deposit is reserved."] + pub fn join_alliance( + &self, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "join_alliance", + JoinAlliance {}, + [ + 54u8, 110u8, 66u8, 7u8, 137u8, 10u8, 43u8, 147u8, 162u8, + 126u8, 85u8, 199u8, 167u8, 112u8, 27u8, 210u8, 42u8, 224u8, + 29u8, 118u8, 67u8, 77u8, 31u8, 133u8, 66u8, 24u8, 114u8, + 185u8, 109u8, 159u8, 183u8, 157u8, + ], + ) + } + #[doc = "A Fellow can nominate someone to join the alliance as an Ally. There is no deposit"] + #[doc = "required from the nominator or nominee."] + pub fn nominate_ally( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "nominate_ally", + NominateAlly { who }, + [ + 60u8, 213u8, 72u8, 150u8, 238u8, 14u8, 199u8, 171u8, 147u8, + 94u8, 169u8, 243u8, 40u8, 238u8, 132u8, 118u8, 66u8, 122u8, + 193u8, 195u8, 237u8, 59u8, 82u8, 248u8, 8u8, 151u8, 188u8, + 226u8, 167u8, 18u8, 228u8, 105u8, + ], + ) + } + #[doc = "Elevate an Ally to Fellow."] + pub fn elevate_ally( + &self, + ally: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "elevate_ally", + ElevateAlly { ally }, + [ + 235u8, 131u8, 98u8, 158u8, 30u8, 159u8, 195u8, 25u8, 41u8, + 162u8, 10u8, 148u8, 73u8, 210u8, 10u8, 190u8, 226u8, 109u8, + 193u8, 218u8, 12u8, 242u8, 172u8, 215u8, 56u8, 131u8, 31u8, + 210u8, 215u8, 198u8, 81u8, 74u8, + ], + ) + } + #[doc = "As a member, give a retirement notice and start a retirement period required to pass in"] + #[doc = "order to retire."] + pub fn give_retirement_notice( + &self, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "give_retirement_notice", + GiveRetirementNotice {}, + [ + 179u8, 19u8, 191u8, 72u8, 65u8, 196u8, 142u8, 253u8, 35u8, + 215u8, 175u8, 47u8, 14u8, 238u8, 153u8, 157u8, 20u8, 44u8, + 174u8, 91u8, 133u8, 42u8, 48u8, 44u8, 116u8, 53u8, 27u8, + 247u8, 198u8, 87u8, 50u8, 195u8, + ], + ) + } + #[doc = "As a member, retire from the Alliance and unreserve the deposit."] + #[doc = ""] + #[doc = "This can only be done once you have called `give_retirement_notice` and the"] + #[doc = "`RetirementPeriod` has passed."] + pub fn retire(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "retire", + Retire {}, + [ + 6u8, 231u8, 211u8, 120u8, 5u8, 242u8, 96u8, 98u8, 132u8, + 36u8, 217u8, 219u8, 22u8, 76u8, 196u8, 151u8, 140u8, 92u8, + 186u8, 138u8, 76u8, 219u8, 73u8, 242u8, 155u8, 169u8, 9u8, + 184u8, 76u8, 23u8, 71u8, 116u8, + ], + ) + } + #[doc = "Kick a member from the Alliance and slash its deposit."] + pub fn kick_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "kick_member", + KickMember { who }, + [ + 49u8, 234u8, 214u8, 238u8, 122u8, 243u8, 103u8, 51u8, 232u8, + 73u8, 207u8, 236u8, 126u8, 122u8, 60u8, 177u8, 130u8, 109u8, + 68u8, 44u8, 89u8, 46u8, 236u8, 226u8, 181u8, 200u8, 98u8, + 183u8, 245u8, 227u8, 27u8, 118u8, + ], + ) + } + #[doc = "Add accounts or websites to the list of unscrupulous items."] + pub fn add_unscrupulous_items( + &self, + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, - }, - #[codec(index = 1)] - #[doc = "Contribute to a crowd sale. This will transfer some balance over to fund a parachain"] - #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] - contribute { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - value: ::core::primitive::u128, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, + >, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "add_unscrupulous_items", + AddUnscrupulousItems { items }, + [ + 222u8, 68u8, 94u8, 39u8, 39u8, 0u8, 161u8, 99u8, 42u8, 25u8, + 34u8, 150u8, 225u8, 133u8, 240u8, 91u8, 127u8, 68u8, 188u8, + 121u8, 126u8, 130u8, 1u8, 147u8, 73u8, 114u8, 34u8, 88u8, + 39u8, 97u8, 158u8, 197u8, + ], + ) + } + #[doc = "Deem some items no longer unscrupulous."] + pub fn remove_unscrupulous_items( + &self, + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, >, + >, + >, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "remove_unscrupulous_items", + RemoveUnscrupulousItems { items }, + [ + 231u8, 184u8, 191u8, 126u8, 10u8, 183u8, 103u8, 127u8, 145u8, + 98u8, 57u8, 176u8, 124u8, 161u8, 129u8, 66u8, 100u8, 100u8, + 154u8, 155u8, 206u8, 42u8, 180u8, 62u8, 240u8, 33u8, 53u8, + 251u8, 46u8, 203u8, 42u8, 234u8, + ], + ) + } + #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "close", + Close { + proposal_hash, + index, + proposal_weight_bound, + length_bound, }, - #[codec(index = 2)] - #[doc = "Withdraw full balance of a specific contributor."] - #[doc = ""] - #[doc = "Origin must be signed, but can come from anyone."] - #[doc = ""] - #[doc = "The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement"] - #[doc = "flag must be set. For a fund to be ready for retirement, then:"] - #[doc = "- it must not already be in retirement;"] - #[doc = "- the amount of raised funds must be bigger than the _free_ balance of the account;"] - #[doc = "- and either:"] - #[doc = " - the block number must be at least `end`; or"] - #[doc = " - the current lease period must be greater than the fund's `last_period`."] - #[doc = ""] - #[doc = "In this case, the fund's retirement flag is set and its `end` is reset to the current block"] - #[doc = "number."] - #[doc = ""] - #[doc = "- `who`: The account whose contribution should be withdrawn."] - #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] - withdraw { - who: ::subxt::utils::AccountId32, - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 3)] - #[doc = "Automatically refund contributors of an ended crowdloan."] - #[doc = "Due to weight restrictions, this function may need to be called multiple"] - #[doc = "times to fully refund all users. We will refund `RemoveKeysLimit` users at a time."] - #[doc = ""] - #[doc = "Origin must be signed, but can come from anyone."] - refund { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 4)] - #[doc = "Remove a fund after the retirement period has ended and all funds have been returned."] - dissolve { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - #[doc = "Edit the configuration for an in-progress crowdloan."] - #[doc = ""] - #[doc = "Can only be called by Root origin."] - edit { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - #[codec(compact)] - cap: ::core::primitive::u128, - #[codec(compact)] - first_period: ::core::primitive::u32, - #[codec(compact)] - last_period: ::core::primitive::u32, - #[codec(compact)] - end: ::core::primitive::u32, - verifier: ::core::option::Option< - runtime_types::sp_runtime::MultiSigner, - >, - }, - #[codec(index = 6)] - #[doc = "Add an optional memo to an existing crowdloan contribution."] - #[doc = ""] - #[doc = "Origin must be Signed, and the user must have contributed to the crowdloan."] - add_memo { - index: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 7)] - #[doc = "Poke the fund into `NewRaise`"] - #[doc = ""] - #[doc = "Origin must be Signed, and the fund has non-zero raise."] - poke { - index: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 8)] - #[doc = "Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain"] - #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] - contribute_all { - #[codec(compact)] - index: runtime_types::polkadot_parachain::primitives::Id, - signature: ::core::option::Option< - runtime_types::sp_runtime::MultiSignature, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The current lease period is more than the first lease period."] - FirstPeriodInPast, - #[codec(index = 1)] - #[doc = "The first lease period needs to at least be less than 3 `max_value`."] - FirstPeriodTooFarInFuture, - #[codec(index = 2)] - #[doc = "Last lease period must be greater than first lease period."] - LastPeriodBeforeFirstPeriod, - #[codec(index = 3)] - #[doc = "The last lease period cannot be more than 3 periods after the first period."] - LastPeriodTooFarInFuture, - #[codec(index = 4)] - #[doc = "The campaign ends before the current block number. The end must be in the future."] - CannotEndInPast, - #[codec(index = 5)] - #[doc = "The end date for this crowdloan is not sensible."] - EndTooFarInFuture, - #[codec(index = 6)] - #[doc = "There was an overflow."] - Overflow, - #[codec(index = 7)] - #[doc = "The contribution was below the minimum, `MinContribution`."] - ContributionTooSmall, - #[codec(index = 8)] - #[doc = "Invalid fund index."] - InvalidParaId, - #[codec(index = 9)] - #[doc = "Contributions exceed maximum amount."] - CapExceeded, - #[codec(index = 10)] - #[doc = "The contribution period has already ended."] - ContributionPeriodOver, - #[codec(index = 11)] - #[doc = "The origin of this call is invalid."] - InvalidOrigin, - #[codec(index = 12)] - #[doc = "This crowdloan does not correspond to a parachain."] - NotParachain, - #[codec(index = 13)] - #[doc = "This parachain lease is still active and retirement cannot yet begin."] - LeaseActive, - #[codec(index = 14)] - #[doc = "This parachain's bid or lease is still active and withdraw cannot yet begin."] - BidOrLeaseActive, - #[codec(index = 15)] - #[doc = "The crowdloan has not yet ended."] - FundNotEnded, - #[codec(index = 16)] - #[doc = "There are no contributions stored in this crowdloan."] - NoContributions, - #[codec(index = 17)] - #[doc = "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period."] - NotReadyToDissolve, - #[codec(index = 18)] - #[doc = "Invalid signature."] - InvalidSignature, - #[codec(index = 19)] - #[doc = "The provided memo is too large."] - MemoTooLarge, - #[codec(index = 20)] - #[doc = "The fund is already in `NewRaise`"] - AlreadyInNewRaise, - #[codec(index = 21)] - #[doc = "No contributions allowed during the VRF delay"] - VrfDelayInProgress, - #[codec(index = 22)] - #[doc = "A lease period has not started yet, due to an offset in the starting block."] - NoLeasePeriod, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Create a new crowdloaning campaign."] - Created { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 1)] - #[doc = "Contributed to a crowd sale."] - Contributed { - who: ::subxt::utils::AccountId32, - fund_index: runtime_types::polkadot_parachain::primitives::Id, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Withdrew full balance of a contributor."] - Withdrew { - who: ::subxt::utils::AccountId32, - fund_index: runtime_types::polkadot_parachain::primitives::Id, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] - #[doc = "over child keys that still need to be killed."] - PartiallyRefunded { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 4)] - #[doc = "All loans in a fund have been refunded."] - AllRefunded { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 5)] - #[doc = "Fund is dissolved."] - Dissolved { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 6)] - #[doc = "The result of trying to submit a new bid to the Slots pallet."] - HandleBidResult { - para_id: runtime_types::polkadot_parachain::primitives::Id, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 7)] - #[doc = "The configuration to a crowdloan has been edited."] - Edited { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 8)] - #[doc = "A memo has been updated."] - MemoUpdated { - who: ::subxt::utils::AccountId32, - para_id: runtime_types::polkadot_parachain::primitives::Id, - memo: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 9)] - #[doc = "A parachain has been moved to `NewRaise`"] - AddedToNewRaise { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FundInfo < _0 , _1 , _2 , _3 > { pub depositor : _0 , pub verifier : :: core :: option :: Option < runtime_types :: sp_runtime :: MultiSigner > , pub deposit : _1 , pub raised : _1 , pub end : _2 , pub cap : _1 , pub last_contribution : runtime_types :: polkadot_runtime_common :: crowdloan :: LastContribution < _2 > , pub first_period : _2 , pub last_period : _2 , pub fund_index : _2 , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _3 > } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum LastContribution<_0> { - #[codec(index = 0)] - Never, - #[codec(index = 1)] - PreEnding(_0), - #[codec(index = 2)] - Ending(_0), - } - } - pub mod paras_registrar { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: utils :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 ID is not registered."] - NotRegistered, - #[codec(index = 1)] - #[doc = "The ID is already registered."] - AlreadyRegistered, - #[codec(index = 2)] - #[doc = "The caller is not the owner of this Id."] - NotOwner, - #[codec(index = 3)] - #[doc = "Invalid para code size."] - CodeTooLarge, - #[codec(index = 4)] - #[doc = "Invalid para head data size."] - HeadDataTooLarge, - #[codec(index = 5)] - #[doc = "Para is not a Parachain."] - NotParachain, - #[codec(index = 6)] - #[doc = "Para is not a Parathread."] - NotParathread, - #[codec(index = 7)] - #[doc = "Cannot deregister para"] - CannotDeregister, - #[codec(index = 8)] - #[doc = "Cannot schedule downgrade of parachain to parathread"] - CannotDowngrade, - #[codec(index = 9)] - #[doc = "Cannot schedule upgrade of parathread to parachain"] - CannotUpgrade, - #[codec(index = 10)] - #[doc = "Para is locked from manipulation by the manager. Must use parachain or relay chain governance."] - ParaLocked, - #[codec(index = 11)] - #[doc = "The ID given for registration has not been reserved."] - NotReserved, - #[codec(index = 12)] - #[doc = "Registering parachain with empty code is not allowed."] - EmptyCode, - #[codec(index = 13)] - #[doc = "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are"] - #[doc = "correct for the swap to work."] - CannotSwap, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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)] - Registered { - para_id: runtime_types::polkadot_parachain::primitives::Id, - manager: ::subxt::utils::AccountId32, - }, - #[codec(index = 1)] - Deregistered { - para_id: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 2)] - Reserved { - para_id: runtime_types::polkadot_parachain::primitives::Id, - who: ::subxt::utils::AccountId32, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParaInfo<_0, _1> { - pub manager: _0, - pub deposit: _1, - pub locked: ::core::primitive::bool, + [ + 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, + 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, + 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8, + 148u8, 206u8, 163u8, 154u8, 30u8, + ], + ) } - } - pub mod slots { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Just a connect into the `lease_out` call, in case Root wants to force some lease to happen"] - #[doc = "independently of any other on-chain mechanism to use it."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - force_lease { - para: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - period_begin: ::core::primitive::u32, - period_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Clear all leases for a Para Id, refunding any deposits back to the original owners."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - clear_all_leases { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - #[codec(index = 2)] - #[doc = "Try to onboard a parachain that has a lease for the current lease period."] - #[doc = ""] - #[doc = "This function can be useful if there was some state issue with a para that should"] - #[doc = "have onboarded, but was unable to. As long as they have a lease period, we can"] - #[doc = "let them onboard from here."] - #[doc = ""] - #[doc = "Origin must be signed, but can be called by anyone."] - trigger_onboard { - para: runtime_types::polkadot_parachain::primitives::Id, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 parachain ID is not onboarding."] - ParaNotOnboarding, - #[codec(index = 1)] - #[doc = "There was an error with the lease."] - LeaseError, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 `[lease_period]` is beginning."] - NewLeasePeriod { - lease_period: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] - #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] - #[doc = "Second balance is the total amount reserved."] - Leased { - para_id: runtime_types::polkadot_parachain::primitives::Id, - leaser: ::subxt::utils::AccountId32, - period_begin: ::core::primitive::u32, - period_count: ::core::primitive::u32, - extra_reserved: ::core::primitive::u128, - total_amount: ::core::primitive::u128, - }, - } + #[doc = "Abdicate one's position as a voting member and just be an Ally. May be used by Fellows"] + #[doc = "who do not want to leave the Alliance but do not have the capacity to participate"] + #[doc = "operationally for some time."] + pub fn abdicate_fellow_status( + &self, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "Alliance", + "abdicate_fellow_status", + AbdicateFellowStatus {}, + [ + 32u8, 251u8, 224u8, 133u8, 152u8, 60u8, 139u8, 40u8, 253u8, + 116u8, 170u8, 79u8, 149u8, 89u8, 27u8, 203u8, 160u8, 75u8, + 81u8, 144u8, 9u8, 98u8, 139u8, 215u8, 253u8, 193u8, 211u8, + 93u8, 208u8, 143u8, 41u8, 175u8, + ], + ) } } } - pub mod polkadot_runtime_parachains { + #[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_alliance::pallet::Event; + pub mod events { use super::runtime_types; - pub mod configuration { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Set the validation upgrade cooldown."] - set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "Set the validation upgrade delay."] - set_validation_upgrade_delay { new: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "Set the acceptance period for an included candidate."] - set_code_retention_period { new: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "Set the max validation code size for incoming upgrades."] - set_max_code_size { new: ::core::primitive::u32 }, - #[codec(index = 4)] - #[doc = "Set the max POV block size for incoming upgrades."] - set_max_pov_size { new: ::core::primitive::u32 }, - #[codec(index = 5)] - #[doc = "Set the max head data size for paras."] - set_max_head_data_size { new: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "Set the number of parathread execution cores."] - set_parathread_cores { new: ::core::primitive::u32 }, - #[codec(index = 7)] - #[doc = "Set the number of retries for a particular parathread."] - set_parathread_retries { new: ::core::primitive::u32 }, - #[codec(index = 8)] - #[doc = "Set the parachain validator-group rotation frequency"] - set_group_rotation_frequency { new: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "Set the availability period for parachains."] - set_chain_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "Set the availability period for parathreads."] - set_thread_availability_period { new: ::core::primitive::u32 }, - #[codec(index = 11)] - #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] - set_scheduling_lookahead { new: ::core::primitive::u32 }, - #[codec(index = 12)] - #[doc = "Set the maximum number of validators to assign to any core."] - set_max_validators_per_core { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 13)] - #[doc = "Set the maximum number of validators to use in parachain consensus."] - set_max_validators { - new: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 14)] - #[doc = "Set the dispute period, in number of sessions to keep for disputes."] - set_dispute_period { new: ::core::primitive::u32 }, - #[codec(index = 15)] - #[doc = "Set the dispute post conclusion acceptance period."] - set_dispute_post_conclusion_acceptance_period { - new: ::core::primitive::u32, - }, - #[codec(index = 16)] - #[doc = "Set the maximum number of dispute spam slots."] - set_dispute_max_spam_slots { new: ::core::primitive::u32 }, - #[codec(index = 17)] - #[doc = "Set the dispute conclusion by time out period."] - set_dispute_conclusion_by_time_out_period { - new: ::core::primitive::u32, - }, - #[codec(index = 18)] - #[doc = "Set the no show slots, in number of number of consensus slots."] - #[doc = "Must be at least 1."] - set_no_show_slots { new: ::core::primitive::u32 }, - #[codec(index = 19)] - #[doc = "Set the total number of delay tranches."] - set_n_delay_tranches { new: ::core::primitive::u32 }, - #[codec(index = 20)] - #[doc = "Set the zeroth delay tranche width."] - set_zeroth_delay_tranche_width { new: ::core::primitive::u32 }, - #[codec(index = 21)] - #[doc = "Set the number of validators needed to approve a block."] - set_needed_approvals { new: ::core::primitive::u32 }, - #[codec(index = 22)] - #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] - set_relay_vrf_modulo_samples { new: ::core::primitive::u32 }, - #[codec(index = 23)] - #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] - set_max_upward_queue_count { new: ::core::primitive::u32 }, - #[codec(index = 24)] - #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] - set_max_upward_queue_size { new: ::core::primitive::u32 }, - #[codec(index = 25)] - #[doc = "Set the critical downward message size."] - set_max_downward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 26)] - #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] - set_ump_service_total_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 27)] - #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] - set_max_upward_message_size { new: ::core::primitive::u32 }, - #[codec(index = 28)] - #[doc = "Sets the maximum number of messages that a candidate can contain."] - set_max_upward_message_num_per_candidate { - new: ::core::primitive::u32, - }, - #[codec(index = 29)] - #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] - set_hrmp_open_request_ttl { new: ::core::primitive::u32 }, - #[codec(index = 30)] - #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] - set_hrmp_sender_deposit { new: ::core::primitive::u128 }, - #[codec(index = 31)] - #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] - #[doc = "channel."] - set_hrmp_recipient_deposit { new: ::core::primitive::u128 }, - #[codec(index = 32)] - #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] - set_hrmp_channel_max_capacity { new: ::core::primitive::u32 }, - #[codec(index = 33)] - #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] - set_hrmp_channel_max_total_size { new: ::core::primitive::u32 }, - #[codec(index = 34)] - #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] - set_hrmp_max_parachain_inbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 35)] - #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] - set_hrmp_max_parathread_inbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 36)] - #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] - set_hrmp_channel_max_message_size { new: ::core::primitive::u32 }, - #[codec(index = 37)] - #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] - set_hrmp_max_parachain_outbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 38)] - #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] - set_hrmp_max_parathread_outbound_channels { - new: ::core::primitive::u32, - }, - #[codec(index = 39)] - #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] - set_hrmp_max_message_num_per_candidate { - new: ::core::primitive::u32, - }, - #[codec(index = 40)] - #[doc = "Sets the maximum amount of weight any individual upward message may consume."] - set_ump_max_individual_weight { - new: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 41)] - #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] - set_pvf_checking_enabled { new: ::core::primitive::bool }, - #[codec(index = 42)] - #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] - set_pvf_voting_ttl { new: ::core::primitive::u32 }, - #[codec(index = 43)] - #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] - #[doc = "upgrade taking place."] - #[doc = ""] - #[doc = "See the field documentation for information and constraints for the new value."] - set_minimum_validation_upgrade_delay { - new: ::core::primitive::u32, - }, - #[codec(index = 44)] - #[doc = "Setting this to true will disable consistency checks for the configuration setters."] - #[doc = "Use with caution."] - set_bypass_consistency_check { new: ::core::primitive::bool }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The new value for a configuration parameter is invalid."] - InvalidNewValue, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HostConfiguration<_0> { - pub max_code_size: _0, - pub max_head_data_size: _0, - pub max_upward_queue_count: _0, - pub max_upward_queue_size: _0, - pub max_upward_message_size: _0, - pub max_upward_message_num_per_candidate: _0, - pub hrmp_max_message_num_per_candidate: _0, - pub validation_upgrade_cooldown: _0, - pub validation_upgrade_delay: _0, - pub max_pov_size: _0, - pub max_downward_message_size: _0, - pub ump_service_total_weight: - runtime_types::sp_weights::weight_v2::Weight, - pub hrmp_max_parachain_outbound_channels: _0, - pub hrmp_max_parathread_outbound_channels: _0, - pub hrmp_sender_deposit: ::core::primitive::u128, - pub hrmp_recipient_deposit: ::core::primitive::u128, - pub hrmp_channel_max_capacity: _0, - pub hrmp_channel_max_total_size: _0, - pub hrmp_max_parachain_inbound_channels: _0, - pub hrmp_max_parathread_inbound_channels: _0, - pub hrmp_channel_max_message_size: _0, - pub code_retention_period: _0, - pub parathread_cores: _0, - pub parathread_retries: _0, - pub group_rotation_frequency: _0, - pub chain_availability_period: _0, - pub thread_availability_period: _0, - pub scheduling_lookahead: _0, - pub max_validators_per_core: ::core::option::Option<_0>, - pub max_validators: ::core::option::Option<_0>, - pub dispute_period: _0, - pub dispute_post_conclusion_acceptance_period: _0, - pub dispute_max_spam_slots: _0, - pub dispute_conclusion_by_time_out_period: _0, - pub no_show_slots: _0, - pub n_delay_tranches: _0, - pub zeroth_delay_tranche_width: _0, - pub needed_approvals: _0, - pub relay_vrf_modulo_samples: _0, - pub ump_max_individual_weight: - runtime_types::sp_weights::weight_v2::Weight, - pub pvf_checking_enabled: ::core::primitive::bool, - pub pvf_voting_ttl: _0, - pub minimum_validation_upgrade_delay: _0, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new rule has been set."] + pub struct NewRuleSet { + pub rule: runtime_types::pallet_alliance::types::Cid, } - pub mod disputes { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - force_unfreeze, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Duplicate dispute statement sets provided."] - DuplicateDisputeStatementSets, - #[codec(index = 1)] - #[doc = "Ancient dispute statement provided."] - AncientDisputeStatement, - #[codec(index = 2)] - #[doc = "Validator index on statement is out of bounds for session."] - ValidatorIndexOutOfBounds, - #[codec(index = 3)] - #[doc = "Invalid signature on statement."] - InvalidSignature, - #[codec(index = 4)] - #[doc = "Validator vote submitted more than once to dispute."] - DuplicateStatement, - #[codec(index = 5)] - #[doc = "Too many spam slots used by some specific validator."] - PotentialSpam, - #[codec(index = 6)] - #[doc = "A dispute where there are only votes on one side."] - SingleSidedDispute, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 dispute has been initiated. \\[candidate hash, dispute location\\]"] DisputeInitiated (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeLocation ,) , # [codec (index = 1)] # [doc = "A dispute has concluded for or against a candidate."] # [doc = "`\\[para id, candidate hash, dispute result\\]`"] DisputeConcluded (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeResult ,) , # [codec (index = 2)] # [doc = "A dispute has timed out due to insufficient participation."] # [doc = "`\\[para id, candidate hash\\]`"] DisputeTimedOut (runtime_types :: polkadot_core_primitives :: CandidateHash ,) , # [codec (index = 3)] # [doc = "A dispute has concluded with supermajority against a candidate."] # [doc = "Block authors should no longer build on top of this head and should"] # [doc = "instead revert the block at the given height. This should be the"] # [doc = "number of the child of the last known valid block in the chain."] Revert (:: core :: primitive :: u32 ,) , } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeLocation { - #[codec(index = 0)] - Local, - #[codec(index = 1)] - Remote, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DisputeResult { - #[codec(index = 0)] - Valid, - #[codec(index = 1)] - Invalid, - } + impl ::subxt::events::StaticEvent for NewRuleSet { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "NewRuleSet"; } - pub mod dmp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A new announcement has been proposed."] + pub struct Announced { + pub announcement: runtime_types::pallet_alliance::types::Cid, } - pub mod hrmp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] # [doc = "parameters."] # [doc = ""] # [doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] # [doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] # [doc = ""] # [doc = "These numbers are a subject to the relay-chain configuration limits."] # [doc = ""] # [doc = "The channel can be opened only after the recipient confirms it and only on a session"] # [doc = "change."] hrmp_init_open_channel { recipient : runtime_types :: polkadot_parachain :: primitives :: Id , proposed_max_capacity : :: core :: primitive :: u32 , proposed_max_message_size : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Accept a pending open channel request from the given sender."] # [doc = ""] # [doc = "The channel will be opened only on the next session boundary."] hrmp_accept_open_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 2)] # [doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] # [doc = "recipient in the channel being closed."] # [doc = ""] # [doc = "The closure can only happen on a session change."] hrmp_close_channel { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , # [codec (index = 3)] # [doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] # [doc = "a para may have. Normally this happens once per session, but this allows"] # [doc = "you to trigger the cleanup immediately for a specific parachain."] # [doc = ""] # [doc = "Origin must be Root."] # [doc = ""] # [doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] force_clean_hrmp { para : runtime_types :: polkadot_parachain :: primitives :: Id , inbound : :: core :: primitive :: u32 , outbound : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Force process HRMP open channel requests."] # [doc = ""] # [doc = "If there are pending HRMP open channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of opening channels must be provided as witness data of weighing."] force_process_hrmp_open { channels : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Force process HRMP close channel requests."] # [doc = ""] # [doc = "If there are pending HRMP close channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of closing channels must be provided as witness data of weighing."] force_process_hrmp_close { channels : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] # [doc = "or the recipient for that request. The origin must be either of those."] # [doc = ""] # [doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] # [doc = "already accepted."] # [doc = ""] # [doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] # [doc = "witness data."] hrmp_cancel_open_request { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , open_requests : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although"] # [doc = "opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay"] # [doc = "Chain's configured limits."] # [doc = ""] # [doc = "Expected use is when one of the `ParaId`s involved in the channel is governed by the"] # [doc = "Relay Chain, e.g. a common good parachain."] force_open_hrmp_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , recipient : runtime_types :: polkadot_parachain :: primitives :: Id , max_capacity : :: core :: primitive :: u32 , max_message_size : :: core :: primitive :: u32 , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 sender tried to open a channel to themselves."] - OpenHrmpChannelToSelf, - #[codec(index = 1)] - #[doc = "The recipient is not a valid para."] - OpenHrmpChannelInvalidRecipient, - #[codec(index = 2)] - #[doc = "The requested capacity is zero."] - OpenHrmpChannelZeroCapacity, - #[codec(index = 3)] - #[doc = "The requested capacity exceeds the global limit."] - OpenHrmpChannelCapacityExceedsLimit, - #[codec(index = 4)] - #[doc = "The requested maximum message size is 0."] - OpenHrmpChannelZeroMessageSize, - #[codec(index = 5)] - #[doc = "The open request requested the message size that exceeds the global limit."] - OpenHrmpChannelMessageSizeExceedsLimit, - #[codec(index = 6)] - #[doc = "The channel already exists"] - OpenHrmpChannelAlreadyExists, - #[codec(index = 7)] - #[doc = "There is already a request to open the same channel."] - OpenHrmpChannelAlreadyRequested, - #[codec(index = 8)] - #[doc = "The sender already has the maximum number of allowed outbound channels."] - OpenHrmpChannelLimitExceeded, - #[codec(index = 9)] - #[doc = "The channel from the sender to the origin doesn't exist."] - AcceptHrmpChannelDoesntExist, - #[codec(index = 10)] - #[doc = "The channel is already confirmed."] - AcceptHrmpChannelAlreadyConfirmed, - #[codec(index = 11)] - #[doc = "The recipient already has the maximum number of allowed inbound channels."] - AcceptHrmpChannelLimitExceeded, - #[codec(index = 12)] - #[doc = "The origin tries to close a channel where it is neither the sender nor the recipient."] - CloseHrmpChannelUnauthorized, - #[codec(index = 13)] - #[doc = "The channel to be closed doesn't exist."] - CloseHrmpChannelDoesntExist, - #[codec(index = 14)] - #[doc = "The channel close request is already requested."] - CloseHrmpChannelAlreadyUnderway, - #[codec(index = 15)] - #[doc = "Canceling is requested by neither the sender nor recipient of the open channel request."] - CancelHrmpOpenChannelUnauthorized, - #[codec(index = 16)] - #[doc = "The open request doesn't exist."] - OpenHrmpChannelDoesntExist, - #[codec(index = 17)] - #[doc = "Cannot cancel an HRMP open channel request because it is already confirmed."] - OpenHrmpChannelAlreadyConfirmed, - #[codec(index = 18)] - #[doc = "The provided witness data is wrong."] - WrongWitness, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Open HRMP channel requested."] - #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] - OpenChannelRequested( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::core::primitive::u32, - ), - #[codec(index = 1)] - #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] - #[doc = "`[by_parachain, channel_id]`"] - OpenChannelCanceled( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ), - #[codec(index = 2)] - #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] - OpenChannelAccepted( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ), - #[codec(index = 3)] - #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] - ChannelClosed( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::HrmpChannelId, - ), - #[codec(index = 4)] - #[doc = "An HRMP channel was opened via Root origin."] - #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] - HrmpChannelForceOpened( - runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::core::primitive::u32, - ), - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpChannel { - pub max_capacity: ::core::primitive::u32, - pub max_total_size: ::core::primitive::u32, - pub max_message_size: ::core::primitive::u32, - pub msg_count: ::core::primitive::u32, - pub total_size: ::core::primitive::u32, - pub mqc_head: ::core::option::Option<::subxt::utils::H256>, - pub sender_deposit: ::core::primitive::u128, - pub recipient_deposit: ::core::primitive::u128, + impl ::subxt::events::StaticEvent for Announced { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "Announced"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An on-chain announcement has been removed."] + pub struct AnnouncementRemoved { + pub announcement: runtime_types::pallet_alliance::types::Cid, + } + impl ::subxt::events::StaticEvent for AnnouncementRemoved { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "AnnouncementRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some accounts have been initialized as members (fellows/allies)."] + pub struct MembersInitialized { + pub fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub allies: ::std::vec::Vec<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for MembersInitialized { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "MembersInitialized"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An account has been added as an Ally and reserved its deposit."] + pub struct NewAllyJoined { + pub ally: ::subxt::utils::AccountId32, + pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, + pub reserved: ::core::option::Option<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for NewAllyJoined { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "NewAllyJoined"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An ally has been elevated to Fellow."] + pub struct AllyElevated { + pub ally: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for AllyElevated { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "AllyElevated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member gave retirement notice and their retirement period started."] + pub struct MemberRetirementPeriodStarted { + pub member: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for MemberRetirementPeriodStarted { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "MemberRetirementPeriodStarted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has retired with its deposit unreserved."] + pub struct MemberRetired { + pub member: ::subxt::utils::AccountId32, + pub unreserved: ::core::option::Option<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for MemberRetired { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "MemberRetired"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has been kicked out with its deposit slashed."] + pub struct MemberKicked { + pub member: ::subxt::utils::AccountId32, + pub slashed: ::core::option::Option<::core::primitive::u128>, + } + impl ::subxt::events::StaticEvent for MemberKicked { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "MemberKicked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Accounts or websites have been added into the list of unscrupulous items."] + pub struct UnscrupulousItemAdded { + pub items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + } + impl ::subxt::events::StaticEvent for UnscrupulousItemAdded { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "UnscrupulousItemAdded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Accounts or websites have been removed from the list of unscrupulous items."] + pub struct UnscrupulousItemRemoved { + pub items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + } + impl ::subxt::events::StaticEvent for UnscrupulousItemRemoved { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "UnscrupulousItemRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Alliance disbanded. Includes number deleted members and unreserved deposits."] + pub struct AllianceDisbanded { + pub fellow_members: ::core::primitive::u32, + pub ally_members: ::core::primitive::u32, + pub unreserved: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AllianceDisbanded { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "AllianceDisbanded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A Fellow abdicated their voting rights. They are now an Ally."] + pub struct FellowAbdicated { + pub fellow: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for FellowAbdicated { + const PALLET: &'static str = "Alliance"; + const EVENT: &'static str = "FellowAbdicated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The IPFS CID of the alliance rule."] + #[doc = " Fellows can propose a new rule with a super-majority."] + pub fn rule( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_alliance::types::Cid, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "Rule", + vec![], + [ + 132u8, 179u8, 91u8, 202u8, 26u8, 39u8, 178u8, 5u8, 221u8, + 59u8, 148u8, 116u8, 113u8, 55u8, 88u8, 104u8, 208u8, 165u8, + 100u8, 78u8, 123u8, 208u8, 191u8, 217u8, 36u8, 33u8, 103u8, + 11u8, 5u8, 161u8, 207u8, 170u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HrmpOpenChannelRequest { - pub confirmed: ::core::primitive::bool, - pub _age: ::core::primitive::u32, - pub sender_deposit: ::core::primitive::u128, - pub max_message_size: ::core::primitive::u32, - pub max_capacity: ::core::primitive::u32, - pub max_total_size: ::core::primitive::u32, + #[doc = " The current IPFS CIDs of any announcements."] + pub fn announcements( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_alliance::types::Cid, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "Announcements", + vec![], + [ + 217u8, 117u8, 75u8, 244u8, 196u8, 60u8, 185u8, 248u8, 13u8, + 121u8, 132u8, 36u8, 112u8, 233u8, 210u8, 170u8, 4u8, 247u8, + 109u8, 226u8, 211u8, 37u8, 117u8, 15u8, 214u8, 7u8, 100u8, + 0u8, 15u8, 0u8, 179u8, 96u8, + ], + ) } - } - pub mod inclusion { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call {} - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Validator indices are out of order or contains duplicates."] - UnsortedOrDuplicateValidatorIndices, - #[codec(index = 1)] - #[doc = "Dispute statement sets are out of order or contain duplicates."] - UnsortedOrDuplicateDisputeStatementSet, - #[codec(index = 2)] - #[doc = "Backed candidates are out of order (core index) or contain duplicates."] - UnsortedOrDuplicateBackedCandidates, - #[codec(index = 3)] - #[doc = "A different relay parent was provided compared to the on-chain stored one."] - UnexpectedRelayParent, - #[codec(index = 4)] - #[doc = "Availability bitfield has unexpected size."] - WrongBitfieldSize, - #[codec(index = 5)] - #[doc = "Bitfield consists of zeros only."] - BitfieldAllZeros, - #[codec(index = 6)] - #[doc = "Multiple bitfields submitted by same validator or validators out of order by index."] - BitfieldDuplicateOrUnordered, - #[codec(index = 7)] - #[doc = "Validator index out of bounds."] - ValidatorIndexOutOfBounds, - #[codec(index = 8)] - #[doc = "Invalid signature"] - InvalidBitfieldSignature, - #[codec(index = 9)] - #[doc = "Candidate submitted but para not scheduled."] - UnscheduledCandidate, - #[codec(index = 10)] - #[doc = "Candidate scheduled despite pending candidate already existing for the para."] - CandidateScheduledBeforeParaFree, - #[codec(index = 11)] - #[doc = "Candidate included with the wrong collator."] - WrongCollator, - #[codec(index = 12)] - #[doc = "Scheduled cores out of order."] - ScheduledOutOfOrder, - #[codec(index = 13)] - #[doc = "Head data exceeds the configured maximum."] - HeadDataTooLarge, - #[codec(index = 14)] - #[doc = "Code upgrade prematurely."] - PrematureCodeUpgrade, - #[codec(index = 15)] - #[doc = "Output code is too large"] - NewCodeTooLarge, - #[codec(index = 16)] - #[doc = "Candidate not in parent context."] - CandidateNotInParentContext, - #[codec(index = 17)] - #[doc = "Invalid group index in core assignment."] - InvalidGroupIndex, - #[codec(index = 18)] - #[doc = "Insufficient (non-majority) backing."] - InsufficientBacking, - #[codec(index = 19)] - #[doc = "Invalid (bad signature, unknown validator, etc.) backing."] - InvalidBacking, - #[codec(index = 20)] - #[doc = "Collator did not sign PoV."] - NotCollatorSigned, - #[codec(index = 21)] - #[doc = "The validation data hash does not match expected."] - ValidationDataHashMismatch, - #[codec(index = 22)] - #[doc = "The downward message queue is not processed correctly."] - IncorrectDownwardMessageHandling, - #[codec(index = 23)] - #[doc = "At least one upward message sent does not pass the acceptance criteria."] - InvalidUpwardMessages, - #[codec(index = 24)] - #[doc = "The candidate didn't follow the rules of HRMP watermark advancement."] - HrmpWatermarkMishandling, - #[codec(index = 25)] - #[doc = "The HRMP messages sent by the candidate is not valid."] - InvalidOutboundHrmp, - #[codec(index = 26)] - #[doc = "The validation code hash of the candidate is not valid."] - InvalidValidationCodeHash, - #[codec(index = 27)] - #[doc = "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the"] - #[doc = "commitments."] - ParaHeadMismatch, - #[codec(index = 28)] - #[doc = "A bitfield that references a freed core,"] - #[doc = "either intentionally or as part of a concluded"] - #[doc = "invalid dispute."] - BitfieldReferencesFreedCore, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 candidate was backed. `[candidate, head_data]`"] - CandidateBacked( - runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, - runtime_types::polkadot_primitives::v2::GroupIndex, - ), - #[codec(index = 1)] - #[doc = "A candidate was included. `[candidate, head_data]`"] - CandidateIncluded( - runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, - runtime_types::polkadot_primitives::v2::GroupIndex, - ), - #[codec(index = 2)] - #[doc = "A candidate timed out. `[candidate, head_data]`"] - CandidateTimedOut( - runtime_types::polkadot_primitives::v2::CandidateReceipt< - ::subxt::utils::H256, - >, - runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v2::CoreIndex, - ), - } + #[doc = " Maps members to their candidacy deposit."] + pub fn deposit_of( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "DepositOf", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 144u8, 38u8, 94u8, 133u8, 11u8, 36u8, 151u8, 247u8, 63u8, + 168u8, 80u8, 116u8, 39u8, 78u8, 240u8, 0u8, 11u8, 182u8, + 118u8, 208u8, 224u8, 184u8, 116u8, 51u8, 166u8, 133u8, 227u8, + 246u8, 92u8, 146u8, 175u8, 65u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AvailabilityBitfieldRecord<_0> { - pub bitfield: - runtime_types::polkadot_primitives::v2::AvailabilityBitfield, - pub submitted_at: _0, + #[doc = " Maps members to their candidacy deposit."] + pub fn deposit_of_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "DepositOf", + Vec::new(), + [ + 144u8, 38u8, 94u8, 133u8, 11u8, 36u8, 151u8, 247u8, 63u8, + 168u8, 80u8, 116u8, 39u8, 78u8, 240u8, 0u8, 11u8, 182u8, + 118u8, 208u8, 224u8, 184u8, 116u8, 51u8, 166u8, 133u8, 227u8, + 246u8, 92u8, 146u8, 175u8, 65u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CandidatePendingAvailability<_0, _1> { - pub core: runtime_types::polkadot_primitives::v2::CoreIndex, - pub hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub descriptor: - runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, - pub availability_votes: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, + #[doc = " Maps member type to members of each type."] + pub fn members( + &self, + _0: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, - pub backers: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "Members", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 238u8, 61u8, 156u8, 136u8, 196u8, 188u8, 124u8, 182u8, 195u8, + 205u8, 210u8, 204u8, 73u8, 227u8, 32u8, 127u8, 124u8, 181u8, + 105u8, 59u8, 164u8, 180u8, 186u8, 222u8, 20u8, 129u8, 133u8, + 95u8, 87u8, 246u8, 155u8, 144u8, + ], + ) + } + #[doc = " Maps member type to members of each type."] + pub fn members_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, - pub relay_parent_number: _1, - pub backed_in_number: _1, - pub backing_group: runtime_types::polkadot_primitives::v2::GroupIndex, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "Members", + Vec::new(), + [ + 238u8, 61u8, 156u8, 136u8, 196u8, 188u8, 124u8, 182u8, 195u8, + 205u8, 210u8, 204u8, 73u8, 227u8, 32u8, 127u8, 124u8, 181u8, + 105u8, 59u8, 164u8, 180u8, 186u8, 222u8, 20u8, 129u8, 133u8, + 95u8, 87u8, 246u8, 155u8, 144u8, + ], + ) } - } - pub mod initializer { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] - #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] - #[doc = "chain are valid and should be finalized."] - force_approve { up_to: ::core::primitive::u32 }, - } + #[doc = " A set of members who gave a retirement notice. They can retire after the end of retirement"] + #[doc = " period stored as a future block number."] + pub fn retiring_members( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "RetiringMembers", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 195u8, 185u8, 238u8, 11u8, 200u8, 34u8, 221u8, 178u8, 171u8, + 139u8, 211u8, 27u8, 109u8, 173u8, 203u8, 218u8, 147u8, 40u8, + 29u8, 226u8, 65u8, 77u8, 199u8, 81u8, 153u8, 145u8, 97u8, + 229u8, 54u8, 242u8, 12u8, 187u8, + ], + ) } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BufferedSessionChange { - pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + #[doc = " A set of members who gave a retirement notice. They can retire after the end of retirement"] + #[doc = " period stored as a future block number."] + pub fn retiring_members_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "RetiringMembers", + Vec::new(), + [ + 195u8, 185u8, 238u8, 11u8, 200u8, 34u8, 221u8, 178u8, 171u8, + 139u8, 211u8, 27u8, 109u8, 173u8, 203u8, 218u8, 147u8, 40u8, + 29u8, 226u8, 65u8, 77u8, 199u8, 81u8, 153u8, 145u8, 97u8, + 229u8, 54u8, 242u8, 12u8, 187u8, + ], + ) + } + #[doc = " The current list of accounts deemed unscrupulous. These accounts non grata cannot submit"] + #[doc = " candidacy."] + pub fn unscrupulous_accounts( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::subxt::utils::AccountId32, >, - pub queued: ::std::vec::Vec< - runtime_types::polkadot_primitives::v2::validator_app::Public, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "UnscrupulousAccounts", + vec![], + [ + 5u8, 149u8, 47u8, 164u8, 130u8, 46u8, 136u8, 88u8, 153u8, + 77u8, 176u8, 127u8, 165u8, 163u8, 40u8, 117u8, 137u8, 67u8, + 72u8, 4u8, 151u8, 209u8, 172u8, 20u8, 64u8, 162u8, 48u8, + 199u8, 224u8, 85u8, 157u8, 44u8, + ], + ) + } + #[doc = " The current list of websites deemed unscrupulous."] + pub fn unscrupulous_websites( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, >, - pub session_index: ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "Alliance", + "UnscrupulousWebsites", + vec![], + [ + 231u8, 15u8, 27u8, 215u8, 117u8, 150u8, 199u8, 19u8, 209u8, + 43u8, 144u8, 212u8, 160u8, 32u8, 195u8, 26u8, 128u8, 3u8, + 151u8, 53u8, 230u8, 102u8, 44u8, 42u8, 205u8, 68u8, 175u8, + 206u8, 239u8, 236u8, 68u8, 160u8, + ], + ) } } - pub mod origin { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Origin { - #[codec(index = 0)] - Parachain(runtime_types::polkadot_parachain::primitives::Id), - } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum number of the unscrupulous items supported by the pallet."] + pub fn max_unscrupulous_items( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Alliance", + "MaxUnscrupulousItems", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 paras { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Set the storage for the parachain validation code immediately."] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Set the storage for the current parachain head data immediately."] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] # [doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] force_schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , relay_parent_number : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Note a new block head for para within the context of the current block."] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] # [doc = "Put a parachain directly into the next session's action queue."] # [doc = "We can't queue it any sooner than this without going into the"] # [doc = "initializer..."] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Adds the validation code to the storage."] # [doc = ""] # [doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] # [doc = "is running for that code, it will be instantly accepted."] # [doc = ""] # [doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] # [doc = "into storage with reference count 0. This is to account the fact that there are no users"] # [doc = "for this code yet. The caller will have to make sure that this code eventually gets"] # [doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] # [doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] # [doc = ""] # [doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] # [doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] # [doc = "Remove the validation code from the storage iff the reference count is 0."] # [doc = ""] # [doc = "This is better than removing the storage directly, because it will not remove the code"] # [doc = "that was suddenly got used by some parachain while this dispatchable was pending"] # [doc = "dispatching."] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] # [doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] # [doc = "enacts the results if that was the last vote before achieving the supermajority."] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 = "Para is not registered in our system."] - NotRegistered, - #[codec(index = 1)] - #[doc = "Para cannot be onboarded because it is already tracked by our system."] - CannotOnboard, - #[codec(index = 2)] - #[doc = "Para cannot be offboarded at this time."] - CannotOffboard, - #[codec(index = 3)] - #[doc = "Para cannot be upgraded to a parachain."] - CannotUpgrade, - #[codec(index = 4)] - #[doc = "Para cannot be downgraded to a parathread."] - CannotDowngrade, - #[codec(index = 5)] - #[doc = "The statement for PVF pre-checking is stale."] - PvfCheckStatementStale, - #[codec(index = 6)] - #[doc = "The statement for PVF pre-checking is for a future session."] - PvfCheckStatementFuture, - #[codec(index = 7)] - #[doc = "Claimed validator index is out of bounds."] - PvfCheckValidatorIndexOutOfBounds, - #[codec(index = 8)] - #[doc = "The signature for the PVF pre-checking is invalid."] - PvfCheckInvalidSignature, - #[codec(index = 9)] - #[doc = "The given validator already has cast a vote."] - PvfCheckDoubleVote, - #[codec(index = 10)] - #[doc = "The given PVF does not exist at the moment of process a vote."] - PvfCheckSubjectInvalid, - #[codec(index = 11)] - #[doc = "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism"] - #[doc = "is disabled."] - PvfCheckDisabled, - #[codec(index = 12)] - #[doc = "Parachain cannot currently schedule a code upgrade."] - CannotUpgradeCode, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Current code has been updated for a Para. `para_id`"] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] # [doc = "Current head has been updated for a Para. `para_id`"] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] # [doc = "A code upgrade has been scheduled for a Para. `para_id`"] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] # [doc = "A new head has been noted for a Para. `para_id`"] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] # [doc = "A para has been queued to execute pending actions. `para_id`"] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] # [doc = "The given para either initiated or subscribed to a PVF check for the given validation"] # [doc = "code. `code_hash` `para_id`"] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] # [doc = "The given validation code was accepted by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] # [doc = "The given validation code was rejected by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParaGenesisArgs { - pub genesis_head: - runtime_types::polkadot_parachain::primitives::HeadData, - pub validation_code: - runtime_types::polkadot_parachain::primitives::ValidationCode, - pub para_kind: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ParaLifecycle { - #[codec(index = 0)] - Onboarding, - #[codec(index = 1)] - Parathread, - #[codec(index = 2)] - Parachain, - #[codec(index = 3)] - UpgradingParathread, - #[codec(index = 4)] - DowngradingParachain, - #[codec(index = 5)] - OffboardingParathread, - #[codec(index = 6)] - OffboardingParachain, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParaPastCodeMeta < _0 > { pub upgrade_times : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: paras :: ReplacementTimes < _0 > > , pub last_pruned : :: core :: option :: Option < _0 > , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PvfCheckActiveVoteState<_0> { - pub votes_accept: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - pub votes_reject: ::subxt::utils::bits::DecodedBits< - ::core::primitive::u8, - ::subxt::utils::bits::Lsb0, - >, - pub age: _0, - pub created_at: _0, - pub causes: ::std::vec::Vec< - runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< - _0, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PvfCheckCause<_0> { - #[codec(index = 0)] - Onboarding(runtime_types::polkadot_parachain::primitives::Id), - #[codec(index = 1)] - Upgrade { - id: runtime_types::polkadot_parachain::primitives::Id, - relay_parent_number: _0, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReplacementTimes<_0> { - pub expected_at: _0, - pub activated_at: _0, - } - } - pub mod paras_inherent { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] - enter { - data: runtime_types::polkadot_primitives::v2::InherentData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Inclusion inherent called more than once per block."] - TooManyInclusionInherents, - #[codec(index = 1)] - #[doc = "The hash of the submitted parent header doesn't correspond to the saved block hash of"] - #[doc = "the parent."] - InvalidParentHeader, - #[codec(index = 2)] - #[doc = "Disputed candidate that was concluded invalid."] - CandidateConcludedInvalid, - #[codec(index = 3)] - #[doc = "The data given to the inherent will result in an overweight block."] - InherentOverweight, - #[codec(index = 4)] - #[doc = "The ordering of dispute statements was invalid."] - DisputeStatementsUnsortedOrDuplicates, - #[codec(index = 5)] - #[doc = "A dispute statement was invalid."] - DisputeInvalid, - } - } - } - pub mod scheduler { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssignmentKind { - #[codec(index = 0)] - Parachain, - #[codec(index = 1)] - Parathread( - runtime_types::polkadot_primitives::v2::collator_app::Public, - ::core::primitive::u32, - ), + #[doc = " The maximum length of a website URL."] + pub fn max_website_url_length( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Alliance", + "MaxWebsiteUrlLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CoreAssignment { pub core : runtime_types :: polkadot_primitives :: v2 :: CoreIndex , pub para_id : runtime_types :: polkadot_parachain :: primitives :: Id , pub kind : runtime_types :: polkadot_runtime_parachains :: scheduler :: AssignmentKind , pub group_idx : runtime_types :: polkadot_primitives :: v2 :: GroupIndex , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ParathreadClaimQueue { pub queue : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: QueuedParathread > , pub next_core_offset : :: core :: primitive :: u32 , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct QueuedParathread { - pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, - pub core_offset: ::core::primitive::u32, + #[doc = " The deposit required for submitting candidacy."] + pub fn ally_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Alliance", + "AllyDeposit", + [ + 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 shared { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call {} + #[doc = " The maximum number of announcements."] + pub fn max_announcements_count( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Alliance", + "MaxAnnouncementsCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 ump { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Service a single overweight upward message."] - #[doc = ""] - #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] - #[doc = "- `index`: The index of the overweight message to service."] - #[doc = "- `weight_limit`: The amount of weight that message execution may take."] - #[doc = ""] - #[doc = "Errors:"] - #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] - #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] - #[doc = ""] - #[doc = "Events:"] - #[doc = "- `OverweightServiced`: On success."] - service_overweight { - index: ::core::primitive::u64, - weight_limit: runtime_types::sp_weights::weight_v2::Weight, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 message index given is unknown."] - UnknownMessageIndex, - #[codec(index = 1)] - #[doc = "The amount of weight given is possibly not enough for executing the message."] - WeightOverLimit, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Upward message is invalid XCM."] - #[doc = "\\[ id \\]"] - InvalidFormat([::core::primitive::u8; 32usize]), - #[codec(index = 1)] - #[doc = "Upward message is unsupported version of XCM."] - #[doc = "\\[ id \\]"] - UnsupportedVersion([::core::primitive::u8; 32usize]), - #[codec(index = 2)] - #[doc = "Upward message executed with the given outcome."] - #[doc = "\\[ id, outcome \\]"] - ExecutedUpward( - [::core::primitive::u8; 32usize], - runtime_types::xcm::v2::traits::Outcome, - ), - #[codec(index = 3)] - #[doc = "The weight limit for handling upward messages was reached."] - #[doc = "\\[ id, remaining, required \\]"] - WeightExhausted( - [::core::primitive::u8; 32usize], - runtime_types::sp_weights::weight_v2::Weight, - runtime_types::sp_weights::weight_v2::Weight, - ), - #[codec(index = 4)] - #[doc = "Some upward messages have been received and will be processed."] - #[doc = "\\[ para, count, size \\]"] - UpwardMessagesReceived( - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u32, - ::core::primitive::u32, - ), - #[codec(index = 5)] - #[doc = "The weight budget was exceeded for an individual upward message."] - #[doc = ""] - #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] - #[doc = "using the assigned `overweight_index`."] - #[doc = ""] - #[doc = "\\[ para, id, overweight_index, required \\]"] - OverweightEnqueued( - runtime_types::polkadot_parachain::primitives::Id, - [::core::primitive::u8; 32usize], - ::core::primitive::u64, - runtime_types::sp_weights::weight_v2::Weight, - ), - #[codec(index = 6)] - #[doc = "Upward message from the overweight queue was executed with the given actual weight"] - #[doc = "used."] - #[doc = ""] - #[doc = "\\[ overweight_index, used \\]"] - OverweightServiced( - ::core::primitive::u64, - runtime_types::sp_weights::weight_v2::Weight, - ), - } + #[doc = " The maximum number of members per member role."] + pub fn max_members_count( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Alliance", + "MaxMembersCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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); - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - } - } - pub mod sp_consensus_babe { + } + pub mod nomination_pools { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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], - } - } + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -43602,13 +38611,10 @@ pub mod api { )] #[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, + pub struct Join { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub pool_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43619,13 +38625,11 @@ pub mod api { )] #[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 struct BondExtra { + pub extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, } - } - pub mod sp_consensus_slots { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -43635,14 +38639,8 @@ pub mod api { )] #[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, - } + pub struct ClaimPayout; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -43651,163 +38649,93 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Slot(pub ::core::primitive::u64); - } - pub mod sp_core { - use super::runtime_types; - pub mod bounded { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedBTreeMap<_0, _1>( - pub ::subxt::utils::KeyedVec<_0, _1>, - ); - } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } - pub mod crypto { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 struct Unbond { + pub member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + pub unbonding_points: ::core::primitive::u128, } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 33usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 65usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 64usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - pub mod offchain { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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< - runtime_types::sp_core::offchain::OpaqueMultiaddr, - >, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, } - pub mod sr25519 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub [::core::primitive::u8; 32usize]); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub [::core::primitive::u8; 64usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43818,7 +38746,10 @@ pub mod api { )] #[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>); + 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, @@ -43828,32 +38759,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Void {} - } - pub mod sp_finality_grandpa { - use super::runtime_types; - pub mod app { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::ed25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + pub struct SetState { + pub pool_id: ::core::primitive::u32, + pub state: runtime_types::pallet_nomination_pools::PoolState, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43864,23 +38772,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Equivocation<_0, _1> { - #[codec(index = 0)] - Prevote( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Prevote<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), - #[codec(index = 1)] - Precommit( - runtime_types::finality_grandpa::Equivocation< - runtime_types::sp_finality_grandpa::app::Public, - runtime_types::finality_grandpa::Precommit<_0, _1>, - runtime_types::sp_finality_grandpa::app::Signature, - >, - ), + pub struct SetMetadata { + pub pool_id: ::core::primitive::u32, + pub metadata: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -43891,14 +38785,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct EquivocationProof<_0, _1> { - pub set_id: ::core::primitive::u64, - pub equivocation: - runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, + pub struct SetConfigs { + pub min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + pub min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + pub max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + pub max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + pub max_members_per_pool: + runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, } - } - pub mod sp_npos_elections { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -43908,12 +38812,20 @@ pub mod api { )] #[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, + pub struct UpdateRoles { + pub pool_id: ::core::primitive::u32, + pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -43922,628 +38834,18819 @@ pub mod api { )] #[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 struct Chill { + pub pool_id: ::core::primitive::u32, } - } - 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, - Debug, - )] - #[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< - runtime_types::sp_runtime::generic::digest::DigestItem, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "join", + Join { amount, pool_id }, + [ + 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, + ], + ) } - 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, - Debug, - )] - #[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), + #[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::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, + ], + ) + } + #[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 {}, + [ + 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, + 229u8, 193u8, 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, + 222u8, 5u8, 236u8, 32u8, 88u8, 0u8, 198u8, 72u8, 196u8, + 181u8, 104u8, 16u8, 212u8, 29u8, + ], + ) + } + #[doc = "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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "unbond", + Unbond { + member_account, + unbonding_points, + }, + [ + 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, + ], + ) + } + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "pool_withdraw_unbonded", + PoolWithdrawUnbonded { + pool_id, + num_slashing_spans, + }, + [ + 152u8, 245u8, 131u8, 247u8, 106u8, 214u8, 154u8, 8u8, 7u8, + 210u8, 149u8, 218u8, 118u8, 46u8, 242u8, 182u8, 191u8, 119u8, + 28u8, 199u8, 36u8, 49u8, 219u8, 123u8, 58u8, 203u8, 211u8, + 226u8, 217u8, 36u8, 56u8, 0u8, + ], + ) + } + #[doc = "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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "withdraw_unbonded", + WithdrawUnbonded { + member_account, + num_slashing_spans, + }, + [ + 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, + ], + ) + } + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "create", + Create { + amount, + root, + nominator, + state_toggler, + }, + [ + 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, + ], + ) + } + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "create_with_pool_id", + CreateWithPoolId { + amount, + root, + nominator, + state_toggler, + pool_id, + }, + [ + 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, + ], + ) + } + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "nominate", + Nominate { + pool_id, + validators, + }, + [ + 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, + 172u8, 25u8, 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, + 13u8, 20u8, 89u8, 140u8, 159u8, 4u8, 132u8, 242u8, 192u8, + 146u8, 55u8, 251u8, 216u8, 255u8, + ], + ) + } + #[doc = "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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "set_state", + SetState { pool_id, state }, + [ + 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, + 180u8, 99u8, 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, + 192u8, 187u8, 39u8, 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, + 175u8, 159u8, 161u8, 151u8, 162u8, + ], + ) + } + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "set_metadata", + SetMetadata { pool_id, metadata }, + [ + 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, + 81u8, 31u8, 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, + 7u8, 8u8, 115u8, 158u8, 151u8, 30u8, 211u8, 52u8, 177u8, + 234u8, 87u8, 125u8, 127u8, + ], + ) + } + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + 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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "set_configs", + SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + max_members, + max_members_per_pool, + }, + [ + 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, + ], + ) + } + #[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::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "NominationPools", + "update_roles", + UpdateRoles { + pool_id, + new_root, + new_nominator, + new_state_toggler, + }, + [ + 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, + ], + ) + } + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Created"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub bonded: ::core::primitive::u128, + pub joined: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Bonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Bonded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A 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 PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PaidOut"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + pub struct Unbonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + pub points: ::core::primitive::u128, + pub era: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Unbonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + pub struct Withdrawn { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + pub points: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The state of a pool has changed"] + pub struct StateChanged { + pub pool_id: ::core::primitive::u32, + pub new_state: runtime_types::pallet_nomination_pools::PoolState, + } + impl ::subxt::events::StaticEvent for StateChanged { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "StateChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + pub struct MemberRemoved { + pub pool_id: ::core::primitive::u32, + pub member: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MemberRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + pub struct RolesUpdated { + pub root: ::core::option::Option<::subxt::utils::AccountId32>, + pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, + pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, + } + impl ::subxt::events::StaticEvent for RolesUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "RolesUpdated"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + pub struct PoolSlashed { + pub pool_id: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for PoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolSlashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + pub struct UnbondingPoolSlashed { + pub pool_id: ::core::primitive::u32, + pub era: ::core::primitive::u32, + pub balance: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "UnbondingPoolSlashed"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "MinJoinBond", + vec![], + [ + 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, + 58u8, 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, + 247u8, 97u8, 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, + 212u8, 217u8, 84u8, 240u8, 91u8, + ], + ) + } + #[doc = " Minimum bond required to create a pool."] + #[doc = ""] + #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] + #[doc = " indication of \"skin in the game\"."] + #[doc = ""] + #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] + #[doc = " while all other accounts leave."] + pub fn min_create_bond( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "MinCreateBond", + vec![], + [ + 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, + 210u8, 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, + 111u8, 181u8, 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, + 16u8, 222u8, 219u8, 67u8, + ], + ) + } + #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] + #[doc = " pools can exist."] + pub fn max_pools( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "MaxPools", + vec![], + [ + 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, + 195u8, 23u8, 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, + 68u8, 215u8, 162u8, 255u8, 217u8, 173u8, 141u8, 27u8, 72u8, + 199u8, 7u8, 240u8, 25u8, 34u8, + ], + ) + } + #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] + #[doc = " members are not bound on a system wide basis."] + pub fn max_pool_members( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "MaxPoolMembers", + vec![], + [ + 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, + 233u8, 59u8, 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, + 166u8, 89u8, 120u8, 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, + 88u8, 206u8, 41u8, 242u8, 62u8, + ], + ) + } + #[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::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "MaxPoolMembersPerPool", + vec![], + [ + 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, + 30u8, 55u8, 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, + 239u8, 195u8, 147u8, 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, + 248u8, 169u8, 186u8, 48u8, + ], + ) + } + #[doc = " Active members."] + #[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::StaticStorageAddress< + 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, + )], + [ + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, + 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, + 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, + 31u8, 60u8, 120u8, 100u8, 249u8, + ], + ) + } + #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_nomination_pools::PoolMember, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "PoolMembers", + Vec::new(), + [ + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, + 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, + 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, + 31u8, 60u8, 120u8, 100u8, 249u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_pool_members( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "CounterForPoolMembers", + vec![], + [ + 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, + 107u8, 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, + 31u8, 229u8, 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, + 42u8, 62u8, 212u8, 160u8, 2u8, + ], + ) + } + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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, + )], + [ + 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 = " Storage for bonded pools."] + pub fn bonded_pools_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "CounterForBondedPools", + vec![], + [ + 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, + 244u8, 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, + 58u8, 111u8, 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, + 135u8, 8u8, 171u8, 180u8, 236u8, + ], + ) + } + #[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::StaticStorageAddress< + runtime_types::pallet_nomination_pools::RewardPool, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "RewardPools", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + ], + ) + } + #[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::StaticStorageAddress< + runtime_types::pallet_nomination_pools::RewardPool, + (), + (), + ::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< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "CounterForRewardPools", + vec![], + [ + 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, + 23u8, 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, + 45u8, 205u8, 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, + 49u8, 143u8, 135u8, 201u8, 81u8, + ], + ) + } + #[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::StaticStorageAddress< + runtime_types::pallet_nomination_pools::SubPools, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "SubPoolsStorage", + vec![::subxt::storage::address::StorageMapKey::new( + _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, + ], + ) + } + #[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::StaticStorageAddress< + runtime_types::pallet_nomination_pools::SubPools, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "NominationPools", + "SubPoolsStorage", + 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, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::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, + ], + ) + } + #[doc = " Metadata for the pool."] + pub fn metadata( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + 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< + 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< + ::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< + ::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< + ::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< + ::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< + ::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< + runtime_types::frame_support::PalletId, + > { + ::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, + ], + ) + } + #[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<::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 ranked_polls { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Submit { + pub proposal_origin: + ::std::boxed::Box, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + pub enactment_moment: + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PlaceDecisionDeposit { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RefundDecisionDeposit { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Cancel { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Kill { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NudgeReferendum { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OneFewerDeciding { + pub track: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RefundSubmissionDeposit { + pub index: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + pub fn submit( + &self, + proposal_origin: runtime_types::kitchensink_runtime::OriginCaller, + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "submit", + Submit { + proposal_origin: ::std::boxed::Box::new(proposal_origin), + proposal, + enactment_moment, + }, + [ + 91u8, 158u8, 209u8, 182u8, 19u8, 184u8, 252u8, 30u8, 200u8, + 62u8, 92u8, 254u8, 200u8, 245u8, 134u8, 143u8, 135u8, 67u8, + 95u8, 107u8, 115u8, 109u8, 12u8, 48u8, 111u8, 239u8, 84u8, + 255u8, 23u8, 26u8, 140u8, 187u8, + ], + ) + } + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + pub fn place_decision_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "place_decision_deposit", + PlaceDecisionDeposit { index }, + [ + 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, + 232u8, 119u8, 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, + 145u8, 159u8, 84u8, 111u8, 36u8, 4u8, 206u8, 5u8, 139u8, + 231u8, 11u8, 231u8, 6u8, 30u8, + ], + ) + } + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + pub fn refund_decision_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "refund_decision_deposit", + RefundDecisionDeposit { index }, + [ + 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, + 93u8, 19u8, 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, + 244u8, 48u8, 202u8, 223u8, 201u8, 130u8, 112u8, 167u8, 29u8, + 207u8, 112u8, 181u8, 43u8, 93u8, + ], + ) + } + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + pub fn cancel( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "cancel", + Cancel { index }, + [ + 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, + 235u8, 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, + 223u8, 50u8, 245u8, 101u8, 97u8, 39u8, 226u8, 4u8, 196u8, + 16u8, 66u8, 177u8, 178u8, 252u8, + ], + ) + } + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + pub fn kill( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "kill", + Kill { index }, + [ + 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, + 141u8, 104u8, 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, + 84u8, 178u8, 246u8, 26u8, 113u8, 224u8, 157u8, 94u8, 16u8, + 14u8, 158u8, 80u8, 148u8, 198u8, + ], + ) + } + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + pub fn nudge_referendum( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "nudge_referendum", + NudgeReferendum { index }, + [ + 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, + 170u8, 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, + 7u8, 230u8, 243u8, 15u8, 206u8, 114u8, 8u8, 128u8, 46u8, + 150u8, 114u8, 241u8, 112u8, 97u8, + ], + ) + } + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + pub fn one_fewer_deciding( + &self, + track: ::core::primitive::u16, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "one_fewer_deciding", + OneFewerDeciding { track }, + [ + 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, + 110u8, 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, + 16u8, 143u8, 233u8, 137u8, 247u8, 138u8, 96u8, 32u8, 223u8, + 149u8, 52u8, 214u8, 195u8, + ], + ) + } + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + pub fn refund_submission_deposit( + &self, + index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload + { + ::subxt::tx::StaticTxPayload::new( + "RankedPolls", + "refund_submission_deposit", + RefundSubmissionDeposit { index }, + [ + 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, + 92u8, 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, + 23u8, 132u8, 89u8, 19u8, 81u8, 238u8, 133u8, 243u8, 56u8, + 70u8, 143u8, 43u8, 176u8, 83u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_referenda::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been submitted."] + pub struct Submitted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + } + impl ::subxt::events::StaticEvent for Submitted { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Submitted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The decision deposit has been placed."] + pub struct DecisionDepositPlaced { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DecisionDepositPlaced { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "DecisionDepositPlaced"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The decision deposit has been refunded."] + pub struct DecisionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DecisionDepositRefunded { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "DecisionDepositRefunded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A deposit has been slashaed."] + pub struct DepositSlashed { + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for DepositSlashed { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "DepositSlashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has moved into the deciding phase."] + pub struct DecisionStarted { + pub index: ::core::primitive::u32, + pub track: ::core::primitive::u16, + pub proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for DecisionStarted { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "DecisionStarted"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ConfirmStarted { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ConfirmStarted { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "ConfirmStarted"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ConfirmAborted { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for ConfirmAborted { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "ConfirmAborted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + pub struct Confirmed { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for Confirmed { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Confirmed"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been approved and its proposal has been scheduled."] + pub struct Approved { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Approved { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Approved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A proposal has been rejected by referendum."] + pub struct Rejected { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for Rejected { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Rejected"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been timed out without being decided."] + pub struct TimedOut { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for TimedOut { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "TimedOut"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for Cancelled { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Cancelled"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A referendum has been killed."] + pub struct Killed { + pub index: ::core::primitive::u32, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for Killed { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "Killed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The submission deposit has been refunded."] + pub struct SubmissionDepositRefunded { + pub index: ::core::primitive::u32, + pub who: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { + const PALLET: &'static str = "RankedPolls"; + const EVENT: &'static str = "SubmissionDepositRefunded"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "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, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::kitchensink_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_ranked_collective::Tally, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "ReferendumInfoFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 128u8, 64u8, 140u8, 106u8, 75u8, 20u8, 189u8, 69u8, 252u8, + 236u8, 182u8, 172u8, 253u8, 97u8, 170u8, 219u8, 220u8, 136u8, + 0u8, 231u8, 212u8, 97u8, 82u8, 41u8, 156u8, 142u8, 33u8, + 208u8, 70u8, 185u8, 182u8, 244u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + pub fn referendum_info_for_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_referenda::types::ReferendumInfo< + ::core::primitive::u16, + runtime_types::kitchensink_runtime::OriginCaller, + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + ::core::primitive::u128, + runtime_types::pallet_ranked_collective::Tally, + ::subxt::utils::AccountId32, + (::core::primitive::u32, ::core::primitive::u32), + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "ReferendumInfoFor", + Vec::new(), + [ + 128u8, 64u8, 140u8, 106u8, 75u8, 20u8, 189u8, 69u8, 252u8, + 236u8, 182u8, 172u8, 253u8, 97u8, 170u8, 219u8, 220u8, 136u8, + 0u8, 231u8, 212u8, 97u8, 82u8, 41u8, 156u8, 142u8, 33u8, + 208u8, 70u8, 185u8, 182u8, 244u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "TrackQueue", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 250u8, 6u8, 4u8, 145u8, 233u8, 136u8, 58u8, 26u8, 252u8, + 117u8, 90u8, 85u8, 189u8, 21u8, 196u8, 201u8, 108u8, 23u8, + 161u8, 157u8, 149u8, 70u8, 77u8, 137u8, 159u8, 246u8, 244u8, + 45u8, 134u8, 36u8, 231u8, 254u8, + ], + ) + } + #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] + #[doc = " conviction-weighted approvals."] + #[doc = ""] + #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] + pub fn track_queue_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "TrackQueue", + Vec::new(), + [ + 250u8, 6u8, 4u8, 145u8, 233u8, 136u8, 58u8, 26u8, 252u8, + 117u8, 90u8, 85u8, 189u8, 21u8, 196u8, 201u8, 108u8, 23u8, + 161u8, 157u8, 149u8, 70u8, 77u8, 137u8, 159u8, 246u8, 244u8, + 45u8, 134u8, 36u8, 231u8, 254u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "DecidingCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, + 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, + 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, + 234u8, 177u8, 223u8, 63u8, 150u8, + ], + ) + } + #[doc = " The number of referenda being decided currently."] + pub fn deciding_count_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedPolls", + "DecidingCount", + Vec::new(), + [ + 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, + 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, + 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, + 234u8, 177u8, 223u8, 63u8, 150u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn submission_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "RankedPolls", + "SubmissionDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum size of the referendum queue for a single track."] + pub fn max_queued( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "RankedPolls", + "MaxQueued", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The number of blocks after submission that a referendum must begin being decided by."] + #[doc = " Once this passes, then anyone may cancel the referendum."] + pub fn undeciding_timeout( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "RankedPolls", + "UndecidingTimeout", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] + #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] + #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] + pub fn alarm_interval( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "RankedPolls", + "AlarmInterval", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " Information concerning the different referendum tracks."] + pub fn tracks( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + ::std::vec::Vec<( + ::core::primitive::u16, + runtime_types::pallet_referenda::types::TrackInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + )>, + > { + ::subxt::constants::StaticConstantAddress::new( + "RankedPolls", + "Tracks", + [ + 71u8, 253u8, 246u8, 54u8, 168u8, 190u8, 182u8, 15u8, 207u8, + 26u8, 50u8, 138u8, 212u8, 124u8, 13u8, 203u8, 27u8, 35u8, + 224u8, 1u8, 176u8, 192u8, 197u8, 220u8, 147u8, 94u8, 196u8, + 150u8, 125u8, 23u8, 48u8, 255u8, + ], + ) + } + } + } + } + pub mod ranked_collective { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PromoteMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DemoteMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RemoveMember { + pub who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + pub min_rank: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote { + pub poll: ::core::primitive::u32, + pub aye: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CleanupPoll { + pub poll_index: ::core::primitive::u32, + pub max: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Introduce a new member."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of non-member which will become a member."] + #[doc = "- `rank`: The rank to give the new member."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn add_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "add_member", + AddMember { who }, + [ + 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, + ], + ) + } + #[doc = "Increment the rank of an existing member by one."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn promote_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "promote_member", + PromoteMember { who }, + [ + 253u8, 173u8, 241u8, 51u8, 86u8, 53u8, 201u8, 217u8, 19u8, + 193u8, 223u8, 249u8, 125u8, 125u8, 97u8, 12u8, 36u8, 68u8, + 93u8, 152u8, 83u8, 14u8, 106u8, 38u8, 163u8, 216u8, 63u8, + 79u8, 254u8, 6u8, 79u8, 80u8, + ], + ) + } + #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] + #[doc = "then they are removed entirely."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] + pub fn demote_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "demote_member", + DemoteMember { who }, + [ + 199u8, 199u8, 22u8, 115u8, 223u8, 23u8, 187u8, 33u8, 89u8, + 244u8, 148u8, 87u8, 75u8, 187u8, 108u8, 176u8, 69u8, 250u8, + 72u8, 90u8, 161u8, 218u8, 14u8, 156u8, 82u8, 159u8, 200u8, + 141u8, 217u8, 221u8, 65u8, 174u8, + ], + ) + } + #[doc = "Remove the member entirely."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "- `min_rank`: The rank of the member or greater."] + #[doc = ""] + #[doc = "Weight: `O(min_rank)`."] + pub fn remove_member( + &self, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + min_rank: ::core::primitive::u16, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "remove_member", + RemoveMember { who, min_rank }, + [ + 244u8, 61u8, 35u8, 202u8, 97u8, 223u8, 51u8, 2u8, 76u8, + 170u8, 141u8, 197u8, 90u8, 159u8, 112u8, 185u8, 180u8, 45u8, + 51u8, 206u8, 121u8, 227u8, 206u8, 134u8, 72u8, 243u8, 4u8, + 83u8, 167u8, 63u8, 65u8, 44u8, + ], + ) + } + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed` by a member account."] + #[doc = "- `poll`: Index of a poll which is ongoing."] + #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] + #[doc = ""] + #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = ""] + #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] + pub fn vote( + &self, + poll: ::core::primitive::u32, + aye: ::core::primitive::bool, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "vote", + Vote { poll, aye }, + [ + 76u8, 243u8, 228u8, 228u8, 168u8, 70u8, 128u8, 140u8, 206u8, + 48u8, 220u8, 178u8, 134u8, 107u8, 76u8, 106u8, 137u8, 0u8, + 200u8, 156u8, 21u8, 160u8, 123u8, 213u8, 251u8, 105u8, 94u8, + 249u8, 63u8, 164u8, 196u8, 243u8, + ], + ) + } + #[doc = "Remove votes from the given poll. It must have ended."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed` by any account."] + #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] + #[doc = " exist."] + #[doc = "- `max`: Maximum number of vote items from remove in this call."] + #[doc = ""] + #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = ""] + #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] + pub fn cleanup_poll( + &self, + poll_index: ::core::primitive::u32, + max: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "RankedCollective", + "cleanup_poll", + CleanupPoll { poll_index, max }, + [ + 163u8, 143u8, 138u8, 57u8, 50u8, 73u8, 137u8, 95u8, 35u8, + 87u8, 114u8, 216u8, 49u8, 151u8, 196u8, 247u8, 46u8, 255u8, + 155u8, 63u8, 178u8, 240u8, 54u8, 124u8, 9u8, 168u8, 11u8, + 228u8, 205u8, 162u8, 233u8, 183u8, + ], + ) + } + } + } + #[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_ranked_collective::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A member `who` has been added."] + pub struct MemberAdded { + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for MemberAdded { + const PALLET: &'static str = "RankedCollective"; + const EVENT: &'static str = "MemberAdded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The member `who`se rank has been changed to the given `rank`."] + pub struct RankChanged { + pub who: ::subxt::utils::AccountId32, + pub rank: ::core::primitive::u16, + } + impl ::subxt::events::StaticEvent for RankChanged { + const PALLET: &'static str = "RankedCollective"; + const EVENT: &'static str = "RankChanged"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The member `who` of given `rank` has been removed from the collective."] + pub struct MemberRemoved { + pub who: ::subxt::utils::AccountId32, + pub rank: ::core::primitive::u16, + } + impl ::subxt::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "RankedCollective"; + const EVENT: &'static str = "MemberRemoved"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] + #[doc = "`tally`."] + pub struct Voted { + pub who: ::subxt::utils::AccountId32, + pub poll: ::core::primitive::u32, + pub vote: runtime_types::pallet_ranked_collective::VoteRecord, + pub tally: runtime_types::pallet_ranked_collective::Tally, + } + impl ::subxt::events::StaticEvent for Voted { + const PALLET: &'static str = "RankedCollective"; + const EVENT: &'static str = "Voted"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The number of members in the collective who have at least the rank according to the index"] + #[doc = " of the vec."] + pub fn member_count( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "MemberCount", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 122u8, 103u8, 33u8, 235u8, 19u8, 181u8, 16u8, 140u8, 233u8, + 252u8, 27u8, 219u8, 12u8, 127u8, 16u8, 137u8, 240u8, 120u8, + 208u8, 247u8, 81u8, 138u8, 52u8, 32u8, 120u8, 206u8, 141u8, + 101u8, 215u8, 66u8, 147u8, 170u8, + ], + ) + } + #[doc = " The number of members in the collective who have at least the rank according to the index"] + #[doc = " of the vec."] + pub fn member_count_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "MemberCount", + Vec::new(), + [ + 122u8, 103u8, 33u8, 235u8, 19u8, 181u8, 16u8, 140u8, 233u8, + 252u8, 27u8, 219u8, 12u8, 127u8, 16u8, 137u8, 240u8, 120u8, + 208u8, 247u8, 81u8, 138u8, 52u8, 32u8, 120u8, 206u8, 141u8, + 101u8, 215u8, 66u8, 147u8, 170u8, + ], + ) + } + #[doc = " The current members of the collective."] + pub fn members( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_ranked_collective::MemberRecord, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "Members", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 98u8, 137u8, 208u8, 103u8, 187u8, 115u8, 182u8, 10u8, 226u8, + 35u8, 218u8, 247u8, 229u8, 205u8, 104u8, 89u8, 150u8, 229u8, + 247u8, 45u8, 241u8, 51u8, 134u8, 210u8, 232u8, 159u8, 179u8, + 232u8, 249u8, 153u8, 186u8, 245u8, + ], + ) + } + #[doc = " The current members of the collective."] + pub fn members_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_ranked_collective::MemberRecord, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "Members", + Vec::new(), + [ + 98u8, 137u8, 208u8, 103u8, 187u8, 115u8, 182u8, 10u8, 226u8, + 35u8, 218u8, 247u8, 229u8, 205u8, 104u8, 89u8, 150u8, 229u8, + 247u8, 45u8, 241u8, 51u8, 134u8, 210u8, 232u8, 159u8, 179u8, + 232u8, 249u8, 153u8, 186u8, 245u8, + ], + ) + } + #[doc = " The index of each ranks's member into the group of members who have at least that rank."] + pub fn id_to_index( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "IdToIndex", + 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, + ), + ], + [ + 186u8, 92u8, 44u8, 141u8, 26u8, 112u8, 63u8, 128u8, 66u8, + 62u8, 160u8, 33u8, 121u8, 155u8, 190u8, 153u8, 38u8, 255u8, + 197u8, 21u8, 141u8, 192u8, 157u8, 229u8, 149u8, 104u8, 11u8, + 119u8, 161u8, 182u8, 248u8, 105u8, + ], + ) + } + #[doc = " The index of each ranks's member into the group of members who have at least that rank."] + pub fn id_to_index_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "IdToIndex", + Vec::new(), + [ + 186u8, 92u8, 44u8, 141u8, 26u8, 112u8, 63u8, 128u8, 66u8, + 62u8, 160u8, 33u8, 121u8, 155u8, 190u8, 153u8, 38u8, 255u8, + 197u8, 21u8, 141u8, 192u8, 157u8, 229u8, 149u8, 104u8, 11u8, + 119u8, 161u8, 182u8, 248u8, 105u8, + ], + ) + } + #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] + #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] + pub fn index_to_id( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u16>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "IndexToId", + 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, + ), + ], + [ + 216u8, 113u8, 138u8, 39u8, 227u8, 44u8, 222u8, 36u8, 175u8, + 134u8, 181u8, 1u8, 242u8, 50u8, 75u8, 177u8, 213u8, 252u8, + 224u8, 241u8, 195u8, 74u8, 163u8, 223u8, 100u8, 61u8, 96u8, + 1u8, 205u8, 147u8, 63u8, 64u8, + ], + ) + } + #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] + #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] + pub fn index_to_id_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::subxt::utils::AccountId32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "IndexToId", + Vec::new(), + [ + 216u8, 113u8, 138u8, 39u8, 227u8, 44u8, 222u8, 36u8, 175u8, + 134u8, 181u8, 1u8, 242u8, 50u8, 75u8, 177u8, 213u8, 252u8, + 224u8, 241u8, 195u8, 74u8, 163u8, 223u8, 100u8, 61u8, 96u8, + 1u8, 205u8, 147u8, 63u8, 64u8, + ], + ) + } + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_ranked_collective::VoteRecord, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + :: subxt :: storage :: address :: StaticStorageAddress :: new ("RankedCollective" , "Voting" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat)] , [113u8 , 198u8 , 3u8 , 155u8 , 220u8 , 110u8 , 5u8 , 50u8 , 91u8 , 232u8 , 18u8 , 224u8 , 39u8 , 238u8 , 17u8 , 28u8 , 21u8 , 44u8 , 36u8 , 12u8 , 109u8 , 10u8 , 191u8 , 81u8 , 78u8 , 76u8 , 155u8 , 66u8 , 99u8 , 180u8 , 63u8 , 99u8 ,]) + } + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_ranked_collective::VoteRecord, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "Voting", + Vec::new(), + [ + 113u8, 198u8, 3u8, 155u8, 220u8, 110u8, 5u8, 50u8, 91u8, + 232u8, 18u8, 224u8, 39u8, 238u8, 17u8, 28u8, 21u8, 44u8, + 36u8, 12u8, 109u8, 10u8, 191u8, 81u8, 78u8, 76u8, 155u8, + 66u8, 99u8, 180u8, 63u8, 99u8, + ], + ) + } + pub fn voting_cleanup( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "VotingCleanup", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Blake2_128Concat, + )], + [ + 49u8, 202u8, 198u8, 106u8, 238u8, 117u8, 209u8, 225u8, 166u8, + 130u8, 38u8, 236u8, 172u8, 59u8, 21u8, 168u8, 189u8, 41u8, + 190u8, 54u8, 74u8, 255u8, 230u8, 255u8, 160u8, 237u8, 70u8, + 208u8, 44u8, 182u8, 96u8, 157u8, + ], + ) + } + pub fn voting_cleanup_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "RankedCollective", + "VotingCleanup", + Vec::new(), + [ + 49u8, 202u8, 198u8, 106u8, 238u8, 117u8, 209u8, 225u8, 166u8, + 130u8, 38u8, 236u8, 172u8, 59u8, 21u8, 168u8, 189u8, 41u8, + 190u8, 54u8, 74u8, 255u8, 230u8, 255u8, 160u8, 237u8, 70u8, + 208u8, 44u8, 182u8, 96u8, 157u8, + ], + ) + } + } + } + } + pub mod fast_unstake { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RegisterFastUnstake; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deregister; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Control { + pub unchecked_eras_to_check: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register oneself for fast-unstake."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] + #[doc = "`staking::unbond`."] + #[doc = ""] + #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] + #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] + #[doc = "to be checked in further blocks."] + #[doc = ""] + #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] + #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] + #[doc = ""] + #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] + #[doc = "unstaked."] + #[doc = ""] + #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] + #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] + #[doc = "the chain's resources."] + pub fn register_fast_unstake( + &self, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "FastUnstake", + "register_fast_unstake", + RegisterFastUnstake {}, + [ + 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, + 117u8, 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, + 180u8, 85u8, 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, + 184u8, 177u8, 129u8, 42u8, 122u8, + ], + ) + } + #[doc = "Deregister oneself from the fast-unstake."] + #[doc = ""] + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] + #[doc = ""] + #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] + #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] + #[doc = "`Staking::rebond`."] + pub fn deregister(&self) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "FastUnstake", + "deregister", + Deregister {}, + [ + 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, + 181u8, 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, + 242u8, 155u8, 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, + 144u8, 35u8, 252u8, 88u8, 21u8, + ], + ) + } + #[doc = "Control the operation of this pallet."] + #[doc = ""] + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + pub fn control( + &self, + unchecked_eras_to_check: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "FastUnstake", + "control", + Control { + unchecked_eras_to_check, + }, + [ + 134u8, 85u8, 43u8, 231u8, 209u8, 34u8, 248u8, 0u8, 238u8, + 73u8, 175u8, 105u8, 40u8, 128u8, 186u8, 40u8, 211u8, 106u8, + 107u8, 206u8, 124u8, 155u8, 220u8, 125u8, 143u8, 10u8, 162u8, + 20u8, 99u8, 142u8, 243u8, 5u8, + ], + ) + } + } + } + #[doc = "The events of this pallet."] + pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A staker was unstaked."] + pub struct Unstaked { + pub stash: ::subxt::utils::AccountId32, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for Unstaked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Unstaked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] + pub struct Slashed { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An internal error happened. Operations will be paused now."] + pub struct InternalError; + impl ::subxt::events::StaticEvent for InternalError { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "InternalError"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A batch was partially checked for the given eras, but the process did not finish."] + pub struct BatchChecked { + pub eras: ::std::vec::Vec<::core::primitive::u32>, + } + impl ::subxt::events::StaticEvent for BatchChecked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchChecked"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A batch was terminated."] + #[doc = ""] + #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] + #[doc = "of the batch. A new batch will be created upon next block."] + pub struct BatchFinished; + impl ::subxt::events::StaticEvent for BatchFinished { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchFinished"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current \"head of the queue\" being unstaked."] + pub fn head( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_fast_unstake::types::UnstakeRequest, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "FastUnstake", + "Head", + vec![], + [ + 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, + 110u8, 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, + 2u8, 213u8, 134u8, 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, + 42u8, 135u8, 212u8, 108u8, 177u8, + ], + ) + } + #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = ""] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn queue( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "FastUnstake", + "Queue", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, + 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, + 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, + 205u8, 173u8, 189u8, 230u8, 71u8, + ], + ) + } + #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = ""] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn queue_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "FastUnstake", + "Queue", + Vec::new(), + [ + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, + 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, + 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, + 205u8, 173u8, 189u8, 230u8, 71u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_queue( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "FastUnstake", + "CounterForQueue", + vec![], + [ + 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, + 63u8, 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, + 112u8, 5u8, 248u8, 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, + 237u8, 4u8, 138u8, 210u8, + ], + ) + } + #[doc = " Number of eras to check per block."] + #[doc = ""] + #[doc = " If set to 0, this pallet does absolutely nothing."] + #[doc = ""] + #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] + #[doc = " nominator might be checked."] + pub fn eras_to_check_per_block( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "FastUnstake", + "ErasToCheckPerBlock", + vec![], + [ + 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, + 250u8, 203u8, 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, + 254u8, 23u8, 49u8, 140u8, 195u8, 116u8, 66u8, 124u8, 165u8, + 161u8, 151u8, 174u8, 37u8, 51u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Deposit to take for unstaking, to make sure we're able to slash the it in order to cover"] + #[doc = " the costs of resources on unsuccessful unstake."] + pub fn deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "FastUnstake", + "Deposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + } + } + } + pub mod message_queue { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReapPage { + pub message_origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub page_index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExecuteOverweight { + pub message_origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub page: ::core::primitive::u32, + pub index: ::core::primitive::u32, + pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Remove a page which has no more messages remaining to be processed or is stale."] + pub fn reap_page( + &self, + message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin, + page_index: ::core::primitive::u32, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "MessageQueue", + "reap_page", + ReapPage { + message_origin, + page_index, + }, + [ + 5u8, 51u8, 124u8, 179u8, 60u8, 176u8, 165u8, 46u8, 182u8, + 66u8, 119u8, 34u8, 69u8, 23u8, 129u8, 78u8, 44u8, 218u8, + 241u8, 83u8, 48u8, 97u8, 172u8, 46u8, 68u8, 182u8, 37u8, + 162u8, 98u8, 95u8, 10u8, 254u8, + ], + ) + } + #[doc = "Execute an overweight message."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `message_origin`: The origin from which the message to be executed arrived."] + #[doc = "- `page`: The page in the queue in which the message to be executed is sitting."] + #[doc = "- `index`: The index into the queue of the message to be executed."] + #[doc = "- `weight_limit`: The maximum amount of weight allowed to be consumed in the execution"] + #[doc = " of the message."] + #[doc = ""] + #[doc = "Benchmark complexity considerations: O(index + weight_limit)."] + pub fn execute_overweight( + &self, + message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin, + page: ::core::primitive::u32, + index: ::core::primitive::u32, + weight_limit: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::StaticTxPayload { + ::subxt::tx::StaticTxPayload::new( + "MessageQueue", + "execute_overweight", + ExecuteOverweight { + message_origin, + page, + index, + weight_limit, + }, + [ + 190u8, 229u8, 183u8, 199u8, 95u8, 209u8, 59u8, 104u8, 156u8, + 242u8, 142u8, 147u8, 184u8, 253u8, 150u8, 19u8, 156u8, 175u8, + 198u8, 72u8, 136u8, 149u8, 53u8, 75u8, 106u8, 182u8, 116u8, + 234u8, 63u8, 10u8, 153u8, 212u8, + ], + ) + } + } + } + #[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_message_queue::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Message discarded due to an inability to decode the item. Usually caused by state"] + #[doc = "corruption."] + pub struct Discarded { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Discarded { + const PALLET: &'static str = "MessageQueue"; + const EVENT: &'static str = "Discarded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Message discarded due to an error in the `MessageProcessor` (usually a format error)."] + pub struct ProcessingFailed { + pub hash: ::subxt::utils::H256, + pub origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub error: + runtime_types::frame_support::traits::messages::ProcessMessageError, + } + impl ::subxt::events::StaticEvent for ProcessingFailed { + const PALLET: &'static str = "MessageQueue"; + const EVENT: &'static str = "ProcessingFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Message is processed."] + pub struct Processed { + pub hash: ::subxt::utils::H256, + pub origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub weight_used: runtime_types::sp_weights::weight_v2::Weight, + pub success: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Processed { + const PALLET: &'static str = "MessageQueue"; + const EVENT: &'static str = "Processed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Message placed in overweight queue."] + pub struct OverweightEnqueued { + pub hash: ::subxt::utils::H256, + pub origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub page_index: ::core::primitive::u32, + pub message_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for OverweightEnqueued { + const PALLET: &'static str = "MessageQueue"; + const EVENT: &'static str = "OverweightEnqueued"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "This page was reaped."] + pub struct PageReaped { + pub origin: + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for PageReaped { + const PALLET: &'static str = "MessageQueue"; + const EVENT: &'static str = "PageReaped"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The index of the first and last (non-empty) pages."] + pub fn book_state_for( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + >, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_message_queue::BookState< + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "MessageQueue", + "BookStateFor", + vec![::subxt::storage::address::StorageMapKey::new( + _0.borrow(), + ::subxt::storage::address::StorageHasher::Twox64Concat, + )], + [ + 115u8, 200u8, 55u8, 195u8, 65u8, 240u8, 86u8, 187u8, 229u8, + 140u8, 7u8, 98u8, 151u8, 231u8, 75u8, 154u8, 131u8, 223u8, + 74u8, 111u8, 160u8, 48u8, 235u8, 223u8, 215u8, 193u8, 153u8, + 73u8, 135u8, 197u8, 223u8, 10u8, + ], + ) + } + #[doc = " The index of the first and last (non-empty) pages."] + pub fn book_state_for_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_message_queue::BookState< + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "MessageQueue", + "BookStateFor", + Vec::new(), + [ + 115u8, 200u8, 55u8, 195u8, 65u8, 240u8, 86u8, 187u8, 229u8, + 140u8, 7u8, 98u8, 151u8, 231u8, 75u8, 154u8, 131u8, 223u8, + 74u8, 111u8, 160u8, 48u8, 235u8, 223u8, 215u8, 193u8, 153u8, + 73u8, 135u8, 197u8, 223u8, 10u8, + ], + ) + } + #[doc = " The origin at which we should begin servicing."] + pub fn service_head( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::StaticStorageAddress::new( + "MessageQueue", + "ServiceHead", + vec![], + [ + 20u8, 45u8, 85u8, 181u8, 153u8, 58u8, 1u8, 235u8, 167u8, + 192u8, 66u8, 81u8, 199u8, 37u8, 194u8, 250u8, 27u8, 28u8, + 18u8, 100u8, 244u8, 181u8, 45u8, 11u8, 35u8, 89u8, 208u8, + 63u8, 245u8, 72u8, 29u8, 137u8, + ], + ) + } + #[doc = " The map of page indices to pages."] + pub fn pages( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, + >, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_message_queue::Page<::core::primitive::u32>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "MessageQueue", + "Pages", + 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, + ), + ], + [ + 25u8, 173u8, 204u8, 57u8, 137u8, 77u8, 88u8, 162u8, 83u8, + 32u8, 67u8, 15u8, 74u8, 153u8, 151u8, 94u8, 135u8, 219u8, + 9u8, 46u8, 156u8, 13u8, 143u8, 177u8, 216u8, 96u8, 83u8, + 116u8, 237u8, 79u8, 76u8, 92u8, + ], + ) + } + #[doc = " The map of page indices to pages."] + pub fn pages_root( + &self, + ) -> ::subxt::storage::address::StaticStorageAddress< + runtime_types::pallet_message_queue::Page<::core::primitive::u32>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::StaticStorageAddress::new( + "MessageQueue", + "Pages", + Vec::new(), + [ + 25u8, 173u8, 204u8, 57u8, 137u8, 77u8, 88u8, 162u8, 83u8, + 32u8, 67u8, 15u8, 74u8, 153u8, 151u8, 94u8, 135u8, 219u8, + 9u8, 46u8, 156u8, 13u8, 143u8, 177u8, 216u8, 96u8, 83u8, + 116u8, 237u8, 79u8, 76u8, 92u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The size of the page; this implies the maximum message size which can be sent."] + #[doc = ""] + #[doc = " A good value depends on the expected message sizes, their weights, the weight that is"] + #[doc = " available for processing them and the maximal needed message size. The maximal message"] + #[doc = " size is slightly lower than this as defined by [`MaxMessageLenOf`]."] + pub fn heap_size( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "MessageQueue", + "HeapSize", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 stale pages (i.e. of overweight messages) allowed before culling"] + #[doc = " can happen. Once there are more stale pages than this, then historical pages may be"] + #[doc = " dropped, even if they contain unprocessed overweight messages."] + pub fn max_stale( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "MessageQueue", + "MaxStale", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 of weight (if any) which should be provided to the message queue for"] + #[doc = " servicing enqueued items."] + #[doc = ""] + #[doc = " This may be legitimately `None` in the case that you will call"] + #[doc = " `ServiceQueues::service_queues` manually."] + pub fn service_weight( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + ::core::option::Option, + > { + ::subxt::constants::StaticConstantAddress::new( + "MessageQueue", + "ServiceWeight", + [ + 199u8, 205u8, 164u8, 188u8, 101u8, 240u8, 98u8, 54u8, 0u8, + 78u8, 218u8, 77u8, 164u8, 196u8, 0u8, 194u8, 181u8, 251u8, + 195u8, 24u8, 98u8, 147u8, 169u8, 53u8, 22u8, 202u8, 66u8, + 236u8, 163u8, 36u8, 162u8, 46u8, + ], + ) + } + } + } + } + pub mod runtime_types { + use super::runtime_types; + 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PostDispatchInfo { + pub actual_weight: ::core::option::Option< + runtime_types::sp_weights::weight_v2::Weight, + >, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 messages { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ProcessMessageError { + #[codec(index = 0)] + BadFormat, + #[codec(index = 1)] + Corrupt, + #[codec(index = 2)] + Unsupported, + #[codec(index = 3)] + Overweight(runtime_types::sp_weights::weight_v2::Weight), + } + } + 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, + Debug, + )] + #[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, + Debug, + )] + #[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 schedule { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchTime<_0> { + #[codec(index = 0)] + At(_0), + #[codec(index = 1)] + After(_0), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AttributeNamespace<_0> { + #[codec(index = 0)] + Pallet, + #[codec(index = 1)] + CollectionOwner, + #[codec(index = 2)] + ItemOwner, + #[codec(index = 3)] + Account(_0), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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< + runtime_types::sp_weights::weight_v2::Weight, + >, + pub max_total: ::core::option::Option< + runtime_types::sp_weights::weight_v2::Weight, + >, + pub reserved: ::core::option::Option< + runtime_types::sp_weights::weight_v2::Weight, + >, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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 kitchensink_runtime { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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>, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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 = 51)] + AllianceMotion( + runtime_types::pallet_collective::RawOrigin< + ::subxt::utils::AccountId32, + >, + ), + #[codec(index = 4)] + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ProxyType { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + NonTransfer, + #[codec(index = 2)] + Governance, + #[codec(index = 3)] + Staking, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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::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)] + Contracts(runtime_types::pallet_contracts::pallet::Call), + #[codec(index = 20)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + #[codec(index = 21)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), + #[codec(index = 26)] + Identity(runtime_types::pallet_identity::pallet::Call), + #[codec(index = 27)] + Society(runtime_types::pallet_society::pallet::Call), + #[codec(index = 28)] + Recovery(runtime_types::pallet_recovery::pallet::Call), + #[codec(index = 29)] + Vesting(runtime_types::pallet_vesting::pallet::Call), + #[codec(index = 30)] + Scheduler(runtime_types::pallet_scheduler::pallet::Call), + #[codec(index = 31)] + Preimage(runtime_types::pallet_preimage::pallet::Call), + #[codec(index = 32)] + Proxy(runtime_types::pallet_proxy::pallet::Call), + #[codec(index = 33)] + Multisig(runtime_types::pallet_multisig::pallet::Call), + #[codec(index = 34)] + Bounties(runtime_types::pallet_bounties::pallet::Call), + #[codec(index = 35)] + Tips(runtime_types::pallet_tips::pallet::Call), + #[codec(index = 36)] + Assets(runtime_types::pallet_assets::pallet::Call), + #[codec(index = 38)] + Lottery(runtime_types::pallet_lottery::pallet::Call), + #[codec(index = 39)] + Nis(runtime_types::pallet_nis::pallet::Call), + #[codec(index = 40)] + Uniques(runtime_types::pallet_uniques::pallet::Call), + #[codec(index = 41)] + Nfts(runtime_types::pallet_nfts::pallet::Call), + #[codec(index = 42)] + TransactionStorage( + runtime_types::pallet_transaction_storage::pallet::Call, + ), + #[codec(index = 43)] + VoterList(runtime_types::pallet_bags_list::pallet::Call), + #[codec(index = 44)] + StateTrieMigration( + runtime_types::pallet_state_trie_migration::pallet::Call, + ), + #[codec(index = 45)] + ChildBounties(runtime_types::pallet_child_bounties::pallet::Call), + #[codec(index = 46)] + Referenda(runtime_types::pallet_referenda::pallet::Call), + #[codec(index = 47)] + Remark(runtime_types::pallet_remark::pallet::Call), + #[codec(index = 48)] + RootTesting(runtime_types::pallet_root_testing::pallet::Call), + #[codec(index = 49)] + ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Call), + #[codec(index = 50)] + Whitelist(runtime_types::pallet_whitelist::pallet::Call), + #[codec(index = 51)] + AllianceMotion(runtime_types::pallet_collective::pallet::Call), + #[codec(index = 52)] + Alliance(runtime_types::pallet_alliance::pallet::Call), + #[codec(index = 53)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), + #[codec(index = 54)] + RankedPolls(runtime_types::pallet_referenda::pallet::Call), + #[codec(index = 55)] + RankedCollective(runtime_types::pallet_ranked_collective::pallet::Call), + #[codec(index = 56)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Call), + #[codec(index = 57)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Call), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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 = 8)] + AssetTxPayment(runtime_types::pallet_asset_tx_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)] + Contracts(runtime_types::pallet_contracts::pallet::Event), + #[codec(index = 20)] + Sudo(runtime_types::pallet_sudo::pallet::Event), + #[codec(index = 21)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), + #[codec(index = 23)] + Offences(runtime_types::pallet_offences::pallet::Event), + #[codec(index = 26)] + Identity(runtime_types::pallet_identity::pallet::Event), + #[codec(index = 27)] + Society(runtime_types::pallet_society::pallet::Event), + #[codec(index = 28)] + Recovery(runtime_types::pallet_recovery::pallet::Event), + #[codec(index = 29)] + Vesting(runtime_types::pallet_vesting::pallet::Event), + #[codec(index = 30)] + Scheduler(runtime_types::pallet_scheduler::pallet::Event), + #[codec(index = 31)] + Preimage(runtime_types::pallet_preimage::pallet::Event), + #[codec(index = 32)] + Proxy(runtime_types::pallet_proxy::pallet::Event), + #[codec(index = 33)] + Multisig(runtime_types::pallet_multisig::pallet::Event), + #[codec(index = 34)] + Bounties(runtime_types::pallet_bounties::pallet::Event), + #[codec(index = 35)] + Tips(runtime_types::pallet_tips::pallet::Event), + #[codec(index = 36)] + Assets(runtime_types::pallet_assets::pallet::Event), + #[codec(index = 38)] + Lottery(runtime_types::pallet_lottery::pallet::Event), + #[codec(index = 39)] + Nis(runtime_types::pallet_nis::pallet::Event), + #[codec(index = 40)] + Uniques(runtime_types::pallet_uniques::pallet::Event), + #[codec(index = 41)] + Nfts(runtime_types::pallet_nfts::pallet::Event), + #[codec(index = 42)] + TransactionStorage( + runtime_types::pallet_transaction_storage::pallet::Event, + ), + #[codec(index = 43)] + VoterList(runtime_types::pallet_bags_list::pallet::Event), + #[codec(index = 44)] + StateTrieMigration( + runtime_types::pallet_state_trie_migration::pallet::Event, + ), + #[codec(index = 45)] + ChildBounties(runtime_types::pallet_child_bounties::pallet::Event), + #[codec(index = 46)] + Referenda(runtime_types::pallet_referenda::pallet::Event), + #[codec(index = 47)] + Remark(runtime_types::pallet_remark::pallet::Event), + #[codec(index = 49)] + ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Event), + #[codec(index = 50)] + Whitelist(runtime_types::pallet_whitelist::pallet::Event), + #[codec(index = 51)] + AllianceMotion(runtime_types::pallet_collective::pallet::Event), + #[codec(index = 52)] + Alliance(runtime_types::pallet_alliance::pallet::Event), + #[codec(index = 53)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + #[codec(index = 54)] + RankedPolls(runtime_types::pallet_referenda::pallet::Event), + #[codec(index = 55)] + RankedCollective(runtime_types::pallet_ranked_collective::pallet::Event), + #[codec(index = 56)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Event), + #[codec(index = 57)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Event), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionKeys { + pub grandpa: runtime_types::sp_finality_grandpa::app::Public, + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub im_online: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + pub authority_discovery: + runtime_types::sp_authority_discovery::app::Public, + } + } + pub mod pallet_alliance { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a new proposal to be voted on."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + vote { + proposal: ::subxt::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + }, + #[codec(index = 2)] + #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + 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 = 3)] + #[doc = "Initialize the Alliance, onboard fellows and allies."] + #[doc = ""] + #[doc = "The Alliance must be empty, and the call must provide some founding members."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + init_members { + fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, + allies: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 4)] + #[doc = "Disband the Alliance, remove all active members and unreserve deposits."] + #[doc = ""] + #[doc = "Witness data must be set."] + disband { + witness: runtime_types::pallet_alliance::types::DisbandWitness, + }, + #[codec(index = 5)] + #[doc = "Set a new IPFS CID to the alliance rule."] + set_rule { + rule: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 6)] + #[doc = "Make an announcement of a new IPFS CID about alliance issues."] + announce { + announcement: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 7)] + #[doc = "Remove an announcement."] + remove_announcement { + announcement: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 8)] + #[doc = "Submit oneself for candidacy. A fixed deposit is reserved."] + join_alliance, + #[codec(index = 9)] + #[doc = "A Fellow can nominate someone to join the alliance as an Ally. There is no deposit"] + #[doc = "required from the nominator or nominee."] + nominate_ally { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 10)] + #[doc = "Elevate an Ally to Fellow."] + elevate_ally { + ally: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 11)] + #[doc = "As a member, give a retirement notice and start a retirement period required to pass in"] + #[doc = "order to retire."] + give_retirement_notice, + #[codec(index = 12)] + #[doc = "As a member, retire from the Alliance and unreserve the deposit."] + #[doc = ""] + #[doc = "This can only be done once you have called `give_retirement_notice` and the"] + #[doc = "`RetirementPeriod` has passed."] + retire, + #[codec(index = 13)] + #[doc = "Kick a member from the Alliance and slash its deposit."] + kick_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Add accounts or websites to the list of unscrupulous items."] + add_unscrupulous_items { + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + }, + #[codec(index = 15)] + #[doc = "Deem some items no longer unscrupulous."] + remove_unscrupulous_items { + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + }, + #[codec(index = 16)] + #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] + #[doc = ""] + #[doc = "Must be called by a Fellow."] + 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, + }, + #[codec(index = 17)] + #[doc = "Abdicate one's position as a voting member and just be an Ally. May be used by Fellows"] + #[doc = "who do not want to leave the Alliance but do not have the capacity to participate"] + #[doc = "operationally for some time."] + abdicate_fellow_status, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The Alliance has not been initialized yet, therefore accounts cannot join it."] + AllianceNotYetInitialized, + #[codec(index = 1)] + #[doc = "The Alliance has been initialized, therefore cannot be initialized again."] + AllianceAlreadyInitialized, + #[codec(index = 2)] + #[doc = "Account is already a member."] + AlreadyMember, + #[codec(index = 3)] + #[doc = "Account is not a member."] + NotMember, + #[codec(index = 4)] + #[doc = "Account is not an ally."] + NotAlly, + #[codec(index = 5)] + #[doc = "Account does not have voting rights."] + NoVotingRights, + #[codec(index = 6)] + #[doc = "Account is already an elevated (fellow) member."] + AlreadyElevated, + #[codec(index = 7)] + #[doc = "Item is already listed as unscrupulous."] + AlreadyUnscrupulous, + #[codec(index = 8)] + #[doc = "Account has been deemed unscrupulous by the Alliance and is not welcome to join or be"] + #[doc = "nominated."] + AccountNonGrata, + #[codec(index = 9)] + #[doc = "Item has not been deemed unscrupulous."] + NotListedAsUnscrupulous, + #[codec(index = 10)] + #[doc = "The number of unscrupulous items exceeds `MaxUnscrupulousItems`."] + TooManyUnscrupulousItems, + #[codec(index = 11)] + #[doc = "Length of website URL exceeds `MaxWebsiteUrlLength`."] + TooLongWebsiteUrl, + #[codec(index = 12)] + #[doc = "Balance is insufficient for the required deposit."] + InsufficientFunds, + #[codec(index = 13)] + #[doc = "The account's identity does not have display field and website field."] + WithoutIdentityDisplayAndWebsite, + #[codec(index = 14)] + #[doc = "The account's identity has no good judgement."] + WithoutGoodIdentityJudgement, + #[codec(index = 15)] + #[doc = "The proposal hash is not found."] + MissingProposalHash, + #[codec(index = 16)] + #[doc = "The announcement is not found."] + MissingAnnouncement, + #[codec(index = 17)] + #[doc = "Number of members exceeds `MaxMembersCount`."] + TooManyMembers, + #[codec(index = 18)] + #[doc = "Number of announcements exceeds `MaxAnnouncementsCount`."] + TooManyAnnouncements, + #[codec(index = 19)] + #[doc = "Invalid witness data given."] + BadWitness, + #[codec(index = 20)] + #[doc = "Account already gave retirement notice"] + AlreadyRetiring, + #[codec(index = 21)] + #[doc = "Account did not give a retirement notice required to retire."] + RetirementNoticeNotGiven, + #[codec(index = 22)] + #[doc = "Retirement period has not passed."] + RetirementPeriodNotPassed, + #[codec(index = 23)] + #[doc = "Fellows must be provided to initialize the Alliance."] + FellowsMissing, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 rule has been set."] + NewRuleSet { + rule: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 1)] + #[doc = "A new announcement has been proposed."] + Announced { + announcement: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 2)] + #[doc = "An on-chain announcement has been removed."] + AnnouncementRemoved { + announcement: runtime_types::pallet_alliance::types::Cid, + }, + #[codec(index = 3)] + #[doc = "Some accounts have been initialized as members (fellows/allies)."] + MembersInitialized { + fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, + allies: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 4)] + #[doc = "An account has been added as an Ally and reserved its deposit."] + NewAllyJoined { + ally: ::subxt::utils::AccountId32, + nominator: ::core::option::Option<::subxt::utils::AccountId32>, + reserved: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 5)] + #[doc = "An ally has been elevated to Fellow."] + AllyElevated { ally: ::subxt::utils::AccountId32 }, + #[codec(index = 6)] + #[doc = "A member gave retirement notice and their retirement period started."] + MemberRetirementPeriodStarted { member: ::subxt::utils::AccountId32 }, + #[codec(index = 7)] + #[doc = "A member has retired with its deposit unreserved."] + MemberRetired { + member: ::subxt::utils::AccountId32, + unreserved: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 8)] + #[doc = "A member has been kicked out with its deposit slashed."] + MemberKicked { + member: ::subxt::utils::AccountId32, + slashed: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 9)] + #[doc = "Accounts or websites have been added into the list of unscrupulous items."] + UnscrupulousItemAdded { + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + }, + #[codec(index = 10)] + #[doc = "Accounts or websites have been removed from the list of unscrupulous items."] + UnscrupulousItemRemoved { + items: ::std::vec::Vec< + runtime_types::pallet_alliance::UnscrupulousItem< + ::subxt::utils::AccountId32, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + >, + }, + #[codec(index = 11)] + #[doc = "Alliance disbanded. Includes number deleted members and unreserved deposits."] + AllianceDisbanded { + fellow_members: ::core::primitive::u32, + ally_members: ::core::primitive::u32, + unreserved: ::core::primitive::u32, + }, + #[codec(index = 12)] + #[doc = "A Fellow abdicated their voting rights. They are now an Ally."] + FellowAbdicated { fellow: ::subxt::utils::AccountId32 }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Cid { + pub version: runtime_types::pallet_alliance::types::Version, + pub codec: ::core::primitive::u64, + pub hash: runtime_types::pallet_alliance::types::Multihash, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DisbandWitness { + #[codec(compact)] + pub fellow_members: ::core::primitive::u32, + #[codec(compact)] + pub ally_members: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Multihash { + pub code: ::core::primitive::u64, + pub digest: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Version { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MemberRole { + #[codec(index = 0)] + Fellow, + #[codec(index = 1)] + Ally, + #[codec(index = 2)] + Retiring, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum UnscrupulousItem<_0, _1> { + #[codec(index = 0)] + AccountId(_0), + #[codec(index = 1)] + Website(_1), + } + } + pub mod pallet_asset_tx_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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` in an asset `asset_id`."] + AssetTxFeePaid { + who: ::subxt::utils::AccountId32, + actual_fee: ::core::primitive::u128, + tip: ::core::primitive::u128, + asset_id: ::core::option::Option<::core::primitive::u32>, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChargeAssetTxPayment { + #[codec(compact)] + pub tip: ::core::primitive::u128, + pub asset_id: ::core::option::Option<::core::primitive::u32>, + } + } + pub mod pallet_assets { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Issue a new class of fungible assets from a public origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "Funds of sender are reserved by `AssetDeposit`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset."] + #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] + #[doc = "member of the asset class's admin team."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + create { + #[codec(compact)] + id: ::core::primitive::u32, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + min_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Issue a new class of fungible assets from a privileged origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset."] + #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] + #[doc = "over this asset, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_create { + #[codec(compact)] + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + is_sufficient: ::core::primitive::bool, + #[codec(compact)] + min_balance: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Start the process of destroying a fungible asset class."] + #[doc = ""] + #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] + #[doc = "destruction of an asset class."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "The asset class must be frozen before calling `start_destroy`."] + start_destroy { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Destroy all accounts associated with a given asset."] + #[doc = ""] + #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedAccounts` event."] + destroy_accounts { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] + #[doc = ""] + #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedApprovals` event."] + destroy_approvals { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Complete destroying asset and unreserve currency."] + #[doc = ""] + #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] + #[doc = "hand."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each successful call emits the `Event::Destroyed` event."] + finish_destroy { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Mint assets of a particular class."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount minted."] + #[doc = "- `beneficiary`: The account to be credited with the minted assets."] + #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] + mint { + #[codec(compact)] + id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] + #[doc = ""] + #[doc = "Bails with `NoAccount` if the `who` is already dead."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount burned."] + #[doc = "- `who`: The account to be debited from."] + #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] + #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] + burn { + #[codec(compact)] + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "Move some assets from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + transfer { + #[codec(compact)] + id: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + transfer_keep_alive { + #[codec(compact)] + id: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "Move some assets from one account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `source`: The account to be debited."] + #[doc = "- `dest`: The account to be credited."] + #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] + #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] + #[doc = "below the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] + #[doc = "`dest`."] + force_transfer { + #[codec(compact)] + id: ::core::primitive::u32, + source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Disallow further unprivileged transfers from an account."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze { + #[codec(compact)] + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 12)] + #[doc = "Allow unprivileged transfers from an account again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be unfrozen."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw { + #[codec(compact)] + id: ::core::primitive::u32, + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 13)] + #[doc = "Disallow further unprivileged transfers for the asset class."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze_asset { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 14)] + #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw_asset { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 15)] + #[doc = "Change the Owner of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer_ownership { + #[codec(compact)] + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 16)] + #[doc = "Change the Issuer, Admin and Freezer of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_team { + #[codec(compact)] + id: ::core::primitive::u32, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 17)] + #[doc = "Set the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Funds of sender are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_metadata { + #[codec(compact)] + id: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + symbol: ::std::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + }, + #[codec(index = 18)] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Any deposit is freed for the asset owner."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + clear_metadata { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 19)] + #[doc = "Force the metadata for an asset to some value."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is left alone."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] + force_set_metadata { + #[codec(compact)] + id: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + symbol: ::std::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 20)] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is returned."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_clear_metadata { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 21)] + #[doc = "Alter the attributes of a given asset."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] + #[doc = "value to account for the state bloat associated with its balance storage. If set to"] + #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] + #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] + #[doc = "growth)."] + #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_asset_status { + #[codec(compact)] + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + min_balance: ::core::primitive::u128, + is_sufficient: ::core::primitive::bool, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 22)] + #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] + #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] + #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] + #[doc = "meet the right value."] + #[doc = ""] + #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] + #[doc = "making this call."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account to delegate permission to transfer asset."] + #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] + #[doc = "already an approval in place, then this acts additively."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + approve_transfer { + #[codec(compact)] + id: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 23)] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place between signer and"] + #[doc = "`delegate`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + cancel_approval { + #[codec(compact)] + id: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 24)] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] + #[doc = "account of the asset `id`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_cancel_approval { + #[codec(compact)] + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 25)] + #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] + #[doc = "account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] + #[doc = "signer."] + #[doc = ""] + #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] + #[doc = "reserved by `approve_transfer` is unreserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] + #[doc = "from which the asset balance will be withdrawn."] + #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] + #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = ""] + #[doc = "Emits `TransferredApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer_approved { + #[codec(compact)] + id: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + destination: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 26)] + #[doc = "Create an asset account for non-provider assets."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] + #[doc = " to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + touch { + #[codec(compact)] + id: ::core::primitive::u32, + }, + #[codec(index = 27)] + #[doc = "Return the deposit (if any) of an asset account."] + #[doc = ""] + #[doc = "The origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + refund { + #[codec(compact)] + id: ::core::primitive::u32, + allow_burn: ::core::primitive::bool, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Account balance must be greater than or equal to the transfer amount."] + BalanceLow, + #[codec(index = 1)] + #[doc = "The account to alter does not exist."] + NoAccount, + #[codec(index = 2)] + #[doc = "The signing account has no permission to do the operation."] + NoPermission, + #[codec(index = 3)] + #[doc = "The given asset ID is unknown."] + Unknown, + #[codec(index = 4)] + #[doc = "The origin account is frozen."] + Frozen, + #[codec(index = 5)] + #[doc = "The asset ID is already taken."] + InUse, + #[codec(index = 6)] + #[doc = "Invalid witness data given."] + BadWitness, + #[codec(index = 7)] + #[doc = "Minimum balance should be non-zero."] + MinBalanceZero, + #[codec(index = 8)] + #[doc = "Unable to increment the consumer reference counters on the account. Either no provider"] + #[doc = "reference exists to allow a non-zero balance of a non-self-sufficient asset, or the"] + #[doc = "maximum number of consumers has been reached."] + NoProvider, + #[codec(index = 9)] + #[doc = "Invalid metadata given."] + BadMetadata, + #[codec(index = 10)] + #[doc = "No approval exists that would allow the transfer."] + Unapproved, + #[codec(index = 11)] + #[doc = "The source account would not survive the transfer and it needs to stay alive."] + WouldDie, + #[codec(index = 12)] + #[doc = "The asset-account already exists."] + AlreadyExists, + #[codec(index = 13)] + #[doc = "The asset-account doesn't have an associated deposit."] + NoDeposit, + #[codec(index = 14)] + #[doc = "The operation would result in funds being burned."] + WouldBurn, + #[codec(index = 15)] + #[doc = "The asset is a live asset and is actively being used. Usually emit for operations such"] + #[doc = "as `start_destroy` which require the asset to be in a destroying state."] + LiveAsset, + #[codec(index = 16)] + #[doc = "The asset is not live, and likely being destroyed."] + AssetNotLive, + #[codec(index = 17)] + #[doc = "The asset status is not the expected status."] + IncorrectStatus, + #[codec(index = 18)] + #[doc = "The asset should be frozen before the given operation."] + NotFrozen, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Some asset class was created."] + Created { + asset_id: ::core::primitive::u32, + creator: ::subxt::utils::AccountId32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "Some assets were issued."] + Issued { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + total_supply: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Some assets were transferred."] + Transferred { + asset_id: ::core::primitive::u32, + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Some assets were destroyed."] + Burned { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + balance: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "The management team changed."] + TeamChanged { + asset_id: ::core::primitive::u32, + issuer: ::subxt::utils::AccountId32, + admin: ::subxt::utils::AccountId32, + freezer: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "The owner changed."] + OwnerChanged { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 6)] + #[doc = "Some account `who` was frozen."] + Frozen { + asset_id: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + }, + #[codec(index = 7)] + #[doc = "Some account `who` was thawed."] + Thawed { + asset_id: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "Some asset `asset_id` was frozen."] + AssetFrozen { asset_id: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "Some asset `asset_id` was thawed."] + AssetThawed { asset_id: ::core::primitive::u32 }, + #[codec(index = 10)] + #[doc = "Accounts were destroyed for given asset."] + AccountsDestroyed { + asset_id: ::core::primitive::u32, + accounts_destroyed: ::core::primitive::u32, + accounts_remaining: ::core::primitive::u32, + }, + #[codec(index = 11)] + #[doc = "Approvals were destroyed for given asset."] + ApprovalsDestroyed { + asset_id: ::core::primitive::u32, + approvals_destroyed: ::core::primitive::u32, + approvals_remaining: ::core::primitive::u32, + }, + #[codec(index = 12)] + #[doc = "An asset class is in the process of being destroyed."] + DestructionStarted { asset_id: ::core::primitive::u32 }, + #[codec(index = 13)] + #[doc = "An asset class was destroyed."] + Destroyed { asset_id: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "Some asset class was force-created."] + ForceCreated { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 15)] + #[doc = "New metadata has been set for an asset."] + MetadataSet { + asset_id: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + symbol: ::std::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 16)] + #[doc = "Metadata has been cleared for an asset."] + MetadataCleared { asset_id: ::core::primitive::u32 }, + #[codec(index = 17)] + #[doc = "(Additional) funds have been approved for transfer to a destination account."] + ApprovedTransfer { + asset_id: ::core::primitive::u32, + source: ::subxt::utils::AccountId32, + delegate: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 18)] + #[doc = "An approval for account `delegate` was cancelled by `owner`."] + ApprovalCancelled { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + delegate: ::subxt::utils::AccountId32, + }, + #[codec(index = 19)] + #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] + #[doc = "the approved `delegate`."] + TransferredApproved { + asset_id: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + delegate: ::subxt::utils::AccountId32, + destination: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 20)] + #[doc = "An asset has had its attributes changed by the `Force` origin."] + AssetStatusChanged { asset_id: ::core::primitive::u32 }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Approval<_0, _1> { + pub amount: _0, + pub deposit: _0, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AssetAccount<_0, _1, _2> { + pub balance: _0, + pub is_frozen: ::core::primitive::bool, + pub reason: runtime_types::pallet_assets::types::ExistenceReason<_0>, + pub extra: _2, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AssetDetails<_0, _1, _2> { + pub owner: _1, + pub issuer: _1, + pub admin: _1, + pub freezer: _1, + pub supply: _0, + pub deposit: _0, + pub min_balance: _0, + pub is_sufficient: ::core::primitive::bool, + pub accounts: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, + pub approvals: ::core::primitive::u32, + pub status: runtime_types::pallet_assets::types::AssetStatus, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AssetMetadata<_0, _1> { + pub deposit: _0, + pub name: _1, + pub symbol: _1, + pub decimals: ::core::primitive::u8, + pub is_frozen: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AssetStatus { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + Frozen, + #[codec(index = 2)] + Destroying, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ExistenceReason<_0> { + #[codec(index = 0)] + Consumer, + #[codec(index = 1)] + Sufficient, + #[codec(index = 2)] + DepositHeld(_0), + #[codec(index = 3)] + DepositRefunded, + } + } + } + pub mod pallet_authorship { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Provide a set of uncles."] + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The uncle parent not in the chain."] + InvalidUncleParent, + #[codec(index = 1)] + #[doc = "Uncles already set in the block."] + UnclesAlreadySet, + #[codec(index = 2)] + #[doc = "Too many uncles."] + TooManyUncles, + #[codec(index = 3)] + #[doc = "The uncle is genesis."] + GenesisUncle, + #[codec(index = 4)] + #[doc = "The uncle is too high in chain."] + TooHighUncle, + #[codec(index = 5)] + #[doc = "The uncle is already included."] + UncleAlreadyIncluded, + #[codec(index = 6)] + #[doc = "The uncle isn't recent enough to be included."] + OldUncle, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub misc_frozen: _0, + pub fee_frozen: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::Reasons, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + pub mod pallet_bounties { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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_child_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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + add_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + propose_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + accept_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + unassign_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + award_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 5)] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + claim_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + close_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 parent bounty is not in active state."] + ParentBountyNotActive, + #[codec(index = 1)] + #[doc = "The bounty balance is not enough to add new child-bounty."] + InsufficientBountyBalance, + #[codec(index = 2)] + #[doc = "Number of child bounties exceeds limit `MaxActiveChildBountyCount`."] + TooManyChildBounties, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 child-bounty is added."] + Added { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A child-bounty is awarded to a beneficiary."] + Awarded { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "A child-bounty is claimed by beneficiary."] + Claimed { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A child-bounty is cancelled."] + Canceled { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChildBounty<_0, _1, _2> { + pub parent_bounty: _2, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub status: + runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ChildBountyStatus<_0, _1> { + #[codec(index = 0)] + Added, + #[codec(index = 1)] + CuratorProposed { curator: _0 }, + #[codec(index = 2)] + Active { curator: _0 }, + #[codec(index = 3)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, + } + } + pub mod pallet_collective { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Members(::core::primitive::u32, ::core::primitive::u32), + #[codec(index = 1)] + Member(_0), + #[codec(index = 2)] + _Phantom, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Votes<_0, _1> { + pub index: _1, + pub threshold: _1, + pub ayes: ::std::vec::Vec<_0>, + pub nays: ::std::vec::Vec<_0>, + pub end: _1, + } + } + pub mod pallet_contracts { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Deprecated version if [`Self::call`] for use in an in-storage `Call`."] + call_old_weight { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + #[codec(compact)] + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + data: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`."] + instantiate_with_code_old_weight { + #[codec(compact)] + value: ::core::primitive::u128, + #[codec(compact)] + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code: ::std::vec::Vec<::core::primitive::u8>, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 2)] + #[doc = "Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`."] + instantiate_old_weight { + #[codec(compact)] + value: ::core::primitive::u128, + #[codec(compact)] + gas_limit: runtime_types::sp_weights::OldWeight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code_hash: ::subxt::utils::H256, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 3)] + #[doc = "Upload new `code` without instantiating a contract from it."] + #[doc = ""] + #[doc = "If the code does not already exist a deposit is reserved from the caller"] + #[doc = "and unreserved only when [`Self::remove_code`] is called. The size of the reserve"] + #[doc = "depends on the instrumented size of the the supplied `code`."] + #[doc = ""] + #[doc = "If the code already exists in storage it will still return `Ok` and upgrades"] + #[doc = "the in storage version to the current"] + #[doc = "[`InstructionWeights::version`](InstructionWeights)."] + #[doc = ""] + #[doc = "- `determinism`: If this is set to any other value but [`Determinism::Deterministic`]"] + #[doc = " then the only way to use this code is to delegate call into it from an offchain"] + #[doc = " execution. Set to [`Determinism::Deterministic`] if in doubt."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "Anyone can instantiate a contract from any uploaded code and thus prevent its removal."] + #[doc = "To avoid this situation a constructor could employ access control so that it can"] + #[doc = "only be instantiated by permissioned entities. The same is true when uploading"] + #[doc = "through [`Self::instantiate_with_code`]."] + upload_code { + code: ::std::vec::Vec<::core::primitive::u8>, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + determinism: runtime_types::pallet_contracts::wasm::Determinism, + }, + #[codec(index = 4)] + #[doc = "Remove the code stored under `code_hash` and refund the deposit to its owner."] + #[doc = ""] + #[doc = "A code can only be removed by its original uploader (its owner) and only if it is"] + #[doc = "not used by any contract."] + remove_code { code_hash: ::subxt::utils::H256 }, + #[codec(index = 5)] + #[doc = "Privileged function that changes the code of an existing contract."] + #[doc = ""] + #[doc = "This takes care of updating refcounts and all other necessary operations. Returns"] + #[doc = "an error if either the `code_hash` or `dest` do not exist."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "This does **not** change the address of the contract in question. This means"] + #[doc = "that the contract address is no longer derived from its code hash after calling"] + #[doc = "this dispatchable."] + set_code { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + code_hash: ::subxt::utils::H256, + }, + #[codec(index = 6)] + #[doc = "Makes a call to an account, optionally transferring some balance."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `dest`: Address of the contract to call."] + #[doc = "* `value`: The balance to transfer from the `origin` to `dest`."] + #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] + #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the"] + #[doc = " caller to pay for the storage consumed."] + #[doc = "* `data`: The input data to pass to the contract."] + #[doc = ""] + #[doc = "* If the account is a smart-contract account, the associated code will be"] + #[doc = "executed and any value will be transferred."] + #[doc = "* If the account is a regular account, any value will be transferred."] + #[doc = "* If no account exists and the call value is not less than `existential_deposit`,"] + #[doc = "a regular account will be created and any value will be transferred."] + call { + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + data: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 7)] + #[doc = "Instantiates a new contract from the supplied `code` optionally transferring"] + #[doc = "some balance."] + #[doc = ""] + #[doc = "This dispatchable has the same effect as calling [`Self::upload_code`] +"] + #[doc = "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please"] + #[doc = "also check the documentation of [`Self::upload_code`]."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = ""] + #[doc = "* `value`: The balance to transfer from the `origin` to the newly created contract."] + #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] + #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved"] + #[doc = " from the caller to pay for the storage consumed."] + #[doc = "* `code`: The contract code to deploy in raw bytes."] + #[doc = "* `data`: The input data to pass to the contract constructor."] + #[doc = "* `salt`: Used for the address derivation. See [`Pallet::contract_address`]."] + #[doc = ""] + #[doc = "Instantiation is executed as follows:"] + #[doc = ""] + #[doc = "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that"] + #[doc = " code."] + #[doc = "- If the `code_hash` already exists on the chain the underlying `code` will be shared."] + #[doc = "- The destination address is computed based on the sender, code_hash and the salt."] + #[doc = "- The smart-contract account is created at the computed address."] + #[doc = "- The `value` is transferred to the new account."] + #[doc = "- The `deploy` function is executed in the context of the newly-created account."] + instantiate_with_code { + #[codec(compact)] + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code: ::std::vec::Vec<::core::primitive::u8>, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 8)] + #[doc = "Instantiates a contract from a previously deployed wasm binary."] + #[doc = ""] + #[doc = "This function is identical to [`Self::instantiate_with_code`] but without the"] + #[doc = "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary"] + #[doc = "must be supplied."] + instantiate { + #[codec(compact)] + value: ::core::primitive::u128, + gas_limit: runtime_types::sp_weights::weight_v2::Weight, + storage_deposit_limit: ::core::option::Option< + ::subxt::ext::codec::Compact<::core::primitive::u128>, + >, + code_hash: ::subxt::utils::H256, + data: ::std::vec::Vec<::core::primitive::u8>, + salt: ::std::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 new schedule must have a greater version than the current one."] + InvalidScheduleVersion, + #[codec(index = 1)] + #[doc = "Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`."] + InvalidCallFlags, + #[codec(index = 2)] + #[doc = "The executed contract exhausted its gas limit."] + OutOfGas, + #[codec(index = 3)] + #[doc = "The output buffer supplied to a contract API call was too small."] + OutputBufferTooSmall, + #[codec(index = 4)] + #[doc = "Performing the requested transfer failed. Probably because there isn't enough"] + #[doc = "free balance in the sender's account."] + TransferFailed, + #[codec(index = 5)] + #[doc = "Performing a call was denied because the calling depth reached the limit"] + #[doc = "of what is specified in the schedule."] + MaxCallDepthReached, + #[codec(index = 6)] + #[doc = "No contract was found at the specified address."] + ContractNotFound, + #[codec(index = 7)] + #[doc = "The code supplied to `instantiate_with_code` exceeds the limit specified in the"] + #[doc = "current schedule."] + CodeTooLarge, + #[codec(index = 8)] + #[doc = "No code could be found at the supplied code hash."] + CodeNotFound, + #[codec(index = 9)] + #[doc = "A buffer outside of sandbox memory was passed to a contract API function."] + OutOfBounds, + #[codec(index = 10)] + #[doc = "Input passed to a contract API function failed to decode as expected type."] + DecodingFailed, + #[codec(index = 11)] + #[doc = "Contract trapped during execution."] + ContractTrapped, + #[codec(index = 12)] + #[doc = "The size defined in `T::MaxValueSize` was exceeded."] + ValueTooLarge, + #[codec(index = 13)] + #[doc = "Termination of a contract is not allowed while the contract is already"] + #[doc = "on the call stack. Can be triggered by `seal_terminate`."] + TerminatedWhileReentrant, + #[codec(index = 14)] + #[doc = "`seal_call` forwarded this contracts input. It therefore is no longer available."] + InputForwarded, + #[codec(index = 15)] + #[doc = "The subject passed to `seal_random` exceeds the limit."] + RandomSubjectTooLong, + #[codec(index = 16)] + #[doc = "The amount of topics passed to `seal_deposit_events` exceeds the limit."] + TooManyTopics, + #[codec(index = 17)] + #[doc = "The chain does not provide a chain extension. Calling the chain extension results"] + #[doc = "in this error. Note that this usually shouldn't happen as deploying such contracts"] + #[doc = "is rejected."] + NoChainExtension, + #[codec(index = 18)] + #[doc = "Removal of a contract failed because the deletion queue is full."] + #[doc = ""] + #[doc = "This can happen when calling `seal_terminate`."] + #[doc = "The queue is filled by deleting contracts and emptied by a fixed amount each block."] + #[doc = "Trying again during another block is the only way to resolve this issue."] + DeletionQueueFull, + #[codec(index = 19)] + #[doc = "A contract with the same AccountId already exists."] + DuplicateContract, + #[codec(index = 20)] + #[doc = "A contract self destructed in its constructor."] + #[doc = ""] + #[doc = "This can be triggered by a call to `seal_terminate`."] + TerminatedInConstructor, + #[codec(index = 21)] + #[doc = "The debug message specified to `seal_debug_message` does contain invalid UTF-8."] + DebugMessageInvalidUTF8, + #[codec(index = 22)] + #[doc = "A call tried to invoke a contract that is flagged as non-reentrant."] + ReentranceDenied, + #[codec(index = 23)] + #[doc = "Origin doesn't have enough balance to pay the required storage deposits."] + StorageDepositNotEnoughFunds, + #[codec(index = 24)] + #[doc = "More storage was created than allowed by the storage deposit limit."] + StorageDepositLimitExhausted, + #[codec(index = 25)] + #[doc = "Code removal was denied because the code is still in use by at least one contract."] + CodeInUse, + #[codec(index = 26)] + #[doc = "The contract ran to completion but decided to revert its storage changes."] + #[doc = "Please note that this error is only returned from extrinsics. When called directly"] + #[doc = "or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags"] + #[doc = "to determine whether a reversion has taken place."] + ContractReverted, + #[codec(index = 27)] + #[doc = "The contract's code was found to be invalid during validation or instrumentation."] + #[doc = ""] + #[doc = "The most likely cause of this is that an API was used which is not supported by the"] + #[doc = "node. This hapens if an older node is used with a new version of ink!. Try updating"] + #[doc = "your node to the newest available version."] + #[doc = ""] + #[doc = "A more detailed error can be found on the node console if debug messages are enabled"] + #[doc = "by supplying `-lruntime::contracts=debug`."] + CodeRejected, + #[codec(index = 28)] + #[doc = "An indetermistic code was used in a context where this is not permitted."] + Indeterministic, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Contract deployed by address at the specified address."] + Instantiated { + deployer: ::subxt::utils::AccountId32, + contract: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "Contract has been removed."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "The only way for a contract to be removed and emitting this event is by calling"] + #[doc = "`seal_terminate`."] + Terminated { + contract: ::subxt::utils::AccountId32, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "Code with the specified hash has been stored."] + CodeStored { code_hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + #[doc = "A custom event emitted by the contract."] + ContractEmitted { + contract: ::subxt::utils::AccountId32, + data: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + #[doc = "A code with the specified hash was removed."] + CodeRemoved { code_hash: ::subxt::utils::H256 }, + #[codec(index = 5)] + #[doc = "A contract's code was updated."] + ContractCodeUpdated { + contract: ::subxt::utils::AccountId32, + new_code_hash: ::subxt::utils::H256, + old_code_hash: ::subxt::utils::H256, + }, + #[codec(index = 6)] + #[doc = "A contract was called either by a plain account or another contract."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "Please keep in mind that like all events this is only emitted for successful"] + #[doc = "calls. This is because on failure all storage changes including events are"] + #[doc = "rolled back."] + Called { + caller: ::subxt::utils::AccountId32, + contract: ::subxt::utils::AccountId32, + }, + #[codec(index = 7)] + #[doc = "A contract delegate called a code hash."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "Please keep in mind that like all events this is only emitted for successful"] + #[doc = "calls. This is because on failure all storage changes including events are"] + #[doc = "rolled back."] + DelegateCalled { + contract: ::subxt::utils::AccountId32, + code_hash: ::subxt::utils::H256, + }, + } + } + pub mod schedule { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HostFnWeights { + pub caller: ::core::primitive::u64, + pub is_contract: ::core::primitive::u64, + pub code_hash: ::core::primitive::u64, + pub own_code_hash: ::core::primitive::u64, + pub caller_is_origin: ::core::primitive::u64, + pub address: ::core::primitive::u64, + pub gas_left: ::core::primitive::u64, + pub balance: ::core::primitive::u64, + pub value_transferred: ::core::primitive::u64, + pub minimum_balance: ::core::primitive::u64, + pub block_number: ::core::primitive::u64, + pub now: ::core::primitive::u64, + pub weight_to_fee: ::core::primitive::u64, + pub gas: ::core::primitive::u64, + pub input: ::core::primitive::u64, + pub input_per_byte: ::core::primitive::u64, + pub r#return: ::core::primitive::u64, + pub return_per_byte: ::core::primitive::u64, + pub terminate: ::core::primitive::u64, + pub random: ::core::primitive::u64, + pub deposit_event: ::core::primitive::u64, + pub deposit_event_per_topic: ::core::primitive::u64, + pub deposit_event_per_byte: ::core::primitive::u64, + pub debug_message: ::core::primitive::u64, + pub set_storage: ::core::primitive::u64, + pub set_storage_per_new_byte: ::core::primitive::u64, + pub set_storage_per_old_byte: ::core::primitive::u64, + pub set_code_hash: ::core::primitive::u64, + pub clear_storage: ::core::primitive::u64, + pub clear_storage_per_byte: ::core::primitive::u64, + pub contains_storage: ::core::primitive::u64, + pub contains_storage_per_byte: ::core::primitive::u64, + pub get_storage: ::core::primitive::u64, + pub get_storage_per_byte: ::core::primitive::u64, + pub take_storage: ::core::primitive::u64, + pub take_storage_per_byte: ::core::primitive::u64, + pub transfer: ::core::primitive::u64, + pub call: ::core::primitive::u64, + pub delegate_call: ::core::primitive::u64, + pub call_transfer_surcharge: ::core::primitive::u64, + pub call_per_cloned_byte: ::core::primitive::u64, + pub instantiate: ::core::primitive::u64, + pub instantiate_transfer_surcharge: ::core::primitive::u64, + pub instantiate_per_input_byte: ::core::primitive::u64, + pub instantiate_per_salt_byte: ::core::primitive::u64, + pub hash_sha2_256: ::core::primitive::u64, + pub hash_sha2_256_per_byte: ::core::primitive::u64, + pub hash_keccak_256: ::core::primitive::u64, + pub hash_keccak_256_per_byte: ::core::primitive::u64, + pub hash_blake2_256: ::core::primitive::u64, + pub hash_blake2_256_per_byte: ::core::primitive::u64, + pub hash_blake2_128: ::core::primitive::u64, + pub hash_blake2_128_per_byte: ::core::primitive::u64, + pub ecdsa_recover: ::core::primitive::u64, + pub ecdsa_to_eth_address: ::core::primitive::u64, + pub reentrance_count: ::core::primitive::u64, + pub account_reentrance_count: ::core::primitive::u64, + pub instantiation_nonce: ::core::primitive::u64, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct InstructionWeights { + pub version: ::core::primitive::u32, + pub fallback: ::core::primitive::u32, + pub i64const: ::core::primitive::u32, + pub i64load: ::core::primitive::u32, + pub i64store: ::core::primitive::u32, + pub select: ::core::primitive::u32, + pub r#if: ::core::primitive::u32, + pub br: ::core::primitive::u32, + pub br_if: ::core::primitive::u32, + pub br_table: ::core::primitive::u32, + pub br_table_per_entry: ::core::primitive::u32, + pub call: ::core::primitive::u32, + pub call_indirect: ::core::primitive::u32, + pub call_indirect_per_param: ::core::primitive::u32, + pub call_per_local: ::core::primitive::u32, + pub local_get: ::core::primitive::u32, + pub local_set: ::core::primitive::u32, + pub local_tee: ::core::primitive::u32, + pub global_get: ::core::primitive::u32, + pub global_set: ::core::primitive::u32, + pub memory_current: ::core::primitive::u32, + pub memory_grow: ::core::primitive::u32, + pub i64clz: ::core::primitive::u32, + pub i64ctz: ::core::primitive::u32, + pub i64popcnt: ::core::primitive::u32, + pub i64eqz: ::core::primitive::u32, + pub i64extendsi32: ::core::primitive::u32, + pub i64extendui32: ::core::primitive::u32, + pub i32wrapi64: ::core::primitive::u32, + pub i64eq: ::core::primitive::u32, + pub i64ne: ::core::primitive::u32, + pub i64lts: ::core::primitive::u32, + pub i64ltu: ::core::primitive::u32, + pub i64gts: ::core::primitive::u32, + pub i64gtu: ::core::primitive::u32, + pub i64les: ::core::primitive::u32, + pub i64leu: ::core::primitive::u32, + pub i64ges: ::core::primitive::u32, + pub i64geu: ::core::primitive::u32, + pub i64add: ::core::primitive::u32, + pub i64sub: ::core::primitive::u32, + pub i64mul: ::core::primitive::u32, + pub i64divs: ::core::primitive::u32, + pub i64divu: ::core::primitive::u32, + pub i64rems: ::core::primitive::u32, + pub i64remu: ::core::primitive::u32, + pub i64and: ::core::primitive::u32, + pub i64or: ::core::primitive::u32, + pub i64xor: ::core::primitive::u32, + pub i64shl: ::core::primitive::u32, + pub i64shrs: ::core::primitive::u32, + pub i64shru: ::core::primitive::u32, + pub i64rotl: ::core::primitive::u32, + pub i64rotr: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Limits { + pub event_topics: ::core::primitive::u32, + pub globals: ::core::primitive::u32, + pub locals: ::core::primitive::u32, + pub parameters: ::core::primitive::u32, + pub memory_pages: ::core::primitive::u32, + pub table_size: ::core::primitive::u32, + pub br_table_size: ::core::primitive::u32, + pub subject_len: ::core::primitive::u32, + pub call_depth: ::core::primitive::u32, + pub payload_len: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Schedule { + pub limits: runtime_types::pallet_contracts::schedule::Limits, + pub instruction_weights: + runtime_types::pallet_contracts::schedule::InstructionWeights, + pub host_fn_weights: + runtime_types::pallet_contracts::schedule::HostFnWeights, + } + } + pub mod storage { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ContractInfo { + pub trie_id: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub code_hash: ::subxt::utils::H256, + pub storage_bytes: ::core::primitive::u32, + pub storage_items: ::core::primitive::u32, + pub storage_byte_deposit: ::core::primitive::u128, + pub storage_item_deposit: ::core::primitive::u128, + pub storage_base_deposit: ::core::primitive::u128, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DeletedContract { + pub trie_id: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + } + pub mod wasm { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Determinism { + #[codec(index = 0)] + Deterministic, + #[codec(index = 1)] + AllowIndeterminism, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OwnerInfo { + pub owner: ::subxt::utils::AccountId32, + #[codec(compact)] + pub deposit: ::core::primitive::u128, + #[codec(compact)] + pub refcount: ::core::primitive::u64, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PrefabWasmModule { + #[codec(compact)] + pub instruction_weights_version: ::core::primitive::u32, + #[codec(compact)] + pub initial: ::core::primitive::u32, + #[codec(compact)] + pub maximum: ::core::primitive::u32, + pub code: + runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + pub determinism: runtime_types::pallet_contracts::wasm::Determinism, + } + } + } + pub mod pallet_conviction_voting { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Conviction { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Locked1x, + #[codec(index = 2)] + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] # [doc = "otherwise it is a vote to keep the status quo."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `poll_index`: The index of the poll to vote for."] # [doc = "- `vote`: The vote configuration."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] vote { # [codec (compact)] poll_index : :: core :: primitive :: u32 , vote : runtime_types :: pallet_conviction_voting :: vote :: AccountVote < :: core :: primitive :: u128 > , } , # [codec (index = 1)] # [doc = "Delegate the voting power (with some given conviction) of the sending account for a"] # [doc = "particular class of polls."] # [doc = ""] # [doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] # [doc = "time appropriate for the conviction's lock period."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] # [doc = " - be delegating already; or"] # [doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] # [doc = " through `reap_vote` or `unvote`)."] # [doc = ""] # [doc = "- `to`: The account whose voting the `target` account's voting power will follow."] # [doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] # [doc = " to this function are required."] # [doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] # [doc = " account is undelegated, the funds will be locked for the corresponding period."] # [doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] # [doc = " be more than the account's current balance."] # [doc = ""] # [doc = "Emits `Delegated`."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] # [doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] delegate { class : :: core :: primitive :: u16 , to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , conviction : runtime_types :: pallet_conviction_voting :: conviction :: Conviction , balance : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Undelegate the voting power of the sending account for a particular class of polls."] # [doc = ""] # [doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] # [doc = "of the conviction with which the delegation was issued has passed."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] # [doc = "currently delegating."] # [doc = ""] # [doc = "- `class`: The class of polls to remove the delegation from."] # [doc = ""] # [doc = "Emits `Undelegated`."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] # [doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] undelegate { class : :: core :: primitive :: u16 , } , # [codec (index = 3)] # [doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] # [doc = "class."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `class`: The class of polls to unlock."] # [doc = "- `target`: The account to remove the lock on."] # [doc = ""] # [doc = "Weight: `O(R)` with R number of vote of target."] unlock { class : :: core :: primitive :: u16 , target : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 4)] # [doc = "Remove a vote for a poll."] # [doc = ""] # [doc = "If:"] # [doc = "- the poll was cancelled, or"] # [doc = "- the poll is ongoing, or"] # [doc = "- the poll has ended such that"] # [doc = " - the vote of the account was in opposition to the result; or"] # [doc = " - there was no conviction to the account's vote; or"] # [doc = " - the account made a split vote"] # [doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] # [doc = "funds being available."] # [doc = ""] # [doc = "If, however, the poll has ended and:"] # [doc = "- it finished corresponding to the vote of the account, and"] # [doc = "- the account made a standard vote with conviction, and"] # [doc = "- the lock period of the conviction is not over"] # [doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] # [doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] # [doc = "of both the amount locked and the time is it locked for)."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] # [doc = "registered for poll `index`."] # [doc = ""] # [doc = "- `index`: The index of poll of the vote to be removed."] # [doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] # [doc = " which have finished or are cancelled, this must be `Some`."] # [doc = ""] # [doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] # [doc = " Weight is calculated for the maximum number of vote."] remove_vote { class : :: core :: option :: Option < :: core :: primitive :: u16 > , index : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Remove a vote for a poll."] # [doc = ""] # [doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] # [doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] # [doc = "either because the poll was cancelled, because the voter lost the poll or"] # [doc = "because the conviction period is over."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] # [doc = " `index`."] # [doc = "- `index`: The index of poll of the vote to be removed."] # [doc = "- `class`: The class of the poll."] # [doc = ""] # [doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] # [doc = " Weight is calculated for the maximum number of vote."] remove_other_vote { target : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , class : :: core :: primitive :: u16 , index : :: core :: primitive :: u32 , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Poll is not ongoing."] + NotOngoing, + #[codec(index = 1)] + #[doc = "The given account did not vote on the poll."] + NotVoter, + #[codec(index = 2)] + #[doc = "The actor has no permission to conduct the action."] + NoPermission, + #[codec(index = 3)] + #[doc = "The actor has no permission to conduct the action right now but will do in the future."] + NoPermissionYet, + #[codec(index = 4)] + #[doc = "The account is already delegating."] + AlreadyDelegating, + #[codec(index = 5)] + #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] + #[doc = "these are removed, either through `unvote` or `reap_vote`."] + AlreadyVoting, + #[codec(index = 6)] + #[doc = "Too high a balance was provided that the account cannot afford."] + InsufficientFunds, + #[codec(index = 7)] + #[doc = "The account is not currently delegating."] + NotDelegating, + #[codec(index = 8)] + #[doc = "Delegation to oneself makes no sense."] + Nonsense, + #[codec(index = 9)] + #[doc = "Maximum number of votes reached."] + MaxVotesReached, + #[codec(index = 10)] + #[doc = "The class must be supplied since it is not easily determinable from the state."] + ClassNeeded, + #[codec(index = 11)] + #[doc = "The class ID supplied is invalid."] + BadClass, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] + Delegated(::subxt::utils::AccountId32, ::subxt::utils::AccountId32), + #[codec(index = 1)] + #[doc = "An \\[account\\] has cancelled a previous delegation operation."] + Undelegated(::subxt::utils::AccountId32), + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub support: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_conviction_voting::vote::Vote, + balance: _0, + }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + #[codec(index = 2)] + SplitAbstain { aye: _0, nay: _0, abstain: _0 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Casting<_0, _1, _2> { + pub votes: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + _1, + runtime_types::pallet_conviction_voting::vote::AccountVote< + _0, + >, + )>, + pub delegations: + runtime_types::pallet_conviction_voting::types::Delegations<_0>, + pub prior: + runtime_types::pallet_conviction_voting::vote::PriorLock<_1, _0>, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegating<_0, _1, _2> { + pub balance: _0, + pub target: _1, + pub conviction: + runtime_types::pallet_conviction_voting::conviction::Conviction, + pub delegations: + runtime_types::pallet_conviction_voting::types::Delegations<_0>, + pub prior: + runtime_types::pallet_conviction_voting::vote::PriorLock<_2, _0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2, _3> { + #[codec(index = 0)] + Casting( + runtime_types::pallet_conviction_voting::vote::Casting< + _0, + _2, + _2, + >, + ), + #[codec(index = 1)] + Delegating( + runtime_types::pallet_conviction_voting::vote::Delegating< + _0, + _1, + _2, + >, + ), + __Ignore(::core::marker::PhantomData<_3>), + } + } + } + pub mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Conviction { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Locked1x, + #[codec(index = 2)] + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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::kitchensink_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::kitchensink_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::kitchensink_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::kitchensink_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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2> { + #[codec(index = 0)] + Ongoing( + runtime_types::pallet_democracy::types::ReferendumStatus< + _0, + _1, + _2, + >, + ), + #[codec(index = 1)] + Finished { + approved: ::core::primitive::bool, + end: _0, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal: _1, + pub threshold: + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, + }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2> { + #[codec(index = 0)] + Direct { + votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), + >, + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + #[codec(index = 1)] + Delegating { + balance: _0, + target: _1, + conviction: + runtime_types::pallet_democracy::conviction::Conviction, + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + } + } + pub mod vote_threshold { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VoteThreshold { + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "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 :: kitchensink_runtime :: 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 :: kitchensink_runtime :: 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, + } + } + pub mod pallet_fast_unstake { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Register oneself for fast-unstake."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] + #[doc = "`staking::unbond`."] + #[doc = ""] + #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] + #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] + #[doc = "to be checked in further blocks."] + #[doc = ""] + #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] + #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] + #[doc = ""] + #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] + #[doc = "unstaked."] + #[doc = ""] + #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] + #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] + #[doc = "the chain's resources."] + register_fast_unstake, + #[codec(index = 1)] + #[doc = "Deregister oneself from the fast-unstake."] + #[doc = ""] + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] + #[doc = ""] + #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] + #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] + #[doc = "`Staking::rebond`."] + deregister, + #[codec(index = 2)] + #[doc = "Control the operation of this pallet."] + #[doc = ""] + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + control { + unchecked_eras_to_check: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 provided Controller account was not found."] + #[doc = ""] + #[doc = "This means that the given account is not bonded."] + NotController, + #[codec(index = 1)] + #[doc = "The bonded account has already been queued."] + AlreadyQueued, + #[codec(index = 2)] + #[doc = "The bonded account has active unlocking chunks."] + NotFullyBonded, + #[codec(index = 3)] + #[doc = "The provided un-staker is not in the `Queue`."] + NotQueued, + #[codec(index = 4)] + #[doc = "The provided un-staker is already in Head, and cannot deregister."] + AlreadyHead, + #[codec(index = 5)] + #[doc = "The call is not allowed at this point because the pallet is not active."] + CallNotAllowed, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The events of this pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A staker was unstaked."] + Unstaked { + stash: ::subxt::utils::AccountId32, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 1)] + #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] + Slashed { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "An internal error happened. Operations will be paused now."] + InternalError, + #[codec(index = 3)] + #[doc = "A batch was partially checked for the given eras, but the process did not finish."] + BatchChecked { + eras: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 4)] + #[doc = "A batch was terminated."] + #[doc = ""] + #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] + #[doc = "of the batch. A new batch will be created upon next block."] + BatchFinished, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnstakeRequest { + pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + (::subxt::utils::AccountId32, ::core::primitive::u128), + >, + pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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_identity { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Identity pallet declaration."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a registrar to the system."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] + #[doc = ""] + #[doc = "- `account`: the account of the registrar."] + #[doc = ""] + #[doc = "Emits `RegistrarAdded` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] + #[doc = "- One storage mutation (codec `O(R)`)."] + #[doc = "- One event."] + #[doc = "# "] + add_registrar { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Set an account's identity information and reserve the appropriate deposit."] + #[doc = ""] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `info`: The identity information."] + #[doc = ""] + #[doc = "Emits `IdentitySet` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(X + X' + R)`"] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] + #[doc = " - where `R` judgements-count (registrar-count-bounded)"] + #[doc = "- One balance reserve operation."] + #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] + #[doc = "- One event."] + #[doc = "# "] + set_identity { + info: ::std::boxed::Box< + runtime_types::pallet_identity::types::IdentityInfo, + >, + }, + #[codec(index = 2)] + #[doc = "Set the sub-accounts of the sender."] + #[doc = ""] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "- `subs`: The identity's (new) sub-accounts."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(P + S)`"] + #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = "- At most one balance operations."] + #[doc = "- DB:"] + #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] + #[doc = " - One storage read (codec complexity `O(P)`)."] + #[doc = " - One storage write (codec complexity `O(S)`)."] + #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] + #[doc = "# "] + set_subs { + subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + }, + #[codec(index = 3)] + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] + #[doc = ""] + #[doc = "Payment: All reserved balances on the account are returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "Emits `IdentityCleared` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + S + X)`"] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + #[doc = "- One balance-unreserve operation."] + #[doc = "- `2` storage reads and `S + 2` storage deletions."] + #[doc = "- One event."] + #[doc = "# "] + clear_identity, + #[codec(index = 4)] + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] + #[doc = "- One event."] + #[doc = "# "] + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Cancel a previous request."] + #[doc = ""] + #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- One storage mutation `O(R + X)`."] + #[doc = "- One event"] + #[doc = "# "] + cancel_request { reg_index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "Set the fee required for a judgement to be requested from a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] + #[doc = "# "] + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "Change the account associated with a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] + #[doc = "# "] + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 8)] + #[doc = "Set the field information for a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] + #[doc = "# "] + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + }, + #[codec(index = 9)] + #[doc = "Provide a judgement for an account's identity."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] + #[doc = ""] + #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] + #[doc = ""] + #[doc = "Emits `JudgementGiven` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + X)`."] + #[doc = "- One balance-transfer operation."] + #[doc = "- Up to one account-lookup operation."] + #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] + #[doc = "- One event."] + #[doc = "# "] + provide_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, + identity: ::subxt::utils::H256, + }, + #[codec(index = 10)] + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] + #[doc = ""] + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = ""] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = ""] + #[doc = "Emits `IdentityKilled` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + S + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- `S + 2` storage mutations."] + #[doc = "- One event."] + #[doc = "# "] + kill_identity { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 11)] + #[doc = "Add the given account to the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + add_sub { + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 12)] + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + rename_sub { + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 13)] + #[doc = "Remove the given account from the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + remove_sub { + sub: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Remove the sender as a sub-account."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] + #[doc = ""] + #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + quit_sub, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Too many subs-accounts."] + TooManySubAccounts, + #[codec(index = 1)] + #[doc = "Account isn't found."] + NotFound, + #[codec(index = 2)] + #[doc = "Account isn't named."] + NotNamed, + #[codec(index = 3)] + #[doc = "Empty index."] + EmptyIndex, + #[codec(index = 4)] + #[doc = "Fee is changed."] + FeeChanged, + #[codec(index = 5)] + #[doc = "No identity found."] + NoIdentity, + #[codec(index = 6)] + #[doc = "Sticky judgement."] + StickyJudgement, + #[codec(index = 7)] + #[doc = "Judgement given."] + JudgementGiven, + #[codec(index = 8)] + #[doc = "Invalid judgement."] + InvalidJudgement, + #[codec(index = 9)] + #[doc = "The index is invalid."] + InvalidIndex, + #[codec(index = 10)] + #[doc = "The target is invalid."] + InvalidTarget, + #[codec(index = 11)] + #[doc = "Too many additional fields."] + TooManyFields, + #[codec(index = 12)] + #[doc = "Maximum amount of registrars reached. Cannot add any more."] + TooManyRegistrars, + #[codec(index = 13)] + #[doc = "Account ID is already named."] + AlreadyClaimed, + #[codec(index = 14)] + #[doc = "Sender is not a sub-account."] + NotSub, + #[codec(index = 15)] + #[doc = "Sub-account isn't owned by sender."] + NotOwned, + #[codec(index = 16)] + #[doc = "The provided judgement was for a different identity."] + JudgementForDifferentIdentity, + #[codec(index = 17)] + #[doc = "Error that occurs when there is an issue paying for judgement."] + JudgementPaymentFailed, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 name was set or reset (which will remove all judgements)."] + IdentitySet { who: ::subxt::utils::AccountId32 }, + #[codec(index = 1)] + #[doc = "A name was cleared, and the given balance returned."] + IdentityCleared { + who: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A name was removed and the given balance slashed."] + IdentityKilled { + who: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A judgement was asked from a registrar."] + JudgementRequested { + who: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A judgement request was retracted."] + JudgementUnrequested { + who: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "A judgement was given by a registrar."] + JudgementGiven { + target: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "A registrar was added."] + RegistrarAdded { + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "A sub-identity was added to an identity and the deposit paid."] + SubIdentityAdded { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "A sub-identity was removed from an identity and the deposit freed."] + SubIdentityRemoved { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] + #[doc = "main identity account to the sub-identity account."] + SubIdentityRevoked { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BitFlags<_0>( + pub ::core::primitive::u64, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Data { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Raw0([::core::primitive::u8; 0usize]), + #[codec(index = 2)] + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), + #[codec(index = 4)] + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum IdentityField { + #[codec(index = 1)] + Display, + #[codec(index = 2)] + Legal, + #[codec(index = 4)] + Web, + #[codec(index = 8)] + Riot, + #[codec(index = 16)] + Email, + #[codec(index = 32)] + PgpFingerprint, + #[codec(index = 64)] + Image, + #[codec(index = 128)] + Twitter, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IdentityInfo { + pub additional: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: + ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RegistrarInfo<_0, _1> { + pub account: _1, + pub fee: _0, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Registration<_0> { + pub judgements: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: runtime_types::pallet_identity::types::IdentityInfo, + } + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "# "] # [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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The 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, + Debug, + )] + #[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_lottery { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Buy a ticket to enter the lottery."] + #[doc = ""] + #[doc = "This extrinsic acts as a passthrough function for `call`. In all"] + #[doc = "situations where `call` alone would succeed, this extrinsic should"] + #[doc = "succeed."] + #[doc = ""] + #[doc = "If `call` is successful, then we will attempt to purchase a ticket,"] + #[doc = "which may fail silently. To detect success of a ticket purchase, you"] + #[doc = "should listen for the `TicketBought` event."] + #[doc = ""] + #[doc = "This extrinsic must be called by a signed origin."] + buy_ticket { + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Set calls in storage which can be used to purchase a lottery ticket."] + #[doc = ""] + #[doc = "This function only matters if you use the `ValidateCall` implementation"] + #[doc = "provided by this pallet, which uses storage to determine the valid calls."] + #[doc = ""] + #[doc = "This extrinsic must be called by the Manager origin."] + set_calls { + calls: ::std::vec::Vec< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[codec(index = 2)] + #[doc = "Start a lottery using the provided configuration."] + #[doc = ""] + #[doc = "This extrinsic must be called by the `ManagerOrigin`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = ""] + #[doc = "* `price`: The cost of a single ticket."] + #[doc = "* `length`: How long the lottery should run for starting at the current block."] + #[doc = "* `delay`: How long after the lottery end we should wait before picking a winner."] + #[doc = "* `repeat`: If the lottery should repeat when completed."] + start_lottery { + price: ::core::primitive::u128, + length: ::core::primitive::u32, + delay: ::core::primitive::u32, + repeat: ::core::primitive::bool, + }, + #[codec(index = 3)] + #[doc = "If a lottery is repeating, you can use this to stop the repeat."] + #[doc = "The lottery will continue to run to completion."] + #[doc = ""] + #[doc = "This extrinsic must be called by the `ManagerOrigin`."] + stop_repeat, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "A lottery has not been configured."] + NotConfigured, + #[codec(index = 1)] + #[doc = "A lottery is already in progress."] + InProgress, + #[codec(index = 2)] + #[doc = "A lottery has already ended."] + AlreadyEnded, + #[codec(index = 3)] + #[doc = "The call is not valid for an open lottery."] + InvalidCall, + #[codec(index = 4)] + #[doc = "You are already participating in the lottery with this call."] + AlreadyParticipating, + #[codec(index = 5)] + #[doc = "Too many calls for a single lottery."] + TooManyCalls, + #[codec(index = 6)] + #[doc = "Failed to encode calls"] + EncodingFailed, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 lottery has been started!"] + LotteryStarted, + #[codec(index = 1)] + #[doc = "A new set of calls have been set!"] + CallsUpdated, + #[codec(index = 2)] + #[doc = "A winner has been chosen!"] + Winner { + winner: ::subxt::utils::AccountId32, + lottery_balance: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A ticket has been bought!"] + TicketBought { + who: ::subxt::utils::AccountId32, + call_index: (::core::primitive::u8, ::core::primitive::u8), + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct LotteryConfig<_0, _1> { + pub price: _1, + pub start: _0, + pub length: _0, + pub delay: _0, + pub repeat: ::core::primitive::bool, + } + } + pub mod pallet_membership { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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_message_queue { + use super::runtime_types; + pub mod mock_helpers { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MessageOrigin { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + There, + #[codec(index = 2)] + Everywhere(::core::primitive::u32), + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Remove a page which has no more messages remaining to be processed or is stale."] reap_page { message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page_index : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Execute an overweight message."] # [doc = ""] # [doc = "- `origin`: Must be `Signed`."] # [doc = "- `message_origin`: The origin from which the message to be executed arrived."] # [doc = "- `page`: The page in the queue in which the message to be executed is sitting."] # [doc = "- `index`: The index into the queue of the message to be executed."] # [doc = "- `weight_limit`: The maximum amount of weight allowed to be consumed in the execution"] # [doc = " of the message."] # [doc = ""] # [doc = "Benchmark complexity considerations: O(index + weight_limit)."] execute_overweight { message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , weight_limit : runtime_types :: sp_weights :: weight_v2 :: Weight , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 = "Page is not reapable because it has items remaining to be processed and is not old"] + #[doc = "enough."] + NotReapable, + #[codec(index = 1)] + #[doc = "Page to be reaped does not exist."] + NoPage, + #[codec(index = 2)] + #[doc = "The referenced message could not be found."] + NoMessage, + #[codec(index = 3)] + #[doc = "The message was already processed and cannot be processed again."] + AlreadyProcessed, + #[codec(index = 4)] + #[doc = "The message is queued for future execution."] + Queued, + #[codec(index = 5)] + #[doc = "There is temporarily not enough weight to continue servicing messages."] + InsufficientWeight, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Message discarded due to an inability to decode the item. Usually caused by state"] # [doc = "corruption."] Discarded { hash : :: subxt :: utils :: H256 , } , # [codec (index = 1)] # [doc = "Message discarded due to an error in the `MessageProcessor` (usually a format error)."] ProcessingFailed { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , error : runtime_types :: frame_support :: traits :: messages :: ProcessMessageError , } , # [codec (index = 2)] # [doc = "Message is processed."] Processed { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , weight_used : runtime_types :: sp_weights :: weight_v2 :: Weight , success : :: core :: primitive :: bool , } , # [codec (index = 3)] # [doc = "Message placed in overweight queue."] OverweightEnqueued { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page_index : :: core :: primitive :: u32 , message_index : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "This page was reaped."] PageReaped { origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , index : :: core :: primitive :: u32 , } , } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BookState<_0> { + pub begin: ::core::primitive::u32, + pub end: ::core::primitive::u32, + pub count: ::core::primitive::u32, + pub ready_neighbours: ::core::option::Option< + runtime_types::pallet_message_queue::Neighbours<_0>, + >, + pub message_count: ::core::primitive::u64, + pub size: ::core::primitive::u64, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Neighbours<_0> { + pub prev: _0, + pub next: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Page<_0> { + pub remaining: _0, + pub remaining_size: _0, + pub first_index: _0, + pub first: _0, + pub last: _0, + pub heap: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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_nfts { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Issue a new collection of non-fungible items from a public origin."] # [doc = ""] # [doc = "This new collection has no items initially and its owner is the origin."] # [doc = ""] # [doc = "The origin must be Signed and the sender must have sufficient funds free."] # [doc = ""] # [doc = "`ItemDeposit` funds of sender are reserved."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] # [doc = "member of the collection's admin team."] # [doc = ""] # [doc = "Emits `Created` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] create { admin : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 1)] # [doc = "Issue a new collection of non-fungible items from a privileged origin."] # [doc = ""] # [doc = "This new collection has no items initially."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin`."] # [doc = ""] # [doc = "Unlike `create`, no funds are reserved."] # [doc = ""] # [doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] # [doc = " permissions over this item, but may later change and configure the permissions using"] # [doc = " `transfer_ownership` and `set_team`."] # [doc = ""] # [doc = "Emits `ForceCreated` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_create { owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 2)] # [doc = "Destroy a collection of fungible items."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] # [doc = "owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to be destroyed."] # [doc = "- `witness`: Information on the items minted in the collection. This must be"] # [doc = "correct."] # [doc = ""] # [doc = "Emits `Destroyed` event when successful."] # [doc = ""] # [doc = "Weight: `O(n + m)` where:"] # [doc = "- `n = witness.items`"] # [doc = "- `m = witness.item_metadatas`"] # [doc = "- `a = witness.attributes`"] destroy { collection : :: core :: primitive :: u32 , witness : runtime_types :: pallet_nfts :: types :: DestroyWitness , } , # [codec (index = 3)] # [doc = "Mint an item of a particular collection."] # [doc = ""] # [doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be minted."] # [doc = "- `item`: An identifier of the new item."] # [doc = "- `mint_to`: Account into which the item will be minted."] # [doc = "- `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned"] # [doc = " item_id from that collection needs to be provided within the witness data object."] # [doc = ""] # [doc = "Note: the deposit will be taken from the `origin` and not the `owner` of the `item`."] # [doc = ""] # [doc = "Emits `Issued` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] mint { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , mint_to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , witness_data : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: MintWitness < :: core :: primitive :: u32 > > , } , # [codec (index = 4)] # [doc = "Mint an item of a particular collection from a privileged origin."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] # [doc = "Issuer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be minted."] # [doc = "- `item`: An identifier of the new item."] # [doc = "- `mint_to`: Account into which the item will be minted."] # [doc = "- `item_config`: A config of the new item."] # [doc = ""] # [doc = "Emits `Issued` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_mint { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , mint_to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , item_config : runtime_types :: pallet_nfts :: types :: ItemConfig , } , # [codec (index = 5)] # [doc = "Destroy a single item."] # [doc = ""] # [doc = "Origin must be Signed and the signing account must be either:"] # [doc = "- the Admin of the `collection`;"] # [doc = "- the Owner of the `item`;"] # [doc = ""] # [doc = "- `collection`: The collection of the item to be burned."] # [doc = "- `item`: The item to be burned."] # [doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] # [doc = " item is owned by this value."] # [doc = ""] # [doc = "Emits `Burned` with the actual amount burned."] # [doc = ""] # [doc = "Weight: `O(1)`"] # [doc = "Modes: `check_owner.is_some()`."] burn { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , check_owner : :: core :: option :: Option < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > > , } , # [codec (index = 6)] # [doc = "Move an item from the sender account to another."] # [doc = ""] # [doc = "Origin must be Signed and the signing account must be either:"] # [doc = "- the Admin of the `collection`;"] # [doc = "- the Owner of the `item`;"] # [doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item to be transferred."] # [doc = "- `item`: The item to be transferred."] # [doc = "- `dest`: The account to receive ownership of the item."] # [doc = ""] # [doc = "Emits `Transferred`."] # [doc = ""] # [doc = "Weight: `O(1)`"] transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , dest : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 7)] # [doc = "Re-evaluate the deposits on some items."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the items to be reevaluated."] # [doc = "- `items`: The items of the collection whose deposits will be reevaluated."] # [doc = ""] # [doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] # [doc = "in the case that the owner account does not have reservable funds to pay for a"] # [doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] # [doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] # [doc = "so it's of little consequence."] # [doc = ""] # [doc = "It will still return an error in the case that the collection is unknown or the signer"] # [doc = "is not permitted to call it."] # [doc = ""] # [doc = "Weight: `O(items.len())`"] redeposit { collection : :: core :: primitive :: u32 , items : :: std :: vec :: Vec < :: core :: primitive :: u32 > , } , # [codec (index = 8)] # [doc = "Disallow further unprivileged transfer of an item."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be changed."] # [doc = "- `item`: The item to become non-transferable."] # [doc = ""] # [doc = "Emits `ItemTransferLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_item_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 9)] # [doc = "Re-allow unprivileged transfer of an item."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be changed."] # [doc = "- `item`: The item to become transferable."] # [doc = ""] # [doc = "Emits `ItemTransferUnlocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] unlock_item_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "Disallows specified settings for the whole collection."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection to be locked."] # [doc = "- `lock_settings`: The settings to be locked."] # [doc = ""] # [doc = "Note: it's possible to only lock(set) the setting, but not to unset it."] # [doc = "Emits `CollectionLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_collection { collection : :: core :: primitive :: u32 , lock_settings : runtime_types :: pallet_nfts :: types :: BitFlags < runtime_types :: pallet_nfts :: types :: CollectionSetting > , } , # [codec (index = 11)] # [doc = "Change the Owner of a collection."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection whose owner should be changed."] # [doc = "- `owner`: The new Owner of this collection. They must have called"] # [doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] # [doc = ""] # [doc = "Emits `OwnerChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] transfer_ownership { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 12)] # [doc = "Change the Issuer, Admin and Freezer of a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "- `collection`: The collection whose team should be changed."] # [doc = "- `issuer`: The new Issuer of this collection."] # [doc = "- `admin`: The new Admin of this collection."] # [doc = "- `freezer`: The new Freezer of this collection."] # [doc = ""] # [doc = "Emits `TeamChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_team { collection : :: core :: primitive :: u32 , issuer : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , admin : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , freezer : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "Change the Owner of a collection."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection."] # [doc = "- `owner`: The new Owner of this collection."] # [doc = ""] # [doc = "Emits `OwnerChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_collection_owner { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 14)] # [doc = "Change the config of a collection."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection."] # [doc = "- `config`: The new config of this collection."] # [doc = ""] # [doc = "Emits `CollectionConfigChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_collection_config { collection : :: core :: primitive :: u32 , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 15)] # [doc = "Approve an item to be transferred by a delegated third-party account."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be approved for delegated transfer."] # [doc = "- `item`: The item to be approved for delegated transfer."] # [doc = "- `delegate`: The account to delegate permission to transfer the item."] # [doc = "- `maybe_deadline`: Optional deadline for the approval. Specified by providing the"] # [doc = "\tnumber of blocks after which the approval will expire"] # [doc = ""] # [doc = "Emits `TransferApproved` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] approve_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , maybe_deadline : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 16)] # [doc = "Cancel one of the transfer approvals for a specific item."] # [doc = ""] # [doc = "Origin must be either:"] # [doc = "- the `Force` origin;"] # [doc = "- `Signed` with the signer being the Admin of the `collection`;"] # [doc = "- `Signed` with the signer being the Owner of the `item`;"] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item of whose approval will be cancelled."] # [doc = "- `item`: The item of the collection of whose approval will be cancelled."] # [doc = "- `delegate`: The account that is going to loose their approval."] # [doc = ""] # [doc = "Emits `ApprovalCancelled` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] cancel_approval { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 17)] # [doc = "Cancel all the approvals of a specific item."] # [doc = ""] # [doc = "Origin must be either:"] # [doc = "- the `Force` origin;"] # [doc = "- `Signed` with the signer being the Admin of the `collection`;"] # [doc = "- `Signed` with the signer being the Owner of the `item`;"] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item of whose approvals will be cleared."] # [doc = "- `item`: The item of the collection of whose approvals will be cleared."] # [doc = ""] # [doc = "Emits `AllApprovalsCancelled` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_all_transfer_approvals { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "Disallows changing the metadata or attributes of the item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "- `collection`: The collection if the `item`."] # [doc = "- `item`: An item to be locked."] # [doc = "- `lock_metadata`: Specifies whether the metadata should be locked."] # [doc = "- `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace"] # [doc = " should be locked."] # [doc = ""] # [doc = "Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace"] # [doc = "only. When the metadata or attributes are locked, it won't be possible the unlock them."] # [doc = ""] # [doc = "Emits `ItemPropertiesLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_item_properties { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , lock_metadata : :: core :: primitive :: bool , lock_attributes : :: core :: primitive :: bool , } , # [codec (index = 19)] # [doc = "Set an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be Signed and must conform to the namespace ruleset:"] # [doc = "- `CollectionOwner` namespace could be modified by the `collection` owner only;"] # [doc = "- `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`"] # [doc = " should be set in that case;"] # [doc = "- `Account(AccountId)` namespace could be modified only when the `origin` was given a"] # [doc = " permission to do so;"] # [doc = ""] # [doc = "The funds of `origin` are reserved according to the formula:"] # [doc = "`AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to set."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = "- `value`: The value to which to set the attribute."] # [doc = ""] # [doc = "Emits `AttributeSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_attribute { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 20)] # [doc = "Force-set an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "If the attribute already exists and it was set by another account, the deposit"] # [doc = "will be returned to the previous owner."] # [doc = ""] # [doc = "- `set_as`: An optional owner of the attribute."] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to set."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = "- `value`: The value to which to set the attribute."] # [doc = ""] # [doc = "Emits `AttributeSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_set_attribute { set_as : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 21)] # [doc = "Clear an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "attribute."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = ""] # [doc = "Emits `AttributeCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_attribute { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 22)] # [doc = "Approve item's attributes to be changed by a delegated third-party account."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: A collection of the item."] # [doc = "- `item`: The item that holds attributes."] # [doc = "- `delegate`: The account to delegate permission to change attributes of the item."] # [doc = ""] # [doc = "Emits `ItemAttributesApprovalAdded` on success."] approve_item_attributes { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 23)] # [doc = "Cancel the previously provided approval to change item's attributes."] # [doc = "All the previously set attributes by the `delegate` will be removed."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: Collection that the item is contained within."] # [doc = "- `item`: The item that holds attributes."] # [doc = "- `delegate`: The previously approved account to remove."] # [doc = ""] # [doc = "Emits `ItemAttributesApprovalRemoved` on success."] cancel_item_attributes_approval { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , witness : runtime_types :: pallet_nfts :: types :: CancelAttributesApprovalWitness , } , # [codec (index = 24)] # [doc = "Set the metadata for an item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] # [doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `item`: The identifier of the item whose metadata to set."] # [doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] # [doc = ""] # [doc = "Emits `ItemMetadataSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_metadata { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 25)] # [doc = "Clear the metadata for an item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] # [doc = "- `item`: The identifier of the item whose metadata to clear."] # [doc = ""] # [doc = "Emits `ItemMetadataCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_metadata { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 26)] # [doc = "Set the metadata for a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] # [doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the item whose metadata to update."] # [doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] # [doc = ""] # [doc = "Emits `CollectionMetadataSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_collection_metadata { collection : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 27)] # [doc = "Clear the metadata for a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose metadata to clear."] # [doc = ""] # [doc = "Emits `CollectionMetadataCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_collection_metadata { collection : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "Set (or reset) the acceptance of ownership for a particular account."] # [doc = ""] # [doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] # [doc = "provider reference."] # [doc = ""] # [doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] # [doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] # [doc = " ownership transferal."] # [doc = ""] # [doc = "Emits `OwnershipAcceptanceChanged`."] set_accept_ownership { maybe_collection : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 29)] # [doc = "Set the maximum number of items a collection could have."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to change."] # [doc = "- `max_supply`: The maximum number of items a collection could have."] # [doc = ""] # [doc = "Emits `CollectionMaxSupplySet` event when successful."] set_collection_max_supply { collection : :: core :: primitive :: u32 , max_supply : :: core :: primitive :: u32 , } , # [codec (index = 30)] # [doc = "Update mint settings."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to change."] # [doc = "- `mint_settings`: The new mint settings."] # [doc = ""] # [doc = "Emits `CollectionMintSettingsUpdated` event when successful."] update_mint_settings { collection : :: core :: primitive :: u32 , mint_settings : runtime_types :: pallet_nfts :: types :: MintSettings < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 31)] # [doc = "Set (or reset) the price for an item."] # [doc = ""] # [doc = "Origin must be Signed and must be the owner of the asset `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item to set the price for."] # [doc = "- `price`: The price for the item. Pass `None`, to reset the price."] # [doc = "- `buyer`: Restricts the buy operation to a specific account."] # [doc = ""] # [doc = "Emits `ItemPriceSet` on success if the price is not `None`."] # [doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] set_price { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: option :: Option < :: core :: primitive :: u128 > , whitelisted_buyer : :: core :: option :: Option < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > > , } , # [codec (index = 32)] # [doc = "Allows to buy an item if it's up for sale."] # [doc = ""] # [doc = "Origin must be Signed and must not be the owner of the `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item the sender wants to buy."] # [doc = "- `bid_price`: The price the sender is willing to pay."] # [doc = ""] # [doc = "Emits `ItemBought` on success."] buy_item { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , bid_price : :: core :: primitive :: u128 , } , # [codec (index = 33)] # [doc = "Allows to pay the tips."] # [doc = ""] # [doc = "Origin must be Signed."] # [doc = ""] # [doc = "- `tips`: Tips array."] # [doc = ""] # [doc = "Emits `TipSent` on every tip transfer."] pay_tips { tips : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < runtime_types :: pallet_nfts :: types :: ItemTip < :: core :: primitive :: u32 , :: core :: primitive :: u32 , :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 > > , } , # [codec (index = 34)] # [doc = "Register a new atomic swap, declaring an intention to send an `item` in exchange for"] # [doc = "`desired_item` from origin to target on the current blockchain."] # [doc = "The target can execute the swap during the specified `duration` of blocks (if set)."] # [doc = "Additionally, the price could be set for the desired `item`."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item an owner wants to give."] # [doc = "- `desired_collection`: The collection of the desired item."] # [doc = "- `desired_item`: The desired item an owner wants to receive."] # [doc = "- `maybe_price`: The price an owner is willing to pay or receive for the desired `item`."] # [doc = "- `duration`: A deadline for the swap. Specified by providing the number of blocks"] # [doc = "\tafter which the swap will expire."] # [doc = ""] # [doc = "Emits `SwapCreated` on success."] create_swap { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , maybe_desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , duration : :: core :: primitive :: u32 , } , # [codec (index = 35)] # [doc = "Cancel an atomic swap."] # [doc = ""] # [doc = "Origin must be Signed."] # [doc = "Origin must be an owner of the `item` if the deadline hasn't expired."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item an owner wants to give."] # [doc = ""] # [doc = "Emits `SwapCancelled` on success."] cancel_swap { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , } , # [codec (index = 36)] # [doc = "Claim an atomic swap."] # [doc = "This method executes a pending swap, that was created by a counterpart before."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `send_collection`: The collection of the item to be sent."] # [doc = "- `send_item`: The item to be sent."] # [doc = "- `receive_collection`: The collection of the item to be received."] # [doc = "- `receive_item`: The item to be received."] # [doc = "- `witness_price`: A price that was previously agreed on."] # [doc = ""] # [doc = "Emits `SwapClaimed` on success."] claim_swap { send_collection : :: core :: primitive :: u32 , send_item : :: core :: primitive :: u32 , receive_collection : :: core :: primitive :: u32 , receive_item : :: core :: primitive :: u32 , witness_price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\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 signing account has no permission to do the operation."] + NoPermission, + #[codec(index = 1)] + #[doc = "The given item ID is unknown."] + UnknownCollection, + #[codec(index = 2)] + #[doc = "The item ID has already been used for an item."] + AlreadyExists, + #[codec(index = 3)] + #[doc = "The approval had a deadline that expired, so the approval isn't valid anymore."] + ApprovalExpired, + #[codec(index = 4)] + #[doc = "The owner turned out to be different to what was expected."] + WrongOwner, + #[codec(index = 5)] + #[doc = "The witness data given does not match the current state of the chain."] + BadWitness, + #[codec(index = 6)] + #[doc = "Collection ID is already taken."] + CollectionIdInUse, + #[codec(index = 7)] + #[doc = "Items within that collection are non-transferable."] + ItemsNonTransferable, + #[codec(index = 8)] + #[doc = "The provided account is not a delegate."] + NotDelegate, + #[codec(index = 9)] + #[doc = "The delegate turned out to be different to what was expected."] + WrongDelegate, + #[codec(index = 10)] + #[doc = "No approval exists that would allow the transfer."] + Unapproved, + #[codec(index = 11)] + #[doc = "The named owner has not signed ownership acceptance of the collection."] + Unaccepted, + #[codec(index = 12)] + #[doc = "The item is locked (non-transferable)."] + ItemLocked, + #[codec(index = 13)] + #[doc = "Item's attributes are locked."] + LockedItemAttributes, + #[codec(index = 14)] + #[doc = "Collection's attributes are locked."] + LockedCollectionAttributes, + #[codec(index = 15)] + #[doc = "Item's metadata is locked."] + LockedItemMetadata, + #[codec(index = 16)] + #[doc = "Collection's metadata is locked."] + LockedCollectionMetadata, + #[codec(index = 17)] + #[doc = "All items have been minted."] + MaxSupplyReached, + #[codec(index = 18)] + #[doc = "The max supply is locked and can't be changed."] + MaxSupplyLocked, + #[codec(index = 19)] + #[doc = "The provided max supply is less than the number of items a collection already has."] + MaxSupplyTooSmall, + #[codec(index = 20)] + #[doc = "The given item ID is unknown."] + UnknownItem, + #[codec(index = 21)] + #[doc = "Swap doesn't exist."] + UnknownSwap, + #[codec(index = 22)] + #[doc = "The given item has no metadata set."] + MetadataNotFound, + #[codec(index = 23)] + #[doc = "The provided attribute can't be found."] + AttributeNotFound, + #[codec(index = 24)] + #[doc = "Item is not for sale."] + NotForSale, + #[codec(index = 25)] + #[doc = "The provided bid is too low."] + BidTooLow, + #[codec(index = 26)] + #[doc = "The item has reached its approval limit."] + ReachedApprovalLimit, + #[codec(index = 27)] + #[doc = "The deadline has already expired."] + DeadlineExpired, + #[codec(index = 28)] + #[doc = "The duration provided should be less than or equal to `MaxDeadlineDuration`."] + WrongDuration, + #[codec(index = 29)] + #[doc = "The method is disabled by system settings."] + MethodDisabled, + #[codec(index = 30)] + #[doc = "The provided setting can't be set."] + WrongSetting, + #[codec(index = 31)] + #[doc = "Item's config already exists and should be equal to the provided one."] + InconsistentItemConfig, + #[codec(index = 32)] + #[doc = "Config for a collection or an item can't be found."] + NoConfig, + #[codec(index = 33)] + #[doc = "Some roles were not cleared."] + RolesNotCleared, + #[codec(index = 34)] + #[doc = "Mint has not started yet."] + MintNotStarted, + #[codec(index = 35)] + #[doc = "Mint has already ended."] + MintEnded, + #[codec(index = 36)] + #[doc = "The provided Item was already used for claiming."] + AlreadyClaimed, + #[codec(index = 37)] + #[doc = "The provided data is incorrect."] + IncorrectData, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 `collection` was created."] Created { collection : :: core :: primitive :: u32 , creator : :: subxt :: utils :: AccountId32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 1)] # [doc = "A `collection` was force-created."] ForceCreated { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 2)] # [doc = "A `collection` was destroyed."] Destroyed { collection : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "An `item` was issued."] Issued { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 4)] # [doc = "An `item` was transferred."] Transferred { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , from : :: subxt :: utils :: AccountId32 , to : :: subxt :: utils :: AccountId32 , } , # [codec (index = 5)] # [doc = "An `item` was destroyed."] Burned { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 6)] # [doc = "An `item` became non-transferable."] ItemTransferLocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "An `item` became transferable."] ItemTransferUnlocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 8)] # [doc = "`item` metadata or attributes were locked."] ItemPropertiesLocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , lock_metadata : :: core :: primitive :: bool , lock_attributes : :: core :: primitive :: bool , } , # [codec (index = 9)] # [doc = "Some `collection` was locked."] CollectionLocked { collection : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "The owner changed."] OwnerChanged { collection : :: core :: primitive :: u32 , new_owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 11)] # [doc = "The management team changed."] TeamChanged { collection : :: core :: primitive :: u32 , issuer : :: subxt :: utils :: AccountId32 , admin : :: subxt :: utils :: AccountId32 , freezer : :: subxt :: utils :: AccountId32 , } , # [codec (index = 12)] # [doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] # [doc = "a `delegate`."] TransferApproved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , delegate : :: subxt :: utils :: AccountId32 , deadline : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "An approval for a `delegate` account to transfer the `item` of an item"] # [doc = "`collection` was cancelled by its `owner`."] ApprovalCancelled { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 14)] # [doc = "All approvals of an item got cancelled."] AllApprovalsCancelled { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 15)] # [doc = "A `collection` has had its config changed by the `Force` origin."] CollectionConfigChanged { collection : :: core :: primitive :: u32 , } , # [codec (index = 16)] # [doc = "New metadata has been set for a `collection`."] CollectionMetadataSet { collection : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 17)] # [doc = "Metadata has been cleared for a `collection`."] CollectionMetadataCleared { collection : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "New metadata has been set for an item."] ItemMetadataSet { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 19)] # [doc = "Metadata has been cleared for an item."] ItemMetadataCleared { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "The deposit for a set of `item`s within a `collection` has been updated."] Redeposited { collection : :: core :: primitive :: u32 , successful_items : :: std :: vec :: Vec < :: core :: primitive :: u32 > , } , # [codec (index = 21)] # [doc = "New attribute metadata has been set for a `collection` or `item`."] AttributeSet { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 22)] # [doc = "Attribute metadata has been cleared for a `collection` or `item`."] AttributeCleared { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 23)] # [doc = "A new approval to modify item attributes was added."] ItemAttributesApprovalAdded { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 24)] # [doc = "A new approval to modify item attributes was removed."] ItemAttributesApprovalRemoved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 25)] # [doc = "Ownership acceptance has changed for an account."] OwnershipAcceptanceChanged { who : :: subxt :: utils :: AccountId32 , maybe_collection : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 26)] # [doc = "Max supply has been set for a collection."] CollectionMaxSupplySet { collection : :: core :: primitive :: u32 , max_supply : :: core :: primitive :: u32 , } , # [codec (index = 27)] # [doc = "Mint settings for a collection had changed."] CollectionMintSettingsUpdated { collection : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "Event gets emitted when the `NextCollectionId` gets incremented."] NextCollectionIdIncremented { next_id : :: core :: primitive :: u32 , } , # [codec (index = 29)] # [doc = "The price was set for the item."] ItemPriceSet { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: primitive :: u128 , whitelisted_buyer : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 30)] # [doc = "The price for the item was removed."] ItemPriceRemoved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 31)] # [doc = "An item was bought."] ItemBought { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: primitive :: u128 , seller : :: subxt :: utils :: AccountId32 , buyer : :: subxt :: utils :: AccountId32 , } , # [codec (index = 32)] # [doc = "A tip was sent."] TipSent { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , sender : :: subxt :: utils :: AccountId32 , receiver : :: subxt :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 33)] # [doc = "An `item` swap intent was created."] SwapCreated { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , # [codec (index = 34)] # [doc = "The swap was cancelled."] SwapCancelled { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , # [codec (index = 35)] # [doc = "The swap has been claimed."] SwapClaimed { sent_collection : :: core :: primitive :: u32 , sent_item : :: core :: primitive :: u32 , sent_item_owner : :: subxt :: utils :: AccountId32 , received_collection : :: core :: primitive :: u32 , received_item : :: core :: primitive :: u32 , received_item_owner : :: subxt :: utils :: AccountId32 , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AttributeDeposit<_0, _1> { + pub account: ::core::option::Option<_1>, + pub amount: _0, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BitFlags<_0>( + pub ::core::primitive::u64, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CancelAttributesApprovalWitness { + pub account_attributes: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CollectionConfig<_0, _1, _2> { + pub settings: runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::CollectionSetting, + >, + pub max_supply: ::core::option::Option<_1>, + pub mint_settings: + runtime_types::pallet_nfts::types::MintSettings<_0, _1, _1>, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CollectionDetails<_0, _1> { + pub owner: _0, + pub owner_deposit: _1, + pub items: ::core::primitive::u32, + pub item_metadatas: ::core::primitive::u32, + pub attributes: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CollectionMetadata<_0> { + pub deposit: _0, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum CollectionRole { + #[codec(index = 1)] + Issuer, + #[codec(index = 2)] + Freezer, + #[codec(index = 4)] + Admin, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum CollectionSetting { + #[codec(index = 1)] + TransferableItems, + #[codec(index = 2)] + UnlockedMetadata, + #[codec(index = 4)] + UnlockedAttributes, + #[codec(index = 8)] + UnlockedMaxSupply, + #[codec(index = 16)] + DepositRequired, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DestroyWitness { + #[codec(compact)] + pub items: ::core::primitive::u32, + #[codec(compact)] + pub item_metadatas: ::core::primitive::u32, + #[codec(compact)] + pub attributes: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemConfig { + pub settings: runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::ItemSetting, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemDeposit<_0, _1> { + pub account: _1, + pub amount: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemDetails<_0, _1, _2> { + pub owner: _0, + pub approvals: _2, + pub deposit: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemMetadata<_0> { + pub deposit: _0, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemMetadataDeposit<_0, _1> { + pub account: ::core::option::Option<_1>, + pub amount: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ItemSetting { + #[codec(index = 1)] + Transferable, + #[codec(index = 2)] + UnlockedMetadata, + #[codec(index = 4)] + UnlockedAttributes, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemTip<_0, _1, _2, _3> { + pub collection: _0, + pub item: _0, + pub receiver: _2, + pub amount: _3, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MintSettings<_0, _1, _2> { + pub mint_type: runtime_types::pallet_nfts::types::MintType<_1>, + pub price: ::core::option::Option<_0>, + pub start_block: ::core::option::Option<_1>, + pub end_block: ::core::option::Option<_1>, + pub default_item_settings: + runtime_types::pallet_nfts::types::BitFlags< + runtime_types::pallet_nfts::types::ItemSetting, + >, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MintType<_0> { + #[codec(index = 0)] + Issuer, + #[codec(index = 1)] + Public, + #[codec(index = 2)] + HolderOf(_0), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MintWitness<_0> { + pub owner_of_item: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PalletFeature { + #[codec(index = 1)] + Trading, + #[codec(index = 2)] + Attributes, + #[codec(index = 4)] + Approvals, + #[codec(index = 8)] + Swaps, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PendingSwap<_0, _1, _2, _3> { + pub desired_collection: _0, + pub desired_item: ::core::option::Option<_0>, + pub price: ::core::option::Option<_2>, + pub deadline: _0, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<(_3, _1)>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum PriceDirection { + #[codec(index = 0)] + Send, + #[codec(index = 1)] + Receive, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriceWithDirection<_0> { + pub amount: _0, + pub direction: runtime_types::pallet_nfts::types::PriceDirection, + } + } + } + pub mod pallet_nis { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bid<_0, _1> { + pub amount: _0, + pub who: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Place a bid."] + #[doc = ""] + #[doc = "Origin must be Signed, and account must have at least `amount` in free balance."] + #[doc = ""] + #[doc = "- `amount`: The amount of the bid; these funds will be reserved, and if/when"] + #[doc = " consolidated, removed. Must be at least `MinBid`."] + #[doc = "- `duration`: The number of periods before which the newly consolidated bid may be"] + #[doc = " thawed. Must be greater than 1 and no more than `QueueCount`."] + #[doc = ""] + #[doc = "Complexities:"] + #[doc = "- `Queues[duration].len()` (just take max)."] + place_bid { + #[codec(compact)] + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Retract a previously placed bid."] + #[doc = ""] + #[doc = "Origin must be Signed, and the account should have previously issued a still-active bid"] + #[doc = "of `amount` for `duration`."] + #[doc = ""] + #[doc = "- `amount`: The amount of the previous bid."] + #[doc = "- `duration`: The duration of the previous bid."] + retract_bid { + #[codec(compact)] + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Ensure we have sufficient funding for all potential payouts."] + #[doc = ""] + #[doc = "- `origin`: Must be accepted by `FundOrigin`."] + fund_deficit, + #[codec(index = 3)] + #[doc = "Reduce or remove an outstanding receipt, placing the according proportion of funds into"] + #[doc = "the account of the owner."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed and the account must be the owner of the receipt `index` as"] + #[doc = " well as any fungible counterpart."] + #[doc = "- `index`: The index of the receipt."] + #[doc = "- `portion`: If `Some`, then only the given portion of the receipt should be thawed. If"] + #[doc = " `None`, then all of it should be."] + thaw { + #[codec(compact)] + index: ::core::primitive::u32, + portion: ::core::option::Option<::core::primitive::u128>, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\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 duration of the bid is less than one."] + DurationTooSmall, + #[codec(index = 1)] + #[doc = "The duration is the bid is greater than the number of queues."] + DurationTooBig, + #[codec(index = 2)] + #[doc = "The amount of the bid is less than the minimum allowed."] + AmountTooSmall, + #[codec(index = 3)] + #[doc = "The queue for the bid's duration is full and the amount bid is too low to get in"] + #[doc = "through replacing an existing bid."] + BidTooLow, + #[codec(index = 4)] + #[doc = "Bond index is unknown."] + Unknown, + #[codec(index = 5)] + #[doc = "Not the owner of the receipt."] + NotOwner, + #[codec(index = 6)] + #[doc = "Bond not yet at expiry date."] + NotExpired, + #[codec(index = 7)] + #[doc = "The given bid for retraction is not found."] + NotFound, + #[codec(index = 8)] + #[doc = "The portion supplied is beyond the value of the receipt."] + TooMuch, + #[codec(index = 9)] + #[doc = "Not enough funds are held to pay out."] + Unfunded, + #[codec(index = 10)] + #[doc = "There are enough funds for what is required."] + Funded, + #[codec(index = 11)] + #[doc = "The thaw throttle has been reached for this period."] + Throttled, + #[codec(index = 12)] + #[doc = "The operation would result in a receipt worth an insignficant value."] + MakesDust, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 bid was successfully placed."] + BidPlaced { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A bid was successfully removed (before being accepted)."] + BidRetracted { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "A bid was dropped from a queue because of another, more substantial, bid was present."] + BidDropped { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + duration: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "A bid was accepted. The balance may not be released until expiry."] + Issued { + index: ::core::primitive::u32, + expiry: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + proportion: runtime_types::sp_arithmetic::per_things::Perquintill, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "An receipt has been (at least partially) thawed."] + Thawed { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + proportion: runtime_types::sp_arithmetic::per_things::Perquintill, + amount: ::core::primitive::u128, + dropped: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "An automatic funding of the deficit was made."] + Funded { deficit: ::core::primitive::u128 }, + #[codec(index = 6)] + #[doc = "A receipt was transfered."] + Transferred { + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReceiptRecord<_0, _1> { + pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, + pub who: _0, + pub expiry: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SummaryRecord<_0> { + pub proportion_owed: + runtime_types::sp_arithmetic::per_things::Perquintill, + pub index: _0, + pub thawed: runtime_types::sp_arithmetic::per_things::Perquintill, + pub last_period: _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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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_proxy { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy { + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::kitchensink_runtime::ProxyType, + >, + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + add_proxy { + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Unregister a proxy account for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + remove_proxy { + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Unregister all proxy accounts for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + remove_proxies, + #[codec(index = 4)] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = ""] + #[doc = "Requires a `Signed` origin."] + #[doc = ""] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + #[doc = ""] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] + #[doc = ""] + #[doc = "Fails if there are insufficient funds to pay for deposit."] + create_pure { + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + }, + #[codec(index = 5)] + #[doc = "Removes a previously spawned pure proxy."] + #[doc = ""] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] + #[doc = ""] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] + #[doc = ""] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = ""] + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + kill_pure { + spawner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + index: ::core::primitive::u16, + #[codec(compact)] + height: ::core::primitive::u32, + #[codec(compact)] + ext_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = ""] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + announce { + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 7)] + #[doc = "Remove a given announcement."] + #[doc = ""] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + remove_announcement { + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 8)] + #[doc = "Remove the given announcement of a delegate."] + #[doc = ""] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + reject_announcement { + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 9)] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy_announced { + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + real: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::kitchensink_runtime::ProxyType, + >, + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "There are too many proxies registered or too many announcements pending."] + TooMany, + #[codec(index = 1)] + #[doc = "Proxy registration not found."] + NotFound, + #[codec(index = 2)] + #[doc = "Sender is not a proxy of the account to be proxied."] + NotProxy, + #[codec(index = 3)] + #[doc = "A call which is incompatible with the proxy type's filter was attempted."] + Unproxyable, + #[codec(index = 4)] + #[doc = "Account is already a proxy."] + Duplicate, + #[codec(index = 5)] + #[doc = "Call may not be made by proxy because it may escalate its privileges."] + NoPermission, + #[codec(index = 6)] + #[doc = "Announcement, if made at all, was made too recently."] + Unannounced, + #[codec(index = 7)] + #[doc = "Cannot add self as proxy."] + NoSelfProxy, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A proxy was executed correctly, with the given."] + ProxyExecuted { + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 1)] + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + PureCreated { + pure: ::subxt::utils::AccountId32, + who: ::subxt::utils::AccountId32, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + #[doc = "An announcement was placed to make a call in the future."] + Announced { + real: ::subxt::utils::AccountId32, + proxy: ::subxt::utils::AccountId32, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 3)] + #[doc = "A proxy was added."] + ProxyAdded { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A proxy was removed."] + ProxyRemoved { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_ranked_collective { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Introduce a new member."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of non-member which will become a member."] + #[doc = "- `rank`: The rank to give the new member."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + add_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Increment the rank of an existing member by one."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + promote_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] + #[doc = "then they are removed entirely."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] + demote_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + #[doc = "Remove the member entirely."] + #[doc = ""] + #[doc = "- `origin`: Must be the `AdminOrigin`."] + #[doc = "- `who`: Account of existing member of rank greater than zero."] + #[doc = "- `min_rank`: The rank of the member or greater."] + #[doc = ""] + #[doc = "Weight: `O(min_rank)`."] + remove_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + min_rank: ::core::primitive::u16, + }, + #[codec(index = 4)] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed` by a member account."] + #[doc = "- `poll`: Index of a poll which is ongoing."] + #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] + #[doc = ""] + #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = ""] + #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] + vote { + poll: ::core::primitive::u32, + aye: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Remove votes from the given poll. It must have ended."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed` by any account."] + #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] + #[doc = " exist."] + #[doc = "- `max`: Maximum number of vote items from remove in this call."] + #[doc = ""] + #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = ""] + #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] + cleanup_poll { + poll_index: ::core::primitive::u32, + max: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 already a member."] + AlreadyMember, + #[codec(index = 1)] + #[doc = "Account is not a member."] + NotMember, + #[codec(index = 2)] + #[doc = "The given poll index is unknown or has closed."] + NotPolling, + #[codec(index = 3)] + #[doc = "The given poll is still ongoing."] + Ongoing, + #[codec(index = 4)] + #[doc = "There are no further records to be removed."] + NoneRemaining, + #[codec(index = 5)] + #[doc = "Unexpected error in state."] + Corruption, + #[codec(index = 6)] + #[doc = "The member's rank is too low to vote."] + RankTooLow, + #[codec(index = 7)] + #[doc = "The information provided is incorrect."] + InvalidWitness, + #[codec(index = 8)] + #[doc = "The origin is not sufficiently privileged to do the operation."] + NoPermission, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 member `who` has been added."] + MemberAdded { who: ::subxt::utils::AccountId32 }, + #[codec(index = 1)] + #[doc = "The member `who`se rank has been changed to the given `rank`."] + RankChanged { + who: ::subxt::utils::AccountId32, + rank: ::core::primitive::u16, + }, + #[codec(index = 2)] + #[doc = "The member `who` of given `rank` has been removed from the collective."] + MemberRemoved { + who: ::subxt::utils::AccountId32, + rank: ::core::primitive::u16, + }, + #[codec(index = 3)] + #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] + #[doc = "`tally`."] + Voted { + who: ::subxt::utils::AccountId32, + poll: ::core::primitive::u32, + vote: runtime_types::pallet_ranked_collective::VoteRecord, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MemberRecord { + pub rank: ::core::primitive::u16, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally { + pub bare_ayes: ::core::primitive::u32, + pub ayes: ::core::primitive::u32, + pub nays: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VoteRecord { + #[codec(index = 0)] + Aye(::core::primitive::u32), + #[codec(index = 1)] + Nay(::core::primitive::u32), + } + } + pub mod pallet_recovery { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Send a call through a recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] + #[doc = "- `call`: The call you want to make with the recovered account."] + as_recovered { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] + #[doc = "for a lost account directly."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _ROOT_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The \"lost account\" to be recovered."] + #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] + set_recovered { + lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] + #[doc = ""] + #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] + #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] + #[doc = "in full when the user calls `remove_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] + #[doc = " ordered and contain no duplicate values."] + #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] + #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] + #[doc = " friends."] + #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] + #[doc = " needs to pass before the account can be recovered."] + create_recovery { + friends: ::std::vec::Vec<::subxt::utils::AccountId32>, + threshold: ::core::primitive::u16, + delay_period: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Initiate the process for recovering a recoverable account."] + #[doc = ""] + #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] + #[doc = "recovery process. This deposit will always be repatriated to the account"] + #[doc = "trying to be recovered. See `close_recovery`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] + #[doc = " recoverable (i.e. have a recovery configuration)."] + initiate_recovery { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] + #[doc = "process for that account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] + #[doc = "for the recoverable account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `lost`: The lost account that you want to recover."] + #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = ""] + #[doc = "The combination of these two parameters must point to an active recovery"] + #[doc = "process."] + vouch_recovery { + lost: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 5)] + #[doc = "Allow a successful rescuer to claim their recovered account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] + #[doc = "who has successfully completed the account recovery process: collected"] + #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] + #[doc = " you."] + claim_recovery { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 6)] + #[doc = "As the controller of a recoverable account, close an active recovery"] + #[doc = "process for your account."] + #[doc = ""] + #[doc = "Payment: By calling this function, the recoverable account will receive"] + #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account with an active recovery process for it."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] + close_recovery { + rescuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 7)] + #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] + #[doc = ""] + #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] + #[doc = "recovery attempts before calling this function else it will fail."] + #[doc = ""] + #[doc = "Payment: By calling this function the recoverable account will unreserve"] + #[doc = "their recovery configuration deposit."] + #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] + #[doc = "recoverable account (i.e. has a recovery configuration)."] + remove_recovery, + #[codec(index = 8)] + #[doc = "Cancel the ability to use `as_recovered` for `account`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] + #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] + cancel_recovered { + account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 = "User is not allowed to make a call on behalf of this account"] + NotAllowed, + #[codec(index = 1)] + #[doc = "Threshold must be greater than zero"] + ZeroThreshold, + #[codec(index = 2)] + #[doc = "Friends list must be greater than zero and threshold"] + NotEnoughFriends, + #[codec(index = 3)] + #[doc = "Friends list must be less than max friends"] + MaxFriends, + #[codec(index = 4)] + #[doc = "Friends list must be sorted and free of duplicates"] + NotSorted, + #[codec(index = 5)] + #[doc = "This account is not set up for recovery"] + NotRecoverable, + #[codec(index = 6)] + #[doc = "This account is already set up for recovery"] + AlreadyRecoverable, + #[codec(index = 7)] + #[doc = "A recovery process has already started for this account"] + AlreadyStarted, + #[codec(index = 8)] + #[doc = "A recovery process has not started for this rescuer"] + NotStarted, + #[codec(index = 9)] + #[doc = "This account is not a friend who can vouch"] + NotFriend, + #[codec(index = 10)] + #[doc = "The friend must wait until the delay period to vouch for this recovery"] + DelayPeriod, + #[codec(index = 11)] + #[doc = "This user has already vouched for this recovery"] + AlreadyVouched, + #[codec(index = 12)] + #[doc = "The threshold for recovering this account has not been met"] + Threshold, + #[codec(index = 13)] + #[doc = "There are still active recovery attempts that need to be closed"] + StillActive, + #[codec(index = 14)] + #[doc = "This account is already set up for recovery"] + AlreadyProxy, + #[codec(index = 15)] + #[doc = "Some internal state is broken."] + BadState, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Events type."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A recovery process has been set up for an account."] + RecoveryCreated { + account: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "A recovery process has been initiated for lost account by rescuer account."] + RecoveryInitiated { + lost_account: ::subxt::utils::AccountId32, + rescuer_account: ::subxt::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] + RecoveryVouched { + lost_account: ::subxt::utils::AccountId32, + rescuer_account: ::subxt::utils::AccountId32, + sender: ::subxt::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A recovery process for lost account by rescuer account has been closed."] + RecoveryClosed { + lost_account: ::subxt::utils::AccountId32, + rescuer_account: ::subxt::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "Lost account has been successfully recovered by rescuer account."] + AccountRecovered { + lost_account: ::subxt::utils::AccountId32, + rescuer_account: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "A recovery process has been removed for an account."] + RecoveryRemoved { + lost_account: ::subxt::utils::AccountId32, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ActiveRecovery<_0, _1, _2> { + pub created: _0, + pub deposit: _1, + pub friends: _2, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RecoveryConfig<_0, _1, _2> { + pub delay_period: _0, + pub deposit: _1, + pub friends: _2, + pub threshold: ::core::primitive::u16, + } + } + pub mod pallet_referenda { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a referendum on a privileged action."] + #[doc = ""] + #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] + #[doc = " available."] + #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] + #[doc = "- `proposal`: The proposal."] + #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] + #[doc = ""] + #[doc = "Emits `Submitted`."] + submit { + proposal_origin: ::std::boxed::Box< + runtime_types::kitchensink_runtime::OriginCaller, + >, + proposal: + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + enactment_moment: + runtime_types::frame_support::traits::schedule::DispatchTime< + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Post the Decision Deposit for a referendum."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] + #[doc = " referendum's track's Decision Deposit."] + #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] + #[doc = " posted."] + #[doc = ""] + #[doc = "Emits `DecisionDepositPlaced`."] + place_decision_deposit { index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `DecisionDepositRefunded`."] + refund_decision_deposit { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "Cancel an ongoing referendum."] + #[doc = ""] + #[doc = "- `origin`: must be the `CancelOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Cancelled`."] + cancel { index: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Cancel an ongoing referendum and slash the deposits."] + #[doc = ""] + #[doc = "- `origin`: must be the `KillOrigin`."] + #[doc = "- `index`: The index of the referendum to be cancelled."] + #[doc = ""] + #[doc = "Emits `Killed` and `DepositSlashed`."] + kill { index: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `index`: the referendum to be advanced."] + nudge_referendum { index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = ""] + #[doc = "- `origin`: must be `Root`."] + #[doc = "- `track`: the track to be advanced."] + #[doc = ""] + #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] + #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] + #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] + #[doc = "- decrement `DecidingCount`."] + one_fewer_deciding { track: ::core::primitive::u16 }, + #[codec(index = 7)] + #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = ""] + #[doc = "- `origin`: must be `Signed` or `Root`."] + #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] + #[doc = " refunded."] + #[doc = ""] + #[doc = "Emits `SubmissionDepositRefunded`."] + refund_submission_deposit { index: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Referendum is not ongoing."] + NotOngoing, + #[codec(index = 1)] + #[doc = "Referendum's decision deposit is already paid."] + HasDeposit, + #[codec(index = 2)] + #[doc = "The track identifier given was invalid."] + BadTrack, + #[codec(index = 3)] + #[doc = "There are already a full complement of referenda in progress for this track."] + Full, + #[codec(index = 4)] + #[doc = "The queue of the track is empty."] + QueueEmpty, + #[codec(index = 5)] + #[doc = "The referendum index provided is invalid in this context."] + BadReferendum, + #[codec(index = 6)] + #[doc = "There was nothing to do in the advancement."] + NothingToDo, + #[codec(index = 7)] + #[doc = "No track exists for the proposal origin."] + NoTrack, + #[codec(index = 8)] + #[doc = "Any deposit cannot be refunded until after the decision is over."] + Unfinished, + #[codec(index = 9)] + #[doc = "The deposit refunder is not the depositor."] + NoPermission, + #[codec(index = 10)] + #[doc = "The deposit cannot be refunded since none was made."] + NoDeposit, + #[codec(index = 11)] + #[doc = "The referendum status is invalid for this operation."] + BadStatus, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A referendum has been submitted."] + Submitted { + index: ::core::primitive::u32, + track: ::core::primitive::u16, + proposal: + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "The decision deposit has been placed."] + DecisionDepositPlaced { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "The decision deposit has been refunded."] + DecisionDepositRefunded { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A deposit has been slashaed."] + DepositSlashed { + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "A referendum has moved into the deciding phase."] + DecisionStarted { + index: ::core::primitive::u32, + track: ::core::primitive::u16, + proposal: + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 5)] + ConfirmStarted { index: ::core::primitive::u32 }, + #[codec(index = 6)] + ConfirmAborted { index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "A referendum has ended its confirmation phase and is ready for approval."] + Confirmed { + index: ::core::primitive::u32, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 8)] + #[doc = "A referendum has been approved and its proposal has been scheduled."] + Approved { index: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "A proposal has been rejected by referendum."] + Rejected { + index: ::core::primitive::u32, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 10)] + #[doc = "A referendum has been timed out without being decided."] + TimedOut { + index: ::core::primitive::u32, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 11)] + #[doc = "A referendum has been cancelled."] + Cancelled { + index: ::core::primitive::u32, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 12)] + #[doc = "A referendum has been killed."] + Killed { + index: ::core::primitive::u32, + tally: runtime_types::pallet_ranked_collective::Tally, + }, + #[codec(index = 13)] + #[doc = "The submission deposit has been refunded."] + SubmissionDepositRefunded { + index: ::core::primitive::u32, + who: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Curve { + #[codec(index = 0)] + LinearDecreasing { + length: runtime_types::sp_arithmetic::per_things::Perbill, + floor: runtime_types::sp_arithmetic::per_things::Perbill, + ceil: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 1)] + SteppedDecreasing { + begin: runtime_types::sp_arithmetic::per_things::Perbill, + end: runtime_types::sp_arithmetic::per_things::Perbill, + step: runtime_types::sp_arithmetic::per_things::Perbill, + period: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 2)] + Reciprocal { + factor: runtime_types::sp_arithmetic::fixed_point::FixedI64, + x_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, + y_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DecidingStatus<_0> { + pub since: _0, + pub confirming: ::core::option::Option<_0>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deposit<_0, _1> { + pub who: _0, + pub amount: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> { + #[codec(index = 0)] + Ongoing( + runtime_types::pallet_referenda::types::ReferendumStatus< + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + >, + ), + #[codec(index = 1)] + Approved( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 2)] + Rejected( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 3)] + Cancelled( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 4)] + TimedOut( + _2, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + ), + #[codec(index = 5)] + Killed(_2), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> { + pub track: _0, + pub origin: _1, + pub proposal: _3, + pub enactment: + runtime_types::frame_support::traits::schedule::DispatchTime<_2>, + pub submitted: _2, + pub submission_deposit: + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + pub decision_deposit: ::core::option::Option< + runtime_types::pallet_referenda::types::Deposit<_6, _4>, + >, + pub deciding: ::core::option::Option< + runtime_types::pallet_referenda::types::DecidingStatus<_2>, + >, + pub tally: _5, + pub in_queue: ::core::primitive::bool, + pub alarm: ::core::option::Option<(_2, _7)>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TrackInfo<_0, _1> { + pub name: ::std::string::String, + pub max_deciding: _1, + pub decision_deposit: _0, + pub prepare_period: _1, + pub decision_period: _1, + pub confirm_period: _1, + pub min_enactment_period: _1, + pub min_approval: runtime_types::pallet_referenda::types::Curve, + pub min_support: runtime_types::pallet_referenda::types::Curve, + } + } + } + pub mod pallet_remark { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Index and store data off chain."] + store { + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Attempting to store empty data."] + Empty, + #[codec(index = 1)] + #[doc = "Attempted to call `store` outside of block execution."] + BadContext, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Stored data off chain."] + Stored { + sender: ::subxt::utils::AccountId32, + content_hash: ::subxt::utils::H256, + }, + } + } + } + pub mod pallet_root_testing { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "A dispatch that will fill the block weight up to the given ratio."] + fill_block { + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + }, + } + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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::kitchensink_runtime::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, + Debug, + )] + #[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, + Debug, + )] + #[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_society { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "A user outside of the society can make a bid for entry."] + #[doc = ""] + #[doc = "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned"] + #[doc = "when the bid becomes a member, or if the bid calls `unbid`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `value`: A one time payment the bid would like to receive when joining the society."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)"] + #[doc = "- Storage Reads:"] + #[doc = "\t- One storage read to check for suspended candidate. O(1)"] + #[doc = "\t- One storage read to check for suspended member. O(1)"] + #[doc = "\t- One storage read to retrieve all current bids. O(B)"] + #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] + #[doc = "\t- One storage read to retrieve all members. O(M)"] + #[doc = "- Storage Writes:"] + #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] + #[doc = " w/ read)"] + #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] + #[doc = "- Notable Computation:"] + #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] + #[doc = "\t- O(log B) search to insert the new bid sorted."] + #[doc = "- External Pallet Operations:"] + #[doc = "\t- One balance reserve operation. O(X)"] + #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] + #[doc = "- Events:"] + #[doc = "\t- One event for new bid."] + #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] + #[doc = ""] + #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] + #[doc = "# "] + bid { value: ::core::primitive::u128 }, + #[codec(index = 1)] + #[doc = "A bidder can remove their bid for entry into society."] + #[doc = "By doing so, they will have their candidate deposit returned or"] + #[doc = "they will unvouch their voucher."] + #[doc = ""] + #[doc = "Payment: The bid deposit is unreserved if the user made a bid."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a bidder."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `pos`: Position in the `Bids` vector of the bid who wants to unbid."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), X (balance unreserve)"] + #[doc = "- One storage read and write to retrieve and update the bids. O(B)"] + #[doc = "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(B + X)"] + #[doc = "# "] + unbid { pos: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "As a member, vouch for someone to join society by placing a bid on their behalf."] + #[doc = ""] + #[doc = "There is no deposit required to vouch for a new bid, but a member can only vouch for"] + #[doc = "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by"] + #[doc = "the suspension judgement origin, the member will be banned from vouching again."] + #[doc = ""] + #[doc = "As a vouching member, you can claim a tip if the candidate is accepted. This tip will"] + #[doc = "be paid as a portion of the reward the member will receive for joining the society."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who`: The user who you would like to vouch for."] + #[doc = "- `value`: The total reward to be paid between you and the candidate if they become"] + #[doc = "a member in the society."] + #[doc = "- `tip`: Your cut of the total `value` payout when the candidate is inducted into"] + #[doc = "the society. Tips larger than `value` will be saturated upon payout."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), C (len of candidates), M (len of members)"] + #[doc = "- Storage Reads:"] + #[doc = "\t- One storage read to retrieve all members. O(M)"] + #[doc = "\t- One storage read to check member is not already vouching. O(1)"] + #[doc = "\t- One storage read to check for suspended candidate. O(1)"] + #[doc = "\t- One storage read to check for suspended member. O(1)"] + #[doc = "\t- One storage read to retrieve all current bids. O(B)"] + #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] + #[doc = "- Storage Writes:"] + #[doc = "\t- One storage write to insert vouching status to the member. O(1)"] + #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] + #[doc = " w/ read)"] + #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] + #[doc = "- Notable Computation:"] + #[doc = "\t- O(log M) search to check sender is a member."] + #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] + #[doc = "\t- O(log B) search to insert the new bid sorted."] + #[doc = "- External Pallet Operations:"] + #[doc = "\t- One balance reserve operation. O(X)"] + #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] + #[doc = "- Events:"] + #[doc = "\t- One event for vouch."] + #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] + #[doc = ""] + #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] + #[doc = "# "] + vouch { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + value: ::core::primitive::u128, + tip: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "As a vouching member, unvouch a bid. This only works while vouched user is"] + #[doc = "only a bidder (and not a candidate)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a vouching member."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `pos`: Position in the `Bids` vector of the bid who should be unvouched."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids)"] + #[doc = "- One storage read O(1) to check the signer is a vouching member."] + #[doc = "- One storage mutate to retrieve and update the bids. O(B)"] + #[doc = "- One vouching storage removal. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(B)"] + #[doc = "# "] + unvouch { pos: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "As a member, vote on a candidate."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `candidate`: The candidate that the member would like to bid on."] + #[doc = "- `approve`: A boolean which says if the candidate should be approved (`true`) or"] + #[doc = " rejected (`false`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: C (len of candidates), M (len of members)"] + #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] + #[doc = "- One account lookup."] + #[doc = "- One storage read O(C) and O(C) search to check that user is a candidate."] + #[doc = "- One storage write to add vote to votes. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + C)"] + #[doc = "# "] + vote { + candidate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + approve: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "As a member, vote on the defender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `approve`: A boolean which says if the candidate should be"] + #[doc = "approved (`true`) or rejected (`false`)."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Key: M (len of members)"] + #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] + #[doc = "- One storage write to add vote to votes. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM)"] + #[doc = "# "] + defender_vote { approve: ::core::primitive::bool }, + #[codec(index = 6)] + #[doc = "Transfer the first matured payout for the sender and remove it from the records."] + #[doc = ""] + #[doc = "NOTE: This extrinsic needs to be called multiple times to claim multiple matured"] + #[doc = "payouts."] + #[doc = ""] + #[doc = "Payment: The member will receive a payment equal to their first matured"] + #[doc = "payout to their free balance."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a member with"] + #[doc = "payouts remaining."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: M (len of members), P (number of payouts for a particular member)"] + #[doc = "- One storage read O(M) and O(log M) search to check signer is a member."] + #[doc = "- One storage read O(P) to get all payouts for a member."] + #[doc = "- One storage read O(1) to get the current block number."] + #[doc = "- One currency transfer call. O(X)"] + #[doc = "- One storage write or removal to update the member's payouts. O(P)"] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + P + X)"] + #[doc = "# "] + payout, + #[codec(index = 7)] + #[doc = "Found the society."] + #[doc = ""] + #[doc = "This is done as a discrete action in order to allow for the"] + #[doc = "pallet to be included into a running chain and can only be done once."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _FounderSetOrigin_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `founder` - The first member and head of the newly founded society."] + #[doc = "- `max_members` - The initial max number of members for the society."] + #[doc = "- `rules` - The rules of this society concerning membership."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Two storage mutates to set `Head` and `Founder`. O(1)"] + #[doc = "- One storage write to add the first member to society. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + found { + founder: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + max_members: ::core::primitive::u32, + rules: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 8)] + #[doc = "Annul the founding of the society."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be Signed, and the signing account must be both"] + #[doc = "the `Founder` and the `Head`. This implies that it may only be done when there is one"] + #[doc = "member."] + #[doc = ""] + #[doc = "# "] + #[doc = "- Two storage reads O(1)."] + #[doc = "- Four storage removals O(1)."] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + unfound, + #[codec(index = 9)] + #[doc = "Allow suspension judgement origin to make judgement on a suspended member."] + #[doc = ""] + #[doc = "If a suspended member is forgiven, we simply add them back as a member, not affecting"] + #[doc = "any of the existing storage items for that member."] + #[doc = ""] + #[doc = "If a suspended member is rejected, remove all associated storage items, including"] + #[doc = "their payouts, and remove any vouched bids they currently have."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who` - The suspended member to be judged."] + #[doc = "- `forgive` - A boolean representing whether the suspension judgement origin forgives"] + #[doc = " (`true`) or rejects (`false`) a suspended member."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), M (len of members)"] + #[doc = "- One storage read to check `who` is a suspended member. O(1)"] + #[doc = "- Up to one storage write O(M) with O(log M) binary search to add a member back to"] + #[doc = " society."] + #[doc = "- Up to 3 storage removals O(1) to clean up a removed member."] + #[doc = "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids."] + #[doc = "- Up to one additional event if unvouch takes place."] + #[doc = "- One storage removal. O(1)"] + #[doc = "- One event for the judgement."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + B)"] + #[doc = "# "] + judge_suspended_member { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + forgive: ::core::primitive::bool, + }, + #[codec(index = 10)] + #[doc = "Allow suspended judgement origin to make judgement on a suspended candidate."] + #[doc = ""] + #[doc = "If the judgement is `Approve`, we add them to society as a member with the appropriate"] + #[doc = "payment for joining society."] + #[doc = ""] + #[doc = "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back"] + #[doc = "to the society treasury, or we ban the voucher from vouching again."] + #[doc = ""] + #[doc = "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go"] + #[doc = "through the induction process again."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who` - The suspended candidate to be judged."] + #[doc = "- `judgement` - `Approve`, `Reject`, or `Rebid`."] + #[doc = ""] + #[doc = "# "] + #[doc = "Key: B (len of bids), M (len of members), X (balance action)"] + #[doc = "- One storage read to check `who` is a suspended candidate."] + #[doc = "- One storage removal of the suspended candidate."] + #[doc = "- Approve Logic"] + #[doc = "\t- One storage read to get the available pot to pay users with. O(1)"] + #[doc = "\t- One storage write to update the available pot. O(1)"] + #[doc = "\t- One storage read to get the current block number. O(1)"] + #[doc = "\t- One storage read to get all members. O(M)"] + #[doc = "\t- Up to one unreserve currency action."] + #[doc = "\t- Up to two new storage writes to payouts."] + #[doc = "\t- Up to one storage write with O(log M) binary search to add a member to society."] + #[doc = "- Reject Logic"] + #[doc = "\t- Up to one repatriate reserved currency action. O(X)"] + #[doc = "\t- Up to one storage write to ban the vouching member from vouching again."] + #[doc = "- Rebid Logic"] + #[doc = "\t- Storage mutate with O(log B) binary search to place the user back into bids."] + #[doc = "- Up to one additional event if unvouch takes place."] + #[doc = "- One storage removal."] + #[doc = "- One event for the judgement."] + #[doc = ""] + #[doc = "Total Complexity: O(M + logM + B + X)"] + #[doc = "# "] + judge_suspended_candidate { + who: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + judgement: runtime_types::pallet_society::Judgement, + }, + #[codec(index = 11)] + #[doc = "Allows root origin to change the maximum number of members in society."] + #[doc = "Max membership count must be greater than 1."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be from _ROOT_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `max` - The maximum number of members for the society."] + #[doc = ""] + #[doc = "# "] + #[doc = "- One storage write to update the max. O(1)"] + #[doc = "- One event."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = "# "] + set_max_members { max: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 incorrect position was provided."] + BadPosition, + #[codec(index = 1)] + #[doc = "User is not a member."] + NotMember, + #[codec(index = 2)] + #[doc = "User is already a member."] + AlreadyMember, + #[codec(index = 3)] + #[doc = "User is suspended."] + Suspended, + #[codec(index = 4)] + #[doc = "User is not suspended."] + NotSuspended, + #[codec(index = 5)] + #[doc = "Nothing to payout."] + NoPayout, + #[codec(index = 6)] + #[doc = "Society already founded."] + AlreadyFounded, + #[codec(index = 7)] + #[doc = "Not enough in pot to accept candidate."] + InsufficientPot, + #[codec(index = 8)] + #[doc = "Member is already vouching or banned from vouching again."] + AlreadyVouching, + #[codec(index = 9)] + #[doc = "Member is not vouching."] + NotVouching, + #[codec(index = 10)] + #[doc = "Cannot remove the head of the chain."] + Head, + #[codec(index = 11)] + #[doc = "Cannot remove the founder."] + Founder, + #[codec(index = 12)] + #[doc = "User has already made a bid."] + AlreadyBid, + #[codec(index = 13)] + #[doc = "User is already a candidate."] + AlreadyCandidate, + #[codec(index = 14)] + #[doc = "User is not a candidate."] + NotCandidate, + #[codec(index = 15)] + #[doc = "Too many members in the society."] + MaxMembers, + #[codec(index = 16)] + #[doc = "The caller is not the founder."] + NotFounder, + #[codec(index = 17)] + #[doc = "The caller is not the head."] + NotHead, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 society is founded by the given identity."] + Founded { + founder: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "A membership bid just happened. The given account is the candidate's ID and their offer"] + #[doc = "is the second."] + Bid { + candidate_id: ::subxt::utils::AccountId32, + offer: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A membership bid just happened by vouching. The given account is the candidate's ID and"] + #[doc = "their offer is the second. The vouching party is the third."] + Vouch { + candidate_id: ::subxt::utils::AccountId32, + offer: ::core::primitive::u128, + vouching: ::subxt::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A candidate was dropped (due to an excess of bids in the system)."] + AutoUnbid { + candidate: ::subxt::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "A candidate was dropped (by their request)."] + Unbid { + candidate: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "A candidate was dropped (by request of who vouched for them)."] + Unvouch { + candidate: ::subxt::utils::AccountId32, + }, + #[codec(index = 6)] + #[doc = "A group of candidates have been inducted. The batch's primary is the first value, the"] + #[doc = "batch in full is the second."] + Inducted { + primary: ::subxt::utils::AccountId32, + candidates: ::std::vec::Vec<::subxt::utils::AccountId32>, + }, + #[codec(index = 7)] + #[doc = "A suspended member has been judged."] + SuspendedMemberJudgement { + who: ::subxt::utils::AccountId32, + judged: ::core::primitive::bool, + }, + #[codec(index = 8)] + #[doc = "A candidate has been suspended"] + CandidateSuspended { + candidate: ::subxt::utils::AccountId32, + }, + #[codec(index = 9)] + #[doc = "A member has been suspended"] + MemberSuspended { member: ::subxt::utils::AccountId32 }, + #[codec(index = 10)] + #[doc = "A member has been challenged"] + Challenged { member: ::subxt::utils::AccountId32 }, + #[codec(index = 11)] + #[doc = "A vote has been placed"] + Vote { + candidate: ::subxt::utils::AccountId32, + voter: ::subxt::utils::AccountId32, + vote: ::core::primitive::bool, + }, + #[codec(index = 12)] + #[doc = "A vote has been placed for a defending member"] + DefenderVote { + voter: ::subxt::utils::AccountId32, + vote: ::core::primitive::bool, + }, + #[codec(index = 13)] + #[doc = "A new \\[max\\] member count has been set"] + NewMaxMembers { max: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "Society is unfounded."] + Unfounded { + founder: ::subxt::utils::AccountId32, + }, + #[codec(index = 15)] + #[doc = "Some funds were deposited into the society account."] + Deposit { value: ::core::primitive::u128 }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Bid<_0, _1> { + pub who: _0, + pub kind: runtime_types::pallet_society::BidKind<_0, _1>, + pub value: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BidKind<_0, _1> { + #[codec(index = 0)] + Deposit(_1), + #[codec(index = 1)] + Vouch(_0, _1), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Judgement { + #[codec(index = 0)] + Rebid, + #[codec(index = 1)] + Reject, + #[codec(index = 2)] + Approve, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Vote { + #[codec(index = 0)] + Skeptic, + #[codec(index = 1)] + Reject, + #[codec(index = 2)] + Approve, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VouchingStatus { + #[codec(index = 0)] + Vouching, + #[codec(index = 1)] + Banned, + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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 header { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::utils::H256, - #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::utils::H256, - pub extrinsics_root: ::subxt::utils::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, - } + } + pub mod slashing { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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< + runtime_types::pallet_staking::IndividualExposure<_0, _1>, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RewardDestination<_0> { + #[codec(index = 0)] + Staked, + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 pallet_state_trie_migration { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Control the automatic migration."] # [doc = ""] # [doc = "The dispatch origin of this call must be [`Config::ControlOrigin`]."] control_auto_migration { maybe_config : :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits > , } , # [codec (index = 1)] # [doc = "Continue the migration for the given `limits`."] # [doc = ""] # [doc = "The dispatch origin of this call can be any signed account."] # [doc = ""] # [doc = "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,"] # [doc = "Upon successful execution, the transaction fee is returned."] # [doc = ""] # [doc = "The (potentially over-estimated) of the byte length of all the data read must be"] # [doc = "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing"] # [doc = "that executing the current `MigrationTask` with the given `limits` will not exceed"] # [doc = "`real_size_upper` bytes of read data."] # [doc = ""] # [doc = "The `witness_task` is merely a helper to prevent the caller from being slashed or"] # [doc = "generally trigger a migration that they do not intend. This parameter is just a message"] # [doc = "from caller, saying that they believed `witness_task` was the last state of the"] # [doc = "migration, and they only wish for their transaction to do anything, if this assumption"] # [doc = "holds. In case `witness_task` does not match, the transaction fails."] # [doc = ""] # [doc = "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the"] # [doc = "recommended way of doing this is to pass a `limit` that only bounds `count`, as the"] # [doc = "`size` limit can always be overwritten."] continue_migrate { limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits , real_size_upper : :: core :: primitive :: u32 , witness_task : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationTask , } , # [codec (index = 2)] # [doc = "Migrate the list of top keys by iterating each of them one by one."] # [doc = ""] # [doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] # [doc = "should only be used in case any keys are leftover due to a bug."] migrate_custom_top { keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , witness_size : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Migrate the list of child keys by iterating each of them one by one."] # [doc = ""] # [doc = "All of the given child keys must be present under one `child_root`."] # [doc = ""] # [doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] # [doc = "should only be used in case any keys are leftover due to a bug."] migrate_custom_child { root : :: std :: vec :: Vec < :: core :: primitive :: u8 > , child_keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , total_size : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Set the maximum limit of the signed migration."] set_signed_max_limits { limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits , } , # [codec (index = 5)] # [doc = "Forcefully set the progress the running migration."] # [doc = ""] # [doc = "This is only useful in one case: the next key to migrate is too big to be migrated with"] # [doc = "a signed account, in a parachain context, and we simply want to skip it. A reasonable"] # [doc = "example of this would be `:code:`, which is both very expensive to migrate, and commonly"] # [doc = "used, so probably it is already migrated."] # [doc = ""] # [doc = "In case you mess things up, you can also, in principle, use this to reset the migration"] # [doc = "process."] force_set_progress { progress_top : runtime_types :: pallet_state_trie_migration :: pallet :: Progress , progress_child : runtime_types :: pallet_state_trie_migration :: pallet :: Progress , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Max signed limits not respected."] + MaxSignedLimits, + #[codec(index = 1)] + #[doc = "A key was longer than the configured maximum."] + #[doc = ""] + #[doc = "This means that the migration halted at the current [`Progress`] and"] + #[doc = "can be resumed with a larger [`crate::Config::MaxKeyLen`] value."] + #[doc = "Retrying with the same [`crate::Config::MaxKeyLen`] value will not work."] + #[doc = "The value should only be increased to avoid a storage migration for the currently"] + #[doc = "stored [`crate::Progress::LastKey`]."] + KeyTooLong, + #[codec(index = 2)] + #[doc = "submitter does not have enough funds."] + NotEnoughFunds, + #[codec(index = 3)] + #[doc = "Bad witness data provided."] + BadWitness, + #[codec(index = 4)] + #[doc = "Signed migration is not allowed because the maximum limit is not set yet."] + SignedMigrationNotAllowed, + #[codec(index = 5)] + #[doc = "Bad child root provided."] + BadChildRoot, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Inner events of this pallet."] + pub enum Event { + # [codec (index = 0)] # [doc = "Given number of `(top, child)` keys were migrated respectively, with the given"] # [doc = "`compute`."] Migrated { top : :: core :: primitive :: u32 , child : :: core :: primitive :: u32 , compute : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationCompute , } , # [codec (index = 1)] # [doc = "Some account got slashed by the given amount."] Slashed { who : :: subxt :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "The auto migration task finished."] AutoMigrationFinished , # [codec (index = 3)] # [doc = "Migration got halted due to an error or miss-configuration."] Halted { error : runtime_types :: pallet_state_trie_migration :: pallet :: Error , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MigrationCompute { + #[codec(index = 0)] + Signed, + #[codec(index = 1)] + Auto, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MigrationLimits { + pub size: ::core::primitive::u32, + pub item: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MigrationTask { + pub progress_top: + runtime_types::pallet_state_trie_migration::pallet::Progress, + pub progress_child: + runtime_types::pallet_state_trie_migration::pallet::Progress, + pub size: ::core::primitive::u32, + pub top_items: ::core::primitive::u32, + pub child_items: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Progress { + #[codec(index = 0)] + ToStart, + #[codec(index = 1)] + LastKey( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Complete, + } + } + } + pub mod pallet_sudo { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + 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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "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, + Debug, + )] + #[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 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The 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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpenTip<_0, _1, _2, _3> { + pub reason: _3, + pub who: _0, + pub finder: _0, + pub deposit: _1, + pub closes: ::core::option::Option<_2>, + pub tips: ::std::vec::Vec<(_0, _1)>, + pub finders_fee: ::core::primitive::bool, + } + } + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, + } + } + pub mod pallet_transaction_storage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Index and store data off chain. Minimum data size is 1 bytes, maximum is"] # [doc = "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`"] # [doc = "is called. # "] # [doc = "- n*log(n) of data size, as all data is pushed to an in-memory trie."] # [doc = "Additionally contains a DB write."] # [doc = "# "] store { data : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 1)] # [doc = "Renew previously stored data. Parameters are the block number that contains"] # [doc = "previous `store` or `renew` call and transaction index within that block."] # [doc = "Transaction index is emitted in the `Stored` or `Renewed` event."] # [doc = "Applies same fees as `store`."] # [doc = "# "] # [doc = "- Constant."] # [doc = "# "] renew { block : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , } , # [codec (index = 2)] # [doc = "Check storage proof for block number `block_number() - StoragePeriod`."] # [doc = "If such block does not exist the proof is expected to be `None`."] # [doc = "# "] # [doc = "- Linear w.r.t the number of indexed transactions in the proved block for random"] # [doc = " probing."] # [doc = "There's a DB read for each transaction."] # [doc = "Here we assume a maximum of 100 probed transactions."] # [doc = "# "] check_proof { proof : runtime_types :: sp_transaction_storage_proof :: TransactionStorageProof , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Insufficient account balance."] + InsufficientFunds, + #[codec(index = 1)] + #[doc = "Invalid configuration."] + NotConfigured, + #[codec(index = 2)] + #[doc = "Renewed extrinsic is not found."] + RenewedNotFound, + #[codec(index = 3)] + #[doc = "Attempting to store empty transaction"] + EmptyTransaction, + #[codec(index = 4)] + #[doc = "Proof was not expected in this block."] + UnexpectedProof, + #[codec(index = 5)] + #[doc = "Proof failed verification."] + InvalidProof, + #[codec(index = 6)] + #[doc = "Missing storage proof."] + MissingProof, + #[codec(index = 7)] + #[doc = "Unable to verify proof becasue state data is missing."] + MissingStateData, + #[codec(index = 8)] + #[doc = "Double proof check in the block."] + DoubleCheck, + #[codec(index = 9)] + #[doc = "Storage proof was not checked in the block."] + ProofNotChecked, + #[codec(index = 10)] + #[doc = "Transaction is too large."] + TransactionTooLarge, + #[codec(index = 11)] + #[doc = "Too many transactions in the block."] + TooManyTransactions, + #[codec(index = 12)] + #[doc = "Attempted to call `store` outside of block execution."] + BadContext, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Stored data under specified index."] + Stored { index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "Renewed data under specified index."] + Renewed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Storage proof was successfully checked."] + ProofChecked, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransactionInfo { + pub chunk_root: ::subxt::utils::H256, + pub content_hash: ::subxt::utils::H256, + pub size: ::core::primitive::u32, + pub block_chunks: ::core::primitive::u32, + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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 mod pallet_uniques { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Issue a new collection of non-fungible items from a public origin."] + #[doc = ""] + #[doc = "This new collection has no items initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "`ItemDeposit` funds of sender are reserved."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `collection`: The identifier of the new collection. This must not be currently in use."] + #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] + #[doc = "member of the collection's admin team."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + create { + collection: ::core::primitive::u32, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Issue a new collection of non-fungible items from a privileged origin."] + #[doc = ""] + #[doc = "This new collection has no items initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the new item. This must not be currently in use."] + #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] + #[doc = " permissions"] + #[doc = "over this item, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_create { + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + free_holding: ::core::primitive::bool, + }, + #[codec(index = 2)] + #[doc = "Destroy a collection of fungible items."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] + #[doc = "owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to be destroyed."] + #[doc = "- `witness`: Information on the items minted in the collection. This must be"] + #[doc = "correct."] + #[doc = ""] + #[doc = "Emits `Destroyed` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(n + m)` where:"] + #[doc = "- `n = witness.items`"] + #[doc = "- `m = witness.item_metadatas`"] + #[doc = "- `a = witness.attributes`"] + destroy { + collection: ::core::primitive::u32, + witness: runtime_types::pallet_uniques::types::DestroyWitness, + }, + #[codec(index = 3)] + #[doc = "Mint an item of a particular collection."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be minted."] + #[doc = "- `item`: The item value of the item to be minted."] + #[doc = "- `beneficiary`: The initial owner of the minted item."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + mint { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Destroy a single item."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be burned."] + #[doc = "- `item`: The item of the item to be burned."] + #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] + #[doc = " item is owned by this value."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: `check_owner.is_some()`."] + burn { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + check_owner: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 5)] + #[doc = "Move an item from the sender account to another."] + #[doc = ""] + #[doc = "This resets the approved account of the item."] + #[doc = ""] + #[doc = "Origin must be Signed and the signing account must be either:"] + #[doc = "- the Admin of the `collection`;"] + #[doc = "- the Owner of the `item`;"] + #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item to be transferred."] + #[doc = "- `item`: The item of the item to be transferred."] + #[doc = "- `dest`: The account to receive ownership of the item."] + #[doc = ""] + #[doc = "Emits `Transferred`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + dest: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 6)] + #[doc = "Reevaluate the deposits on some items."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be frozen."] + #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] + #[doc = ""] + #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] + #[doc = "in the case that the owner account does not have reservable funds to pay for a"] + #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] + #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] + #[doc = "so it's of little consequence."] + #[doc = ""] + #[doc = "It will still return an error in the case that the collection is unknown of the signer"] + #[doc = "is not permitted to call it."] + #[doc = ""] + #[doc = "Weight: `O(items.len())`"] + redeposit { + collection: ::core::primitive::u32, + items: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 7)] + #[doc = "Disallow further unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be frozen."] + #[doc = "- `item`: The item of the item to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Re-allow unprivileged transfer of an item."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be thawed."] + #[doc = "- `item`: The item of the item to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 9)] + #[doc = "Disallow further unprivileged transfers for a whole collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be frozen."] + #[doc = ""] + #[doc = "Emits `CollectionFrozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze_collection { collection: ::core::primitive::u32 }, + #[codec(index = 10)] + #[doc = "Re-allow unprivileged transfers for a whole collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection to be thawed."] + #[doc = ""] + #[doc = "Emits `CollectionThawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw_collection { collection: ::core::primitive::u32 }, + #[codec(index = 11)] + #[doc = "Change the Owner of a collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose owner should be changed."] + #[doc = "- `owner`: The new Owner of this collection. They must have called"] + #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer_ownership { + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 12)] + #[doc = "Change the Issuer, Admin and Freezer of a collection."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] + #[doc = ""] + #[doc = "- `collection`: The collection whose team should be changed."] + #[doc = "- `issuer`: The new Issuer of this collection."] + #[doc = "- `admin`: The new Admin of this collection."] + #[doc = "- `freezer`: The new Freezer of this collection."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_team { + collection: ::core::primitive::u32, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 13)] + #[doc = "Approve an item to be transferred by a delegated third-party account."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be"] + #[doc = "either the owner of the `item` or the admin of the collection."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] + #[doc = "- `item`: The item of the item to be approved for delegated transfer."] + #[doc = "- `delegate`: The account to delegate permission to transfer the item."] + #[doc = ""] + #[doc = "Important NOTE: The `approved` account gets reset after each transfer."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + approve_transfer { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Cancel the prior approval for the transfer of an item by a delegate."] + #[doc = ""] + #[doc = "Origin must be either:"] + #[doc = "- the `Force` origin;"] + #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] + #[doc = "- `Signed` with the signer being the Owner of the `item`;"] + #[doc = ""] + #[doc = "Arguments:"] + #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] + #[doc = "- `item`: The item of the item of whose approval will be cancelled."] + #[doc = "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to"] + #[doc = " which permission of transfer is delegated."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + cancel_approval { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + maybe_check_delegate: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 15)] + #[doc = "Alter the attributes of a given item."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the item."] + #[doc = "- `owner`: The new Owner of this item."] + #[doc = "- `issuer`: The new Issuer of this item."] + #[doc = "- `admin`: The new Admin of this item."] + #[doc = "- `freezer`: The new Freezer of this item."] + #[doc = "- `free_holding`: Whether a deposit is taken for holding an item of this collection."] + #[doc = "- `is_frozen`: Whether this collection is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `ItemStatusChanged` with the identity of the item."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_item_status { + collection: ::core::primitive::u32, + owner: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + issuer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + free_holding: ::core::primitive::bool, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 16)] + #[doc = "Set an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] + #[doc = "- `key`: The key of the attribute."] + #[doc = "- `value`: The value to which to set the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_attribute { + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 17)] + #[doc = "Clear an attribute for a collection or item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] + #[doc = "- `key`: The key of the attribute."] + #[doc = ""] + #[doc = "Emits `AttributeCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + clear_attribute { + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 18)] + #[doc = "Set the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`collection`."] + #[doc = ""] + #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] + #[doc = "- `item`: The identifier of the item whose metadata to set."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_metadata { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 19)] + #[doc = "Clear the metadata for an item."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] + #[doc = "`item`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] + #[doc = "- `item`: The identifier of the item whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + clear_metadata { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 20)] + #[doc = "Set the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the item whose metadata to update."] + #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] + #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_collection_metadata { + collection: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 21)] + #[doc = "Clear the metadata for a collection."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "Any deposit is freed for the collection's owner."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] + #[doc = ""] + #[doc = "Emits `CollectionMetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + clear_collection_metadata { collection: ::core::primitive::u32 }, + #[codec(index = 22)] + #[doc = "Set (or reset) the acceptance of ownership for a particular account."] + #[doc = ""] + #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] + #[doc = "provider reference."] + #[doc = ""] + #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] + #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] + #[doc = " ownership transferal."] + #[doc = ""] + #[doc = "Emits `OwnershipAcceptanceChanged`."] + set_accept_ownership { + maybe_collection: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 23)] + #[doc = "Set the maximum amount of items a collection could have."] + #[doc = ""] + #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] + #[doc = "the `collection`."] + #[doc = ""] + #[doc = "Note: This function can only succeed once per collection."] + #[doc = ""] + #[doc = "- `collection`: The identifier of the collection to change."] + #[doc = "- `max_supply`: The maximum amount of items a collection could have."] + #[doc = ""] + #[doc = "Emits `CollectionMaxSupplySet` event when successful."] + set_collection_max_supply { + collection: ::core::primitive::u32, + max_supply: ::core::primitive::u32, + }, + #[codec(index = 24)] + #[doc = "Set (or reset) the price for an item."] + #[doc = ""] + #[doc = "Origin must be Signed and must be the owner of the asset `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item to set the price for."] + #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] + #[doc = "- `buyer`: Restricts the buy operation to a specific account."] + #[doc = ""] + #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] + #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] + set_price { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + price: ::core::option::Option<::core::primitive::u128>, + whitelisted_buyer: ::core::option::Option< + ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 25)] + #[doc = "Allows to buy an item if it's up for sale."] + #[doc = ""] + #[doc = "Origin must be Signed and must not be the owner of the `item`."] + #[doc = ""] + #[doc = "- `collection`: The collection of the item."] + #[doc = "- `item`: The item the sender wants to buy."] + #[doc = "- `bid_price`: The price the sender is willing to pay."] + #[doc = ""] + #[doc = "Emits `ItemBought` on success."] + buy_item { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + bid_price: ::core::primitive::u128, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\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 signing account has no permission to do the operation."] + NoPermission, + #[codec(index = 1)] + #[doc = "The given item ID is unknown."] + UnknownCollection, + #[codec(index = 2)] + #[doc = "The item ID has already been used for an item."] + AlreadyExists, + #[codec(index = 3)] + #[doc = "The owner turned out to be different to what was expected."] + WrongOwner, + #[codec(index = 4)] + #[doc = "Invalid witness data given."] + BadWitness, + #[codec(index = 5)] + #[doc = "The item ID is already taken."] + InUse, + #[codec(index = 6)] + #[doc = "The item or collection is frozen."] + Frozen, + #[codec(index = 7)] + #[doc = "The delegate turned out to be different to what was expected."] + WrongDelegate, + #[codec(index = 8)] + #[doc = "There is no delegate approved."] + NoDelegate, + #[codec(index = 9)] + #[doc = "No approval exists that would allow the transfer."] + Unapproved, + #[codec(index = 10)] + #[doc = "The named owner has not signed ownership of the collection is acceptable."] + Unaccepted, + #[codec(index = 11)] + #[doc = "The item is locked."] + Locked, + #[codec(index = 12)] + #[doc = "All items have been minted."] + MaxSupplyReached, + #[codec(index = 13)] + #[doc = "The max supply has already been set."] + MaxSupplyAlreadySet, + #[codec(index = 14)] + #[doc = "The provided max supply is less to the amount of items a collection already has."] + MaxSupplyTooSmall, + #[codec(index = 15)] + #[doc = "The given item ID is unknown."] + UnknownItem, + #[codec(index = 16)] + #[doc = "Item is not for sale."] + NotForSale, + #[codec(index = 17)] + #[doc = "The provided bid is too low."] + BidTooLow, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 `collection` was created."] + Created { + collection: ::core::primitive::u32, + creator: ::subxt::utils::AccountId32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "A `collection` was force-created."] + ForceCreated { + collection: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "A `collection` was destroyed."] + Destroyed { collection: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "An `item` was issued."] + Issued { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "An `item` was transferred."] + Transferred { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + from: ::subxt::utils::AccountId32, + to: ::subxt::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "An `item` was destroyed."] + Burned { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 6)] + #[doc = "Some `item` was frozen."] + Frozen { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "Some `item` was thawed."] + Thawed { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Some `collection` was frozen."] + CollectionFrozen { collection: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "Some `collection` was thawed."] + CollectionThawed { collection: ::core::primitive::u32 }, + #[codec(index = 10)] + #[doc = "The owner changed."] + OwnerChanged { + collection: ::core::primitive::u32, + new_owner: ::subxt::utils::AccountId32, + }, + #[codec(index = 11)] + #[doc = "The management team changed."] + TeamChanged { + collection: ::core::primitive::u32, + issuer: ::subxt::utils::AccountId32, + admin: ::subxt::utils::AccountId32, + freezer: ::subxt::utils::AccountId32, + }, + #[codec(index = 12)] + #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] + #[doc = "a `delegate`."] + ApprovedTransfer { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + delegate: ::subxt::utils::AccountId32, + }, + #[codec(index = 13)] + #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] + #[doc = "`collection` was cancelled by its `owner`."] + ApprovalCancelled { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + owner: ::subxt::utils::AccountId32, + delegate: ::subxt::utils::AccountId32, + }, + #[codec(index = 14)] + #[doc = "A `collection` has had its attributes changed by the `Force` origin."] + ItemStatusChanged { collection: ::core::primitive::u32 }, + #[codec(index = 15)] + #[doc = "New metadata has been set for a `collection`."] + CollectionMetadataSet { + collection: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 16)] + #[doc = "Metadata has been cleared for a `collection`."] + CollectionMetadataCleared { collection: ::core::primitive::u32 }, + #[codec(index = 17)] + #[doc = "New metadata has been set for an item."] + MetadataSet { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 18)] + #[doc = "Metadata has been cleared for an item."] + MetadataCleared { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 19)] + #[doc = "Metadata has been cleared for an item."] + Redeposited { + collection: ::core::primitive::u32, + successful_items: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 20)] + #[doc = "New attribute metadata has been set for a `collection` or `item`."] + AttributeSet { + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 21)] + #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] + AttributeCleared { + collection: ::core::primitive::u32, + maybe_item: ::core::option::Option<::core::primitive::u32>, + key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 22)] + #[doc = "Ownership acceptance has changed for an account."] + OwnershipAcceptanceChanged { + who: ::subxt::utils::AccountId32, + maybe_collection: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 23)] + #[doc = "Max supply has been set for a collection."] + CollectionMaxSupplySet { + collection: ::core::primitive::u32, + max_supply: ::core::primitive::u32, + }, + #[codec(index = 24)] + #[doc = "The price was set for the instance."] + ItemPriceSet { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + price: ::core::primitive::u128, + whitelisted_buyer: + ::core::option::Option<::subxt::utils::AccountId32>, + }, + #[codec(index = 25)] + #[doc = "The price for the instance was removed."] + ItemPriceRemoved { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + }, + #[codec(index = 26)] + #[doc = "An item was bought."] + ItemBought { + collection: ::core::primitive::u32, + item: ::core::primitive::u32, + price: ::core::primitive::u128, + seller: ::subxt::utils::AccountId32, + buyer: ::subxt::utils::AccountId32, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CollectionDetails<_0, _1> { + pub owner: _0, + pub issuer: _0, + pub admin: _0, + pub freezer: _0, + pub total_deposit: _1, + pub free_holding: ::core::primitive::bool, + pub items: ::core::primitive::u32, + pub item_metadatas: ::core::primitive::u32, + pub attributes: ::core::primitive::u32, + pub is_frozen: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CollectionMetadata<_0> { + pub deposit: _0, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DestroyWitness { + #[codec(compact)] + pub items: ::core::primitive::u32, + #[codec(compact)] + pub item_metadatas: ::core::primitive::u32, + #[codec(compact)] + pub attributes: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemDetails<_0, _1> { + pub owner: _0, + pub approved: ::core::option::Option<_0>, + pub is_frozen: ::core::primitive::bool, + pub deposit: _1, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ItemMetadata<_0> { + pub deposit: _0, + pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub is_frozen: ::core::primitive::bool, + } + } + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::OriginCaller, + >, + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + #[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< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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 mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 2 Reads, 2 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = "# "] + vest, + #[codec(index = 1)] + #[doc = "Unlock any vested funds of a `target` account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] + #[doc = "# "] + vest_other { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Create a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = "# "] + vested_transfer { + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 4 Reads, 4 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = "# "] + force_vested_transfer { + source: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + target: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the vesting pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The account given is not vesting."] + NotVesting, + #[codec(index = 1)] + #[doc = "The account already has `MaxVestingSchedules` count of schedules and thus"] + #[doc = "cannot add another one. Consider merging existing schedules in order to add another."] + AtMaxVestingSchedules, + #[codec(index = 2)] + #[doc = "Amount being transferred is too low to create a vesting schedule."] + AmountLow, + #[codec(index = 3)] + #[doc = "An index was out of bounds of the vesting schedules."] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + #[doc = "Failed to create a new schedule because some parameter was invalid."] + InvalidScheduleParams, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + VestingUpdated { + account: ::subxt::utils::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "An \\[account\\] has become fully vested."] + VestingCompleted { + account: ::subxt::utils::AccountId32, + }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod pallet_whitelist { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + whitelist_call { call_hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + remove_whitelisted_call { call_hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + dispatch_whitelisted_call { + call_hash: ::subxt::utils::H256, + call_encoded_len: ::core::primitive::u32, + call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 3)] + dispatch_whitelisted_call_with_preimage { + call: ::std::boxed::Box< + runtime_types::kitchensink_runtime::RuntimeCall, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The preimage of the call hash could not be loaded."] + UnavailablePreImage, + #[codec(index = 1)] + #[doc = "The call could not be decoded."] + UndecodableCall, + #[codec(index = 2)] + #[doc = "The weight of the decoded call was higher than the witness."] + InvalidCallWeightWitness, + #[codec(index = 3)] + #[doc = "The call was not whitelisted."] + CallIsNotWhitelisted, + #[codec(index = 4)] + #[doc = "The call was already whitelisted; No-Op."] + CallAlreadyWhitelisted, } - pub mod unchecked_extrinsic { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub enum Event { + #[codec(index = 0)] + CallWhitelisted { call_hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + WhitelistedCallRemoved { call_hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + WhitelistedCallDispatched { + call_hash: ::subxt::utils::H256, + result: ::core::result::Result< + runtime_types::frame_support::dispatch::PostDispatchInfo, + runtime_types::sp_runtime::DispatchErrorWithPostInfo< + runtime_types::frame_support::dispatch::PostDispatchInfo, + >, + >, + }, } } - pub mod traits { + } + pub mod sp_arithmetic { + use super::runtime_types; + pub mod fixed_point { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -44554,7 +57657,76 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlakeTwo256; + pub struct FixedI64(pub ::core::primitive::i64); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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 :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Perquintill(pub ::core::primitive::u64); } #[derive( :: subxt :: ext :: codec :: Decode, @@ -44573,151 +57745,10 @@ pub mod api { #[codec(index = 2)] DivisionByZero, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module(runtime_types::sp_runtime::ModuleError), - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - TooManyConsumers, - #[codec(index = 7)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 8)] - Arithmetic(runtime_types::sp_runtime::ArithmeticError), - #[codec(index = 9)] - Transactional(runtime_types::sp_runtime::TransactionalError), - #[codec(index = 10)] - Exhausted, - #[codec(index = 11)] - Corruption, - #[codec(index = 12)] - Unavailable, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiSigner { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Public), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Public), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Public), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TokenError { - #[codec(index = 0)] - NoFunds, - #[codec(index = 1)] - WouldDie, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, - } - } - pub mod sp_session { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub validator_count: ::core::primitive::u32, - } } - pub mod sp_staking { + pub mod sp_authority_discovery { use super::runtime_types; - pub mod offence { + pub mod app { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -44728,40 +57759,25 @@ pub mod api { )] #[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 struct Public(pub runtime_types::sp_core::sr25519::Public); } } - pub mod sp_version { + pub mod sp_consensus_babe { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: ::std::vec::Vec<( - [::core::primitive::u8; 8usize], - ::core::primitive::u32, - )>, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); } - } - pub mod sp_weights { - use super::runtime_types; - pub mod weight_v2 { + pub mod digests { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -44772,15 +57788,69 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Weight { - #[codec(compact)] - pub ref_time: ::core::primitive::u64, - #[codec(compact)] - pub proof_size: ::core::primitive::u64, + pub enum 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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 :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -44789,7 +57859,14 @@ pub mod api { )] #[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); + pub enum AllowedSlots { + #[codec(index = 0)] + PrimarySlots, + #[codec(index = 1)] + PrimaryAndSecondaryPlainSlots, + #[codec(index = 2)] + PrimaryAndSecondaryVRFSlots, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -44799,31 +57876,45 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, + pub struct BabeEpochConfiguration { + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, } } - pub mod xcm { + pub mod sp_consensus_slots { use super::runtime_types; - pub mod double_encoded { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DoubleEncoded { - pub encoded: ::std::vec::Vec<::core::primitive::u8>, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub offender: _1, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub first_header: _0, + pub second_header: _0, } - pub mod v0 { + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Slot(pub ::core::primitive::u64); + } + pub mod sp_core { + use super::runtime_types; + pub mod bounded { use super::runtime_types; - pub mod junction { + pub mod bounded_btree_map { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -44834,131 +57925,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyId { - # [codec (index = 0)] Unit , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Index (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 3)] Executive , # [codec (index = 4)] Technical , # [codec (index = 5)] Legislative , # [codec (index = 6)] Judicial , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BodyPart { - #[codec(index = 0)] - Voice, - #[codec(index = 1)] - Members { - #[codec(compact)] - count: ::core::primitive::u32, - }, - #[codec(index = 2)] - Fraction { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 3)] - AtLeastProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - #[codec(index = 4)] - MoreThanProportion { - #[codec(compact)] - nom: ::core::primitive::u32, - #[codec(compact)] - denom: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { - # [codec (index = 0)] Parent , # [codec (index = 1)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 2)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 3)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 4)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 5)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 6)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 7)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 8)] OnlyChild , # [codec (index = 9)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum NetworkId { - # [codec (index = 0)] Any , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Polkadot , # [codec (index = 3)] Kusama , } + pub struct BoundedBTreeMap<_0, _1>( + pub ::subxt::utils::KeyedVec<_0, _1>, + ); } - pub mod multi_asset { + pub mod bounded_btree_set { use super::runtime_types; #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiAsset { - #[codec(index = 0)] - None, - #[codec(index = 1)] - All, - #[codec(index = 2)] - AllFungible, - #[codec(index = 3)] - AllNonFungible, - #[codec(index = 4)] - AllAbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 5)] - AllAbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 6)] - AllConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 7)] - AllConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 8)] - AbstractFungible { - id: ::std::vec::Vec<::core::primitive::u8>, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - AbstractNonFungible { - class: ::std::vec::Vec<::core::primitive::u8>, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, - }, - #[codec(index = 10)] - ConcreteFungible { - id: runtime_types::xcm::v0::multi_location::MultiLocation, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 11)] - ConcreteNonFungible { - class: runtime_types::xcm::v0::multi_location::MultiLocation, - instance: runtime_types::xcm::v1::multiasset::AssetInstance, - }, - } + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BoundedBTreeSet<_0>(pub ::std::vec::Vec<_0>); } - pub mod multi_location { + pub mod bounded_vec { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -44969,70 +57953,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiLocation { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - X1(runtime_types::xcm::v0::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 6)] - X6( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - runtime_types::xcm::v0::junction::Junction, - ), - } + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); } - pub mod order { + pub mod weak_bounded_vec { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -45043,72 +57966,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Order { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - DepositAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 2)] - DepositReserveAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 3)] - ExchangeAsset { - give: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - receive: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - }, - #[codec(index = 4)] - InitiateReserveWithdraw { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - reserve: - runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 5)] - InitiateTeleport { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - }, - #[codec(index = 7)] - BuyExecution { - fees: runtime_types::xcm::v0::multi_asset::MultiAsset, - weight: ::core::primitive::u64, - debt: ::core::primitive::u64, - halt_on_error: ::core::primitive::bool, - xcm: ::std::vec::Vec, - }, - } + 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, @@ -45118,16 +57980,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum OriginKind { - #[codec(index = 0)] - Native, - #[codec(index = 1)] - SovereignAccount, - #[codec(index = 2)] - Superuser, - #[codec(index = 3)] - Xcm, - } + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + pub mod ecdsa { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45137,12 +57993,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Assets( - ::std::vec::Vec, - ), - } + pub struct Signature(pub [::core::primitive::u8; 65usize]); + } + pub mod ed25519 { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45152,102 +58006,192 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Xcm { - #[codec(index = 0)] - WithdrawAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, - #[codec(index = 1)] - ReserveAssetDeposit { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, - #[codec(index = 2)] - TeleportAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - effects: ::std::vec::Vec, - }, - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v0::Response, - }, - #[codec(index = 4)] - TransferAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: ::std::vec::Vec< - runtime_types::xcm::v0::multi_asset::MultiAsset, - >, - dest: runtime_types::xcm::v0::multi_location::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - RelayedFrom { - who: runtime_types::xcm::v0::multi_location::MultiLocation, - message: ::std::boxed::Box, - }, - } + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 v1 { + pub mod offchain { use super::runtime_types; - pub mod junction { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junction { - # [codec (index = 0)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 1)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 2)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 3)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 4)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 5)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 6)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 7)] OnlyChild , # [codec (index = 8)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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< + runtime_types::sp_core::offchain::OpaqueMultiaddr, + >, } - pub mod multiasset { + } + pub mod sr25519 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Void {} + } + pub mod sp_finality_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::ed25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_finality_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_finality_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_finality_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_finality_grandpa::app::Signature, + >, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub set_id: ::core::primitive::u64, + pub equivocation: + runtime_types::sp_finality_grandpa::Equivocation<_0, _1>, + } + } + pub mod sp_npos_elections { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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 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, @@ -45258,130 +58202,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetId { - #[codec(index = 0)] - Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), - #[codec(index = 1)] - Abstract(::std::vec::Vec<::core::primitive::u8>), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetInstance { - #[codec(index = 0)] - Undefined, - #[codec(index = 1)] - Index(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 2)] - Array4([::core::primitive::u8; 4usize]), - #[codec(index = 3)] - Array8([::core::primitive::u8; 8usize]), - #[codec(index = 4)] - Array16([::core::primitive::u8; 16usize]), - #[codec(index = 5)] - Array32([::core::primitive::u8; 32usize]), - #[codec(index = 6)] - Blob(::std::vec::Vec<::core::primitive::u8>), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Fungibility { - #[codec(index = 0)] - Fungible(#[codec(compact)] ::core::primitive::u128), - #[codec(index = 1)] - NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAsset { - pub id: runtime_types::xcm::v1::multiasset::AssetId, - pub fun: runtime_types::xcm::v1::multiasset::Fungibility, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiAssetFilter { - #[codec(index = 0)] - Definite(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiAssets( - pub ::std::vec::Vec< - runtime_types::xcm::v1::multiasset::MultiAsset, + pub struct Digest { + pub logs: ::std::vec::Vec< + runtime_types::sp_runtime::generic::digest::DigestItem, >, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildFungibility { - #[codec(index = 0)] - Fungible, - #[codec(index = 1)] - NonFungible, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WildMultiAsset { - #[codec(index = 0)] - All, - #[codec(index = 1)] - AllOf { - id: runtime_types::xcm::v1::multiasset::AssetId, - fun: runtime_types::xcm::v1::multiasset::WildFungibility, - }, } - } - pub mod multilocation { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45391,252 +58216,29 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Junctions { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - X1(runtime_types::xcm::v1::junction::Junction), - #[codec(index = 2)] - X2( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 3)] - X3( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 4)] - X4( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 5)] - X5( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), + pub enum DigestItem { #[codec(index = 6)] - X6( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 7)] - X7( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - ), - #[codec(index = 8)] - X8( - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, - runtime_types::xcm::v1::junction::Junction, + PreRuntime( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, ), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MultiLocation { - pub parents: ::core::primitive::u8, - pub interior: runtime_types::xcm::v1::multilocation::Junctions, - } - } - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Order { - #[codec(index = 0)] - Noop, - #[codec(index = 1)] - DepositAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - beneficiary: - runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 2)] - DepositReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 3)] - ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, - }, #[codec(index = 4)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 5)] - InitiateTeleport { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: - ::std::vec::Vec, - }, - #[codec(index = 6)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - }, - #[codec(index = 7)] - BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight: ::core::primitive::u64, - debt: ::core::primitive::u64, - halt_on_error: ::core::primitive::bool, - instructions: ::std::vec::Vec, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - Version(::core::primitive::u32), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Xcm { - #[codec(index = 0)] - WithdrawAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 1)] - ReserveAssetDeposited { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 2)] - ReceiveTeleportedAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - effects: ::std::vec::Vec, - }, - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v1::Response, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - effects: ::std::vec::Vec, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - RelayedFrom { - who: runtime_types::xcm::v1::multilocation::Junctions, - message: ::std::boxed::Box, - }, - #[codec(index = 11)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 12)] - UnsubscribeVersion, + 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 v2 { - use super::runtime_types; - pub mod traits { + pub mod era { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -45647,60 +58249,545 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Error { + pub enum Era { #[codec(index = 0)] - Overflow, + Immortal, #[codec(index = 1)] - Unimplemented, + Mortal1(::core::primitive::u8), #[codec(index = 2)] - UntrustedReserveLocation, + Mortal2(::core::primitive::u8), #[codec(index = 3)] - UntrustedTeleportLocation, + Mortal3(::core::primitive::u8), #[codec(index = 4)] - MultiLocationFull, + Mortal4(::core::primitive::u8), #[codec(index = 5)] - MultiLocationNotInvertible, + Mortal5(::core::primitive::u8), #[codec(index = 6)] - BadOrigin, + Mortal6(::core::primitive::u8), #[codec(index = 7)] - InvalidLocation, + Mortal7(::core::primitive::u8), #[codec(index = 8)] - AssetNotFound, + Mortal8(::core::primitive::u8), #[codec(index = 9)] - FailedToTransactAsset, + Mortal9(::core::primitive::u8), #[codec(index = 10)] - NotWithdrawable, + Mortal10(::core::primitive::u8), #[codec(index = 11)] - LocationCannotHold, + Mortal11(::core::primitive::u8), #[codec(index = 12)] - ExceedsMaxMessageSize, + Mortal12(::core::primitive::u8), #[codec(index = 13)] - DestinationUnsupported, + Mortal13(::core::primitive::u8), #[codec(index = 14)] - Transport, + Mortal14(::core::primitive::u8), #[codec(index = 15)] - Unroutable, + Mortal15(::core::primitive::u8), #[codec(index = 16)] - UnknownClaim, + Mortal16(::core::primitive::u8), #[codec(index = 17)] - FailedToDecode, + Mortal17(::core::primitive::u8), #[codec(index = 18)] - MaxWeightInvalid, + Mortal18(::core::primitive::u8), #[codec(index = 19)] - NotHoldingFees, + Mortal19(::core::primitive::u8), #[codec(index = 20)] - TooExpensive, + Mortal20(::core::primitive::u8), #[codec(index = 21)] - Trap(::core::primitive::u64), + Mortal21(::core::primitive::u8), #[codec(index = 22)] - UnhandledXcmVersion, + Mortal22(::core::primitive::u8), #[codec(index = 23)] - WeightLimitReached(::core::primitive::u64), + Mortal23(::core::primitive::u8), #[codec(index = 24)] - Barrier, + Mortal24(::core::primitive::u8), #[codec(index = 25)] - WeightNotComputable, + 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 header { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::utils::H256, + pub extrinsics_root: ::subxt::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, } + } + pub mod unchecked_extrinsic { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45710,209 +58797,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Outcome { - #[codec(index = 0)] - Complete(::core::primitive::u64), - #[codec(index = 1)] - Incomplete( - ::core::primitive::u64, - runtime_types::xcm::v2::traits::Error, - ), - #[codec(index = 2)] - Error(runtime_types::xcm::v2::traits::Error), - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Instruction { - #[codec(index = 0)] - WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 1)] - ReserveAssetDeposited( - runtime_types::xcm::v1::multiasset::MultiAssets, - ), - #[codec(index = 2)] - ReceiveTeleportedAsset( - runtime_types::xcm::v1::multiasset::MultiAssets, - ), - #[codec(index = 3)] - QueryResponse { - #[codec(compact)] - query_id: ::core::primitive::u64, - response: runtime_types::xcm::v2::Response, - #[codec(compact)] - max_weight: ::core::primitive::u64, - }, - #[codec(index = 4)] - TransferAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 5)] - TransferReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 6)] - Transact { - origin_type: runtime_types::xcm::v0::OriginKind, - #[codec(compact)] - require_weight_at_most: ::core::primitive::u64, - call: runtime_types::xcm::double_encoded::DoubleEncoded, - }, - #[codec(index = 7)] - HrmpNewChannelOpenRequest { - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - max_message_size: ::core::primitive::u32, - #[codec(compact)] - max_capacity: ::core::primitive::u32, - }, - #[codec(index = 8)] - HrmpChannelAccepted { - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 9)] - HrmpChannelClosing { - #[codec(compact)] - initiator: ::core::primitive::u32, - #[codec(compact)] - sender: ::core::primitive::u32, - #[codec(compact)] - recipient: ::core::primitive::u32, - }, - #[codec(index = 10)] - ClearOrigin, - #[codec(index = 11)] - DescendOrigin(runtime_types::xcm::v1::multilocation::Junctions), - #[codec(index = 12)] - ReportError { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 13)] - DepositAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 14)] - DepositReserveAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_assets: ::core::primitive::u32, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 15)] - ExchangeAsset { - give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - receive: runtime_types::xcm::v1::multiasset::MultiAssets, - }, - #[codec(index = 16)] - InitiateReserveWithdraw { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - reserve: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 17)] - InitiateTeleport { - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - xcm: runtime_types::xcm::v2::Xcm, - }, - #[codec(index = 18)] - QueryHolding { - #[codec(compact)] - query_id: ::core::primitive::u64, - dest: runtime_types::xcm::v1::multilocation::MultiLocation, - assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 19)] - BuyExecution { - fees: runtime_types::xcm::v1::multiasset::MultiAsset, - weight_limit: runtime_types::xcm::v2::WeightLimit, - }, - #[codec(index = 20)] - RefundSurplus, - #[codec(index = 21)] - SetErrorHandler(runtime_types::xcm::v2::Xcm), - #[codec(index = 22)] - SetAppendix(runtime_types::xcm::v2::Xcm), - #[codec(index = 23)] - ClearError, - #[codec(index = 24)] - ClaimAsset { - assets: runtime_types::xcm::v1::multiasset::MultiAssets, - ticket: runtime_types::xcm::v1::multilocation::MultiLocation, - }, - #[codec(index = 25)] - Trap(#[codec(compact)] ::core::primitive::u64), - #[codec(index = 26)] - SubscribeVersion { - #[codec(compact)] - query_id: ::core::primitive::u64, - #[codec(compact)] - max_response_weight: ::core::primitive::u64, - }, - #[codec(index = 27)] - UnsubscribeVersion, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Response { - #[codec(index = 0)] - Null, - #[codec(index = 1)] - Assets(runtime_types::xcm::v1::multiasset::MultiAssets), - #[codec(index = 2)] - ExecutionResult( - ::core::option::Option<( - ::core::primitive::u32, - runtime_types::xcm::v2::traits::Error, - )>, - ), - #[codec(index = 3)] - Version(::core::primitive::u32), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum WeightLimit { - #[codec(index = 0)] - Unlimited, - #[codec(index = 1)] - Limited(#[codec(compact)] ::core::primitive::u64), + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + ); } + } + pub mod traits { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -45922,7 +58814,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Xcm(pub ::std::vec::Vec); + pub struct BlakeTwo256; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45933,11 +58825,59 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedMultiAssets { + pub enum DispatchError { #[codec(index = 0)] - V0(::std::vec::Vec), + Other, #[codec(index = 1)] - V1(runtime_types::xcm::v1::multiasset::MultiAssets), + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DispatchErrorWithPostInfo<_0> { + pub post_info: _0, + pub error: runtime_types::sp_runtime::DispatchError, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, @@ -45948,11 +58888,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedMultiLocation { + pub enum MultiSignature { #[codec(index = 0)] - V0(runtime_types::xcm::v0::multi_location::MultiLocation), + Ed25519(runtime_types::sp_core::ed25519::Signature), #[codec(index = 1)] - V1(runtime_types::xcm::v1::multilocation::MultiLocation), + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45963,13 +58905,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedResponse { + pub enum TokenError { #[codec(index = 0)] - V0(runtime_types::xcm::v0::Response), + NoFunds, #[codec(index = 1)] - V1(runtime_types::xcm::v1::Response), + WouldDie, #[codec(index = 2)] - V2(runtime_types::xcm::v2::Response), + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -45980,13 +58930,133 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VersionedXcm { + pub enum TransactionalError { #[codec(index = 0)] - V0(runtime_types::xcm::v0::Xcm), + LimitReached, #[codec(index = 1)] - V1(runtime_types::xcm::v1::Xcm), - #[codec(index = 2)] - V2(runtime_types::xcm::v2::Xcm), + NoLayer, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub validator_count: ::core::primitive::u32, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_transaction_storage_proof { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct TransactionStorageProof { + pub chunk: ::std::vec::Vec<::core::primitive::u8>, + pub proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + } + } + pub mod sp_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: ::std::vec::Vec<( + [::core::primitive::u8; 8usize], + ::core::primitive::u32, + )>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod sp_weights { + use super::runtime_types; + pub mod weight_v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OldWeight(pub ::core::primitive::u64); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } } } @@ -46007,8 +59077,8 @@ pub mod api { pub fn system(&self) -> system::constants::ConstantsApi { system::constants::ConstantsApi } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi } pub fn babe(&self) -> babe::constants::ConstantsApi { babe::constants::ConstantsApi @@ -46016,6 +59086,9 @@ pub mod api { 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 } @@ -46027,38 +59100,46 @@ pub mod api { ) -> transaction_payment::constants::ConstantsApi { transaction_payment::constants::ConstantsApi } - pub fn authorship(&self) -> authorship::constants::ConstantsApi { - authorship::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 contracts(&self) -> contracts::constants::ConstantsApi { + contracts::constants::ConstantsApi + } pub fn im_online(&self) -> im_online::constants::ConstantsApi { im_online::constants::ConstantsApi } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { - phragmen_election::constants::ConstantsApi + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi } - pub fn treasury(&self) -> treasury::constants::ConstantsApi { - treasury::constants::ConstantsApi + pub fn society(&self) -> society::constants::ConstantsApi { + society::constants::ConstantsApi } - pub fn claims(&self) -> claims::constants::ConstantsApi { - claims::constants::ConstantsApi + pub fn recovery(&self) -> recovery::constants::ConstantsApi { + recovery::constants::ConstantsApi } pub fn vesting(&self) -> vesting::constants::ConstantsApi { vesting::constants::ConstantsApi } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi } pub fn proxy(&self) -> proxy::constants::ConstantsApi { proxy::constants::ConstantsApi @@ -46069,37 +59150,55 @@ pub mod api { pub fn bounties(&self) -> bounties::constants::ConstantsApi { bounties::constants::ConstantsApi } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi - } pub fn tips(&self) -> tips::constants::ConstantsApi { tips::constants::ConstantsApi } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi + pub fn assets(&self) -> assets::constants::ConstantsApi { + assets::constants::ConstantsApi + } + pub fn lottery(&self) -> lottery::constants::ConstantsApi { + lottery::constants::ConstantsApi + } + pub fn nis(&self) -> nis::constants::ConstantsApi { + nis::constants::ConstantsApi + } + pub fn uniques(&self) -> uniques::constants::ConstantsApi { + uniques::constants::ConstantsApi + } + pub fn nfts(&self) -> nfts::constants::ConstantsApi { + nfts::constants::ConstantsApi } pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { voter_list::constants::ConstantsApi } - pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { - nomination_pools::constants::ConstantsApi + pub fn state_trie_migration( + &self, + ) -> state_trie_migration::constants::ConstantsApi { + state_trie_migration::constants::ConstantsApi } - pub fn paras(&self) -> paras::constants::ConstantsApi { - paras::constants::ConstantsApi + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi + } + pub fn referenda(&self) -> referenda::constants::ConstantsApi { + referenda::constants::ConstantsApi + } + pub fn conviction_voting(&self) -> conviction_voting::constants::ConstantsApi { + conviction_voting::constants::ConstantsApi } - pub fn registrar(&self) -> registrar::constants::ConstantsApi { - registrar::constants::ConstantsApi + pub fn alliance(&self) -> alliance::constants::ConstantsApi { + alliance::constants::ConstantsApi } - pub fn slots(&self) -> slots::constants::ConstantsApi { - slots::constants::ConstantsApi + pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { + nomination_pools::constants::ConstantsApi } - pub fn auctions(&self) -> auctions::constants::ConstantsApi { - auctions::constants::ConstantsApi + pub fn ranked_polls(&self) -> ranked_polls::constants::ConstantsApi { + ranked_polls::constants::ConstantsApi } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { - crowdloan::constants::ConstantsApi + pub fn fast_unstake(&self) -> fast_unstake::constants::ConstantsApi { + fast_unstake::constants::ConstantsApi + } + pub fn message_queue(&self) -> message_queue::constants::ConstantsApi { + message_queue::constants::ConstantsApi } } pub struct StorageApi; @@ -46107,18 +59206,15 @@ pub mod api { pub fn system(&self) -> system::storage::StorageApi { system::storage::StorageApi } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi - } pub fn babe(&self) -> babe::storage::StorageApi { babe::storage::StorageApi } pub fn timestamp(&self) -> timestamp::storage::StorageApi { timestamp::storage::StorageApi } + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi + } pub fn indices(&self) -> indices::storage::StorageApi { indices::storage::StorageApi } @@ -46128,24 +59224,17 @@ pub mod api { pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { transaction_payment::storage::StorageApi } - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi + pub fn 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 offences(&self) -> offences::storage::StorageApi { - offences::storage::StorageApi - } pub fn session(&self) -> session::storage::StorageApi { session::storage::StorageApi } - pub fn grandpa(&self) -> grandpa::storage::StorageApi { - grandpa::storage::StorageApi - } - pub fn im_online(&self) -> im_online::storage::StorageApi { - im_online::storage::StorageApi - } pub fn democracy(&self) -> democracy::storage::StorageApi { democracy::storage::StorageApi } @@ -46155,24 +59244,56 @@ pub mod api { pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { technical_committee::storage::StorageApi } - pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { - phragmen_election::storage::StorageApi + pub fn 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 claims(&self) -> claims::storage::StorageApi { - claims::storage::StorageApi + pub fn contracts(&self) -> contracts::storage::StorageApi { + contracts::storage::StorageApi } - pub fn vesting(&self) -> vesting::storage::StorageApi { - vesting::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 randomness_collective_flip( + &self, + ) -> randomness_collective_flip::storage::StorageApi { + randomness_collective_flip::storage::StorageApi } pub fn identity(&self) -> identity::storage::StorageApi { identity::storage::StorageApi } + pub fn society(&self) -> society::storage::StorageApi { + society::storage::StorageApi + } + pub fn recovery(&self) -> recovery::storage::StorageApi { + recovery::storage::StorageApi + } + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi + } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } pub fn proxy(&self) -> proxy::storage::StorageApi { proxy::storage::StorageApi } @@ -46182,76 +59303,68 @@ pub mod api { pub fn bounties(&self) -> bounties::storage::StorageApi { bounties::storage::StorageApi } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { - child_bounties::storage::StorageApi - } pub fn tips(&self) -> tips::storage::StorageApi { tips::storage::StorageApi } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::storage::StorageApi { - election_provider_multi_phase::storage::StorageApi - } - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi + pub fn assets(&self) -> assets::storage::StorageApi { + assets::storage::StorageApi } - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi + pub fn mmr(&self) -> mmr::storage::StorageApi { + mmr::storage::StorageApi } - pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { - fast_unstake::storage::StorageApi + pub fn lottery(&self) -> lottery::storage::StorageApi { + lottery::storage::StorageApi } - pub fn configuration(&self) -> configuration::storage::StorageApi { - configuration::storage::StorageApi + pub fn nis(&self) -> nis::storage::StorageApi { + nis::storage::StorageApi } - pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { - paras_shared::storage::StorageApi + pub fn uniques(&self) -> uniques::storage::StorageApi { + uniques::storage::StorageApi } - pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { - para_inclusion::storage::StorageApi + pub fn nfts(&self) -> nfts::storage::StorageApi { + nfts::storage::StorageApi } - pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { - para_inherent::storage::StorageApi + pub fn transaction_storage(&self) -> transaction_storage::storage::StorageApi { + transaction_storage::storage::StorageApi } - pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { - para_scheduler::storage::StorageApi + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi } - pub fn paras(&self) -> paras::storage::StorageApi { - paras::storage::StorageApi + pub fn state_trie_migration(&self) -> state_trie_migration::storage::StorageApi { + state_trie_migration::storage::StorageApi } - pub fn initializer(&self) -> initializer::storage::StorageApi { - initializer::storage::StorageApi + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi } - pub fn dmp(&self) -> dmp::storage::StorageApi { - dmp::storage::StorageApi + pub fn referenda(&self) -> referenda::storage::StorageApi { + referenda::storage::StorageApi } - pub fn ump(&self) -> ump::storage::StorageApi { - ump::storage::StorageApi + pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { + conviction_voting::storage::StorageApi } - pub fn hrmp(&self) -> hrmp::storage::StorageApi { - hrmp::storage::StorageApi + pub fn whitelist(&self) -> whitelist::storage::StorageApi { + whitelist::storage::StorageApi } - pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { - para_session_info::storage::StorageApi + pub fn alliance_motion(&self) -> alliance_motion::storage::StorageApi { + alliance_motion::storage::StorageApi } - pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { - paras_disputes::storage::StorageApi + pub fn alliance(&self) -> alliance::storage::StorageApi { + alliance::storage::StorageApi } - pub fn registrar(&self) -> registrar::storage::StorageApi { - registrar::storage::StorageApi + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi } - pub fn slots(&self) -> slots::storage::StorageApi { - slots::storage::StorageApi + pub fn ranked_polls(&self) -> ranked_polls::storage::StorageApi { + ranked_polls::storage::StorageApi } - pub fn auctions(&self) -> auctions::storage::StorageApi { - auctions::storage::StorageApi + pub fn ranked_collective(&self) -> ranked_collective::storage::StorageApi { + ranked_collective::storage::StorageApi } - pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { - crowdloan::storage::StorageApi + pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { + fast_unstake::storage::StorageApi } - pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { - xcm_pallet::storage::StorageApi + pub fn message_queue(&self) -> message_queue::storage::StorageApi { + message_queue::storage::StorageApi } } pub struct TransactionApi; @@ -46259,11 +59372,8 @@ pub mod api { pub fn system(&self) -> system::calls::TransactionApi { system::calls::TransactionApi } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi - } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi } pub fn babe(&self) -> babe::calls::TransactionApi { babe::calls::TransactionApi @@ -46271,14 +59381,19 @@ pub mod api { 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 } - pub fn authorship(&self) -> authorship::calls::TransactionApi { - authorship::calls::TransactionApi + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi } pub fn staking(&self) -> staking::calls::TransactionApi { staking::calls::TransactionApi @@ -46286,12 +59401,6 @@ pub mod api { pub fn session(&self) -> session::calls::TransactionApi { session::calls::TransactionApi } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { - grandpa::calls::TransactionApi - } - pub fn im_online(&self) -> im_online::calls::TransactionApi { - im_online::calls::TransactionApi - } pub fn democracy(&self) -> democracy::calls::TransactionApi { democracy::calls::TransactionApi } @@ -46301,29 +59410,47 @@ pub mod api { pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { technical_committee::calls::TransactionApi } - pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { - phragmen_election::calls::TransactionApi + pub fn 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 claims(&self) -> claims::calls::TransactionApi { - claims::calls::TransactionApi + pub fn contracts(&self) -> contracts::calls::TransactionApi { + contracts::calls::TransactionApi } - pub fn vesting(&self) -> vesting::calls::TransactionApi { - vesting::calls::TransactionApi + pub fn sudo(&self) -> sudo::calls::TransactionApi { + sudo::calls::TransactionApi } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi } pub fn identity(&self) -> identity::calls::TransactionApi { identity::calls::TransactionApi } + pub fn society(&self) -> society::calls::TransactionApi { + society::calls::TransactionApi + } + pub fn recovery(&self) -> recovery::calls::TransactionApi { + recovery::calls::TransactionApi + } + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi + } + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } pub fn proxy(&self) -> proxy::calls::TransactionApi { proxy::calls::TransactionApi } @@ -46333,70 +59460,73 @@ pub mod api { pub fn bounties(&self) -> bounties::calls::TransactionApi { bounties::calls::TransactionApi } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { - child_bounties::calls::TransactionApi - } pub fn tips(&self) -> tips::calls::TransactionApi { tips::calls::TransactionApi } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi + pub fn assets(&self) -> assets::calls::TransactionApi { + assets::calls::TransactionApi } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi + pub fn lottery(&self) -> lottery::calls::TransactionApi { + lottery::calls::TransactionApi } - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi + pub fn nis(&self) -> nis::calls::TransactionApi { + nis::calls::TransactionApi } - pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { - fast_unstake::calls::TransactionApi + pub fn uniques(&self) -> uniques::calls::TransactionApi { + uniques::calls::TransactionApi + } + pub fn nfts(&self) -> nfts::calls::TransactionApi { + nfts::calls::TransactionApi } - pub fn configuration(&self) -> configuration::calls::TransactionApi { - configuration::calls::TransactionApi + pub fn transaction_storage(&self) -> transaction_storage::calls::TransactionApi { + transaction_storage::calls::TransactionApi + } + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { - paras_shared::calls::TransactionApi + pub fn state_trie_migration( + &self, + ) -> state_trie_migration::calls::TransactionApi { + state_trie_migration::calls::TransactionApi } - pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { - para_inclusion::calls::TransactionApi + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { - para_inherent::calls::TransactionApi + pub fn referenda(&self) -> referenda::calls::TransactionApi { + referenda::calls::TransactionApi } - pub fn paras(&self) -> paras::calls::TransactionApi { - paras::calls::TransactionApi + pub fn remark(&self) -> remark::calls::TransactionApi { + remark::calls::TransactionApi } - pub fn initializer(&self) -> initializer::calls::TransactionApi { - initializer::calls::TransactionApi + pub fn root_testing(&self) -> root_testing::calls::TransactionApi { + root_testing::calls::TransactionApi } - pub fn dmp(&self) -> dmp::calls::TransactionApi { - dmp::calls::TransactionApi + pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { + conviction_voting::calls::TransactionApi } - pub fn ump(&self) -> ump::calls::TransactionApi { - ump::calls::TransactionApi + pub fn whitelist(&self) -> whitelist::calls::TransactionApi { + whitelist::calls::TransactionApi } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi { - hrmp::calls::TransactionApi + pub fn alliance_motion(&self) -> alliance_motion::calls::TransactionApi { + alliance_motion::calls::TransactionApi } - pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { - paras_disputes::calls::TransactionApi + pub fn alliance(&self) -> alliance::calls::TransactionApi { + alliance::calls::TransactionApi } - pub fn registrar(&self) -> registrar::calls::TransactionApi { - registrar::calls::TransactionApi + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi } - pub fn slots(&self) -> slots::calls::TransactionApi { - slots::calls::TransactionApi + pub fn ranked_polls(&self) -> ranked_polls::calls::TransactionApi { + ranked_polls::calls::TransactionApi } - pub fn auctions(&self) -> auctions::calls::TransactionApi { - auctions::calls::TransactionApi + pub fn ranked_collective(&self) -> ranked_collective::calls::TransactionApi { + ranked_collective::calls::TransactionApi } - pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { - crowdloan::calls::TransactionApi + pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { + fast_unstake::calls::TransactionApi } - pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { - xcm_pallet::calls::TransactionApi + pub fn message_queue(&self) -> message_queue::calls::TransactionApi { + message_queue::calls::TransactionApi } } #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] @@ -46406,9 +59536,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 252u8, 179u8, 170u8, 129u8, 159u8, 95u8, 180u8, 114u8, 218u8, 56u8, 91u8, - 93u8, 175u8, 45u8, 57u8, 223u8, 178u8, 209u8, 250u8, 247u8, 243u8, 73u8, - 182u8, 137u8, 176u8, 129u8, 37u8, 196u8, 133u8, 123u8, 93u8, 186u8, + 193u8, 113u8, 159u8, 161u8, 239u8, 4u8, 102u8, 7u8, 158u8, 5u8, 51u8, + 187u8, 64u8, 226u8, 128u8, 79u8, 3u8, 98u8, 47u8, 32u8, 176u8, 208u8, + 191u8, 20u8, 152u8, 173u8, 239u8, 103u8, 222u8, 135u8, 161u8, 141u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) From 083d271e5bbf0ad3eca6680a887d13e44093b37b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 24 Feb 2023 11:35:21 +0000 Subject: [PATCH 08/31] static event decoding and tx encoding to use DecodeAsFields/EncodeAsFields --- subxt/src/constants/constant_address.rs | 6 +- subxt/src/constants/constants_client.rs | 7 ++- subxt/src/dynamic.rs | 9 ++- subxt/src/error.rs | 2 +- subxt/src/events/events_type.rs | 44 ++++++++++---- subxt/src/events/mod.rs | 8 +-- subxt/src/metadata/decode_encode_traits.rs | 4 +- subxt/src/metadata/metadata_type.rs | 68 +++++++++++----------- subxt/src/metadata/mod.rs | 1 - subxt/src/storage/storage_address.rs | 2 +- subxt/src/storage/storage_type.rs | 15 ++--- subxt/src/tx/tx_payload.rs | 11 +++- 12 files changed, 103 insertions(+), 74 deletions(-) diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index f2cb9f0740..cb3cdbdfa7 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -2,8 +2,10 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use crate::dynamic::DecodedValueThunk; -use crate::metadata::DecodeWithMetadata; +use crate::{ + dynamic::DecodedValueThunk, + metadata::DecodeWithMetadata, +}; use std::borrow::Cow; /// This represents a constant address. Anything implementing this trait diff --git a/subxt/src/constants/constants_client.rs b/subxt/src/constants/constants_client.rs index bb4ebe99ed..0df7ffd6a6 100644 --- a/subxt/src/constants/constants_client.rs +++ b/subxt/src/constants/constants_client.rs @@ -6,7 +6,10 @@ use super::ConstantAddress; use crate::{ client::OfflineClientT, error::Error, - metadata::{MetadataError, DecodeWithMetadata}, + metadata::{ + DecodeWithMetadata, + MetadataError, + }, Config, }; use derivative::Derivative; @@ -72,7 +75,7 @@ impl> ConstantsClient { let value = ::decode_with_metadata( &mut &*constant.value, constant.ty.id(), - &metadata + &metadata, )?; Ok(value) } diff --git a/subxt/src/dynamic.rs b/subxt/src/dynamic.rs index 1ef9a35a4e..01a036b1fa 100644 --- a/subxt/src/dynamic.rs +++ b/subxt/src/dynamic.rs @@ -5,8 +5,13 @@ //! This module provides the entry points to create dynamic //! transactions, storage and constant lookups. -use crate::error::Error; -use crate::metadata::{ Metadata, DecodeWithMetadata }; +use crate::{ + error::Error, + metadata::{ + DecodeWithMetadata, + Metadata, + }, +}; use scale_decode::DecodeAsType; pub use scale_value::Value; diff --git a/subxt/src/error.rs b/subxt/src/error.rs index 35a8982995..227c0835cd 100644 --- a/subxt/src/error.rs +++ b/subxt/src/error.rs @@ -15,8 +15,8 @@ pub use crate::metadata::{ InvalidMetadataError, MetadataError, }; -pub use scale_encode::Error as EncodeError; pub use scale_decode::Error as DecodeError; +pub use scale_encode::Error as EncodeError; /// The underlying error enum, generic over the type held by the `Runtime` /// variant. Prefer to use the [`Error`] and [`Error`] aliases over diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index e56dff2f22..54798dc307 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -13,8 +13,8 @@ use crate::{ error::Error, events::events_client::get_event_bytes, metadata::{ - EventMetadata, DecodeWithMetadata, + EventMetadata, }, Config, Metadata, @@ -256,7 +256,8 @@ impl EventDetails { field_metadata.ty().id(), &metadata.runtime_metadata().types, scale_decode::visitor::IgnoreVisitor, - ).map_err(scale_decode::Error::from)?; + ) + .map_err(scale_decode::Error::from)?; } // the end of the field bytes. @@ -361,7 +362,8 @@ impl EventDetails { bytes, field_metadata.ty().id(), &self.metadata.runtime_metadata().types, - ).map_err(scale_decode::Error::from)?; + ) + .map_err(scale_decode::Error::from)?; event_values.push(value); } @@ -373,7 +375,8 @@ impl EventDetails { bytes, field_metadata.ty().id(), &self.metadata.runtime_metadata().types, - ).map_err(scale_decode::Error::from)?; + ) + .map_err(scale_decode::Error::from)?; event_values .push((field_metadata.name().cloned().unwrap_or_default(), value)); } @@ -389,7 +392,11 @@ impl EventDetails { pub fn as_event(&self) -> Result, Error> { let ev_metadata = self.event_metadata(); if ev_metadata.pallet() == E::PALLET && ev_metadata.event() == E::EVENT { - let decoded = E::decode_as_fields(&mut self.field_bytes(), ev_metadata.fields(), self.metadata.types())?; + let decoded = E::decode_as_fields( + &mut self.field_bytes(), + ev_metadata.fields(), + self.metadata.types(), + )?; Ok(Some(decoded)) } else { Ok(None) @@ -401,14 +408,17 @@ impl EventDetails { /// type for this is exposed via static codegen as a root level `Event` type. pub fn as_root_event(&self) -> Result { let pallet = self.metadata.pallet(self.pallet_name())?; - let event_ty = pallet.event_ty_id().ok_or_else(|| - Error::Metadata(crate::metadata::MetadataError::EventNotFound(pallet.index(), self.variant_index())) - )?; + let event_ty = pallet.event_ty_id().ok_or_else(|| { + Error::Metadata(crate::metadata::MetadataError::EventNotFound( + pallet.index(), + self.variant_index(), + )) + })?; let decoded = E::decode_with_metadata( &mut &self.all_bytes[self.event_start_idx..self.event_fields_end_idx], event_ty, - &self.metadata + &self.metadata, )?; Ok(decoded) } @@ -439,7 +449,17 @@ pub(crate) mod test_utils { use std::convert::TryFrom; /// An "outer" events enum containing exactly one event. - #[derive(Encode, Decode, TypeInfo, Clone, Debug, PartialEq, Eq, scale_encode::EncodeAsType, scale_decode::DecodeAsType)] + #[derive( + Encode, + Decode, + TypeInfo, + Clone, + Debug, + PartialEq, + Eq, + scale_encode::EncodeAsType, + scale_decode::DecodeAsType, + )] pub enum AllEvents { Test(Ev), } @@ -601,7 +621,9 @@ mod tests { #[test] fn statically_decode_single_root_event() { - #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo, scale_decode::DecodeAsType)] + #[derive( + Clone, Debug, PartialEq, Decode, Encode, TypeInfo, scale_decode::DecodeAsType, + )] enum Event { A(u8, bool, Vec), } diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index aba92d0a53..219bddc5b1 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -9,16 +9,16 @@ mod events_client; mod events_type; +use codec::{ + Decode, + Encode, +}; pub use events_client::EventsClient; pub use events_type::{ EventDetails, Events, }; use scale_decode::DecodeAsFields; -use codec::{ - Decode, - Encode, -}; /// Trait to uniquely identify the events's identity from the runtime metadata. /// diff --git a/subxt/src/metadata/decode_encode_traits.rs b/subxt/src/metadata/decode_encode_traits.rs index 7900ea641a..72d2725fb7 100644 --- a/subxt/src/metadata/decode_encode_traits.rs +++ b/subxt/src/metadata/decode_encode_traits.rs @@ -15,7 +15,7 @@ pub trait DecodeWithMetadata: Sized { ) -> Result; } -impl DecodeWithMetadata for T { +impl DecodeWithMetadata for T { fn decode_with_metadata( bytes: &mut &[u8], type_id: u32, @@ -37,7 +37,7 @@ pub trait EncodeWithMetadata { ) -> Result<(), Error>; } -impl EncodeWithMetadata for T { +impl EncodeWithMetadata for T { /// SCALE encode this type to bytes, possibly with the help of metadata. fn encode_with_metadata( &self, diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index 95c0636923..c166fcc55b 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -78,13 +78,19 @@ pub enum MetadataError { #[derive(Debug)] struct MetadataInner { metadata: RuntimeMetadataV14, - pallets: HashMap, + + // Events are hashed by pallet an error index (decode oriented) events: HashMap<(u8, u8), EventMetadata>, - // Errors are hashed by pallet index. + // Errors are hashed by pallet and error index (decode oriented) errors: HashMap<(u8, u8), ErrorMetadata>, + + // Other apllet details are hashed by pallet name. + pallets: HashMap, + // Type of the DispatchError type, which is what comes back if // an extrinsic fails. dispatch_error_ty: Option, + // The hashes uniquely identify parts of the metadata; different // hashes mean some type difference exists between static and runtime // versions. We cache them here to avoid recalculating: @@ -245,7 +251,7 @@ impl Metadata { pub struct PalletMetadata { index: u8, name: String, - call_indexes: HashMap, + call_metadata: HashMap, call_ty_id: Option, event_ty_id: Option, storage: HashMap>, @@ -277,9 +283,9 @@ impl PalletMetadata { /// Attempt to resolve a call into an index in this pallet, failing /// if the call is not found in this pallet. - pub fn call_index(&self, function: &str) -> Result { - let fn_index = *self - .call_indexes + pub fn call(&self, function: &str) -> Result<&CallMetadata, MetadataError> { + let fn_index = self + .call_metadata .get(function) .ok_or(MetadataError::CallNotFound)?; Ok(fn_index) @@ -304,37 +310,21 @@ impl PalletMetadata { } } -/// Metadata for specific field. #[derive(Clone, Debug)] -pub struct EventFieldMetadata { - name: Option, - type_name: Option, - type_id: u32, +pub struct CallMetadata { + call_index: u8, + fields: Vec>, } -impl EventFieldMetadata { - /// Construct a new [`EventFieldMetadata`] - pub fn new(name: Option, type_name: Option, type_id: u32) -> Self { - EventFieldMetadata { - name, - type_name, - type_id, - } - } - - /// Get the name of the field. - pub fn name(&self) -> Option<&str> { - self.name.as_deref() - } - - /// Get the type name of the field as it appears in the code - pub fn type_name(&self) -> Option<&str> { - self.type_name.as_deref() +impl CallMetadata { + /// Index of this call. + pub fn index(&self) -> u8 { + self.call_index } - /// Get the id of a type - pub fn type_id(&self) -> u32 { - self.type_id + /// The names, type names & types of each field in the call data. + pub fn fields(&self) -> &[scale_info::Field] { + &self.fields } } @@ -446,13 +436,21 @@ impl TryFrom for Metadata { let call_ty_id = pallet.calls.as_ref().map(|c| c.ty.id()); let event_ty_id = pallet.event.as_ref().map(|e| e.ty.id()); - let call_indexes = + let call_metadata = pallet.calls.as_ref().map_or(Ok(HashMap::new()), |call| { let type_def_variant = get_type_def_variant(call.ty.id())?; let call_indexes = type_def_variant .variants() .iter() - .map(|v| (v.name().clone(), v.index())) + .map(|v| { + ( + v.name().clone(), + CallMetadata { + call_index: v.index(), + fields: v.fields().to_vec(), + }, + ) + }) .collect(); Ok(call_indexes) })?; @@ -474,7 +472,7 @@ impl TryFrom for Metadata { let pallet_metadata = PalletMetadata { index: pallet.index, name: pallet.name.to_string(), - call_indexes, + call_metadata, call_ty_id, event_ty_id, storage, diff --git a/subxt/src/metadata/mod.rs b/subxt/src/metadata/mod.rs index 1f4d309c37..66490a258f 100644 --- a/subxt/src/metadata/mod.rs +++ b/subxt/src/metadata/mod.rs @@ -13,7 +13,6 @@ pub use metadata_location::MetadataLocation; pub use metadata_type::{ ErrorMetadata, - EventFieldMetadata, EventMetadata, InvalidMetadataError, Metadata, diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index b4567e67df..e0c80ba384 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -13,9 +13,9 @@ use crate::{ StorageAddressError, }, metadata::{ - Metadata, DecodeWithMetadata, EncodeWithMetadata, + Metadata, }, }; use frame_metadata::StorageEntryType; diff --git a/subxt/src/storage/storage_type.rs b/subxt/src/storage/storage_type.rs index a29f845dac..73d864a2da 100644 --- a/subxt/src/storage/storage_type.rs +++ b/subxt/src/storage/storage_type.rs @@ -13,8 +13,8 @@ use crate::{ }, error::Error, metadata::{ - Metadata, DecodeWithMetadata, + Metadata, }, rpc::types::{ StorageData, @@ -119,9 +119,7 @@ where pub fn fetch<'address, Address>( &self, address: &'address Address, - ) -> impl Future< - Output = Result, Error> - > + 'address + ) -> impl Future, Error>> + 'address where Address: StorageAddress + 'address, { @@ -154,8 +152,7 @@ where pub fn fetch_or_default<'address, Address>( &self, address: &'address Address, - ) -> impl Future> - + 'address + ) -> impl Future> + 'address where Address: StorageAddress + 'address, { @@ -303,9 +300,7 @@ where ReturnTy: DecodeWithMetadata, { /// Returns the next key value pair from a map. - pub async fn next( - &mut self, - ) -> Result, Error> { + pub async fn next(&mut self) -> Result, Error> { loop { if let Some((k, v)) = self.buffer.pop() { let val = ReturnTy::decode_with_metadata( @@ -419,4 +414,4 @@ fn decode_storage_with_metadata( let val = T::decode_with_metadata(bytes, id, metadata)?; Ok(val) -} \ No newline at end of file +} diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index d06d028954..2d7dd9a57f 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -14,6 +14,7 @@ use crate::{ metadata::Metadata, }; use codec::Encode; +use scale_encode::EncodeAsFields; use scale_value::{ Composite, ValueDef, @@ -96,19 +97,23 @@ impl StaticTxPayload { } } -impl TxPayload for StaticTxPayload { +impl TxPayload for StaticTxPayload { fn encode_call_data_to( &self, metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { let pallet = metadata.pallet(self.pallet_name)?; + let call = pallet.call(self.call_name)?; + let pallet_index = pallet.index(); - let call_index = pallet.call_index(self.call_name)?; + let call_index = call.index(); pallet_index.encode_to(out); call_index.encode_to(out); - self.call_data.encode_to(out); + + self.call_data + .encode_as_fields_to(call.fields(), metadata.types(), out)?; Ok(()) } From 550a314aee3485b613ee9d53c81a6e07f7933894 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 27 Feb 2023 11:39:11 +0000 Subject: [PATCH 09/31] some tidy up and add decode(skip) attrs where needed --- Cargo.lock | 48 +++++++++++++-------------- codegen/src/types/composite_def.rs | 2 ++ codegen/src/types/tests.rs | 8 +++-- subxt/src/events/events_type.rs | 42 ++++------------------- subxt/src/tx/tx_payload.rs | 53 ++++++++++++++---------------- 5 files changed, 63 insertions(+), 90 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aea1fa2ec8..777db102c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -411,7 +411,7 @@ checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" dependencies = [ "bitflags", "clap_derive", - "clap_lex 0.3.1", + "clap_lex 0.3.2", "is-terminal", "once_cell", "strsim", @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" dependencies = [ "os_str_bytes", ] @@ -1936,15 +1936,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2280,9 +2271,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", "toml_edit", @@ -2608,7 +2599,7 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3f2bbd29fe4b168d438cf34c0fd991fc9e82d625" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#fb381c68297d17a021c21584542ea66a55ef4979" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2621,7 +2612,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#3f2bbd29fe4b168d438cf34c0fd991fc9e82d625" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#fb381c68297d17a021c21584542ea66a55ef4979" dependencies = [ "darling", "proc-macro-crate", @@ -2686,7 +2677,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#0b7f1c83cd214a02be8b37502634cdeabf7ce8e4" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#40d8b34fe97fbe8397ae8cc8796390305ad63b63" dependencies = [ "either", "frame-metadata", @@ -3538,9 +3529,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e159d99e6c2b93995d171050271edb50ecc5288fbc7cc17de8fdce4e58c14" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -3729,19 +3720,19 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" dependencies = [ "indexmap", - "nom8", "toml_datetime", + "winnow", ] [[package]] @@ -4451,6 +4442,15 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "winnow" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658" +dependencies = [ + "memchr", +] + [[package]] name = "wyz" version = "0.5.1" diff --git a/codegen/src/types/composite_def.rs b/codegen/src/types/composite_def.rs index 7d6af13af4..b02b8eceb1 100644 --- a/codegen/src/types/composite_def.rs +++ b/codegen/src/types/composite_def.rs @@ -253,6 +253,7 @@ impl CompositeDefFields { let marker = phantom_data.map(|phantom_data| { quote!( #[codec(skip)] + #[decode_as_type(skip)] #visibility __subxt_unused_type_params: #phantom_data ) }); @@ -271,6 +272,7 @@ impl CompositeDefFields { let marker = phantom_data.map(|phantom_data| { quote!( #[codec(skip)] + #[decode_as_type(skip)] #visibility #phantom_data ) }); diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index 54450c6055..1cdd114a86 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -895,14 +895,18 @@ fn generics_with_alias_adds_phantom_data_marker() { #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct NamedFields<_0> { pub b: ::core::primitive::u32, - #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> + #[codec(skip)] + #[decode_as_type(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> } #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] #[decode_as_type(crate_path = ":: subxt_path :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt_path :: ext :: scale_encode")] pub struct UnnamedFields<_0, _1> ( pub (::core::primitive::u32, ::core::primitive::u32,), - #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1)> + #[codec(skip)] + #[decode_as_type(skip)] + pub ::core::marker::PhantomData<(_0, _1)> ); } } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 54798dc307..55dc5362f7 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -347,42 +347,14 @@ impl EventDetails { let bytes = &mut self.field_bytes(); let event_metadata = self.event_metadata(); - // If the first field has a name, we assume that the rest do too (it'll either - // be a named struct or a tuple type). If no fields, assume unnamed. - let is_named = event_metadata - .fields() - .get(0) - .map(|fm| fm.name().is_some()) - .unwrap_or(false); - - if !is_named { - let mut event_values = vec![]; - for field_metadata in event_metadata.fields() { - let value = scale_value::scale::decode_as_type( - bytes, - field_metadata.ty().id(), - &self.metadata.runtime_metadata().types, - ) - .map_err(scale_decode::Error::from)?; - event_values.push(value); - } - - Ok(scale_value::Composite::Unnamed(event_values)) - } else { - let mut event_values = vec![]; - for field_metadata in event_metadata.fields() { - let value = scale_value::scale::decode_as_type( - bytes, - field_metadata.ty().id(), - &self.metadata.runtime_metadata().types, - ) - .map_err(scale_decode::Error::from)?; - event_values - .push((field_metadata.name().cloned().unwrap_or_default(), value)); - } + use scale_decode::DecodeAsFields; + let decoded = >::decode_as_fields( + bytes, + event_metadata.fields(), + &self.metadata.runtime_metadata().types + )?; - Ok(scale_value::Composite::Named(event_values)) - } + Ok(decoded) } /// Attempt to statically decode these [`EventDetails`] into a type representing the event diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index 2d7dd9a57f..3ba83350f4 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -7,10 +7,7 @@ use crate::{ dynamic::Value, - error::{ - Error, - MetadataError, - }, + error::Error, metadata::Metadata, }; use codec::Encode; @@ -103,18 +100,7 @@ impl TxPayload for StaticTxPayload { metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { - let pallet = metadata.pallet(self.pallet_name)?; - let call = pallet.call(self.call_name)?; - - let pallet_index = pallet.index(); - let call_index = call.index(); - - pallet_index.encode_to(out); - call_index.encode_to(out); - - self.call_data - .encode_as_fields_to(call.fields(), metadata.types(), out)?; - Ok(()) + encode_tx_payload(&self.pallet_name, &self.call_name, &self.call_data, metadata, out) } fn validation_details(&self) -> Option> { @@ -181,18 +167,27 @@ impl<'a> TxPayload for DynamicTxPayload<'a> { metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { - let pallet = metadata.pallet(&self.pallet_name)?; - let call_id = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?; - let call_value = Value { - context: (), - value: ValueDef::Variant(Variant { - name: self.call_name.to_string(), - values: self.fields.clone(), - }), - }; - - pallet.index().encode_to(out); - scale_value::scale::encode_as_type(&call_value, call_id, metadata.types(), out)?; - Ok(()) + encode_tx_payload(&self.pallet_name, &self.call_name, &self.fields, metadata, out) } } + +// We use this same logic to encode both static and dynamic tx payloads. +fn encode_tx_payload( + pallet_name: &str, + call_name: &str, + call_data: &CallData, + metadata: &Metadata, + out: &mut Vec +) -> Result<(), Error> { + let pallet = metadata.pallet(pallet_name)?; + let call = pallet.call(call_name)?; + + let pallet_index = pallet.index(); + let call_index = call.index(); + + pallet_index.encode_to(out); + call_index.encode_to(out); + + call_data.encode_as_fields_to(call.fields(), metadata.types(), out)?; + Ok(()) +} \ No newline at end of file From 3258e835aa24f6683b186c0774955df1a704048f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 14:16:33 +0000 Subject: [PATCH 10/31] fix root event decoding --- Cargo.lock | 32 ++++++------ Cargo.toml | 3 ++ codegen/src/api/mod.rs | 42 +++++++++++++--- subxt/Cargo.toml | 2 +- subxt/src/events/events_type.rs | 87 +++++++++++++++++++++++++++++++-- subxt/src/events/mod.rs | 2 + 6 files changed, 136 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 777db102c7..74c4d1e3d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -405,9 +405,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.6" +version = "4.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3" +checksum = "2f3061d6db6d8fcbbd4b05e057f2acace52e64e96b498c08c2d7a4e65addd340" dependencies = [ "bitflags", "clap_derive", @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "34d122164198950ba84a918270a3bb3f7ededd25e15f7451673d986f55bd2667" dependencies = [ "heck", "proc-macro-error", @@ -863,9 +863,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ed25519" @@ -1250,9 +1250,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes", "fnv", @@ -2599,7 +2599,7 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#fb381c68297d17a021c21584542ea66a55ef4979" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#d4fc0d45787cc37008da68d2ab14fe8122c02140" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#fb381c68297d17a021c21584542ea66a55ef4979" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#d4fc0d45787cc37008da68d2ab14fe8122c02140" dependencies = [ "darling", "proc-macro-crate", @@ -2623,9 +2623,7 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01664452a22ef3d9dc6ce24cc5dd6fb217d51b09f3ee551b48828a47ee094e79" +version = "0.0.18" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2637,9 +2635,7 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373feebf1e4294837dcbae7cf8a04b4f8fa4a4f273cb055d7da13a67059a4962" +version = "0.0.18" dependencies = [ "darling", "proc-macro-crate", @@ -2677,7 +2673,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#40d8b34fe97fbe8397ae8cc8796390305ad63b63" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#e2414d38030811a6517a2f00ef5ee549ab3d8837" dependencies = [ "either", "frame-metadata", @@ -3455,7 +3451,7 @@ dependencies = [ name = "subxt-cli" version = "0.27.1" dependencies = [ - "clap 4.1.6", + "clap 4.1.7", "color-eyre", "frame-metadata", "hex", diff --git a/Cargo.toml b/Cargo.toml index 1adcacd1dd..f8bc339d00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,3 +21,6 @@ license = "Apache-2.0 OR GPL-3.0" repository = "https://github.com/paritytech/subxt" documentation = "https://docs.rs/subxt" homepage = "https://www.parity.io/" + +[patch.crates-io] +scale-encode = { path = "../scale-encode/scale-encode" } \ No newline at end of file diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index b3df7a3762..bc9379980a 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -251,24 +251,50 @@ impl RuntimeGenerator { } }); - let outer_event_variants = self.metadata.pallets.iter().filter_map(|p| { - let variant_name = format_ident!("{}", p.name); - let mod_name = format_ident!("{}", p.name.to_string().to_snake_case()); + let outer_event_variants_and_match_arms = self.metadata.pallets.iter().filter_map(|p| { + let variant_name_str = &p.name; + let variant_name = format_ident!("{}", variant_name_str); + let mod_name = format_ident!("{}", variant_name_str.to_string().to_snake_case()); let index = proc_macro2::Literal::u8_unsuffixed(p.index); p.event.as_ref().map(|_| { - quote! { + // The variant name to go into the event enum: + let outer_event_variant = quote! { #[codec(index = #index)] #variant_name(#mod_name::Event), - } + }; + + // An 'if' arm for the RootEvent impl to match this variant name: + let outer_event_match_arm = quote! { + if pallet_name == #variant_name_str { + return Ok(Event::#variant_name(#mod_name::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata + )?)); + } + }; + + (outer_event_variant, outer_event_match_arm) }) - }); + }).collect::>(); + + let outer_event_variants = outer_event_variants_and_match_arms.iter().map(|v| &v.0); + let outer_event_match_arms = outer_event_variants_and_match_arms.iter().map(|v| &v.1); let outer_event = quote! { #default_derives pub enum Event { #( #outer_event_variants )* } + + impl #crate_path::events::RootEvent for Event { + fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_ty: u32, metadata: &#crate_path::Metadata) -> Result { + use #crate_path::metadata::DecodeWithMetadata; + #( #outer_event_match_arms )* + Err(#crate_path::ext::scale_decode::Error::custom(format!("Pallet name '{}' not found in root Event enum", pallet_name)).into()) + } + } }; let mod_ident = &item_mod_ir.ident; @@ -356,10 +382,10 @@ impl RuntimeGenerator { } /// check whether the Client you are using is aligned with the statically generated codegen. - pub fn validate_codegen>(client: &C) -> Result<(), ::subxt::error::MetadataError> { + pub fn validate_codegen>(client: &C) -> Result<(), #crate_path::error::MetadataError> { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ #(#metadata_hash,)* ] { - Err(::subxt::error::MetadataError::IncompatibleMetadata) + Err(#crate_path::error::MetadataError::IncompatibleMetadata) } else { Ok(()) } diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 9787af1172..7c8fe753b6 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -40,7 +40,7 @@ scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.17" +scale-encode = "0.0.18" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 55dc5362f7..bd8b969361 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -375,10 +375,10 @@ impl EventDetails { } } - /// Attempt to decode these [`EventDetails`] into a root event type (which includes - /// the pallet and event enum variants as well as the event fields). A compatible - /// type for this is exposed via static codegen as a root level `Event` type. - pub fn as_root_event(&self) -> Result { + /// Attempt to decode these [`EventDetails`] into a pallet event type (which includes + /// the pallet enum variants as well as the event fields). These events can be found in + /// the static codegen under a path like `pallet_name::Event`. + pub fn as_pallet_event(&self) -> Result { let pallet = self.metadata.pallet(self.pallet_name())?; let event_ty = pallet.event_ty_id().ok_or_else(|| { Error::Metadata(crate::metadata::MetadataError::EventNotFound( @@ -387,13 +387,44 @@ impl EventDetails { )) })?; + // Ignore the root enum index, so start 1 byte after that: + let start_idx = self.event_start_idx + 1; + let decoded = E::decode_with_metadata( - &mut &self.all_bytes[self.event_start_idx..self.event_fields_end_idx], + &mut &self.all_bytes[start_idx..self.event_fields_end_idx], event_ty, &self.metadata, )?; Ok(decoded) } + + /// Attempt to decode these [`EventDetails`] into a root event type (which includes + /// the pallet and event enum variants as well as the event fields). A compatible + /// type for this is exposed via static codegen as a root level `Event` type. + pub fn as_root_event(&self) -> Result { + let pallet_bytes = &self.all_bytes[self.event_start_idx + 1..self.event_fields_end_idx]; + let pallet = self.metadata.pallet(self.pallet_name())?; + let pallet_event_ty = pallet.event_ty_id().ok_or_else(|| { + Error::Metadata(crate::metadata::MetadataError::EventNotFound( + pallet.index(), + self.variant_index(), + )) + })?; + + E::root_event(pallet_bytes, self.pallet_name(), pallet_event_ty, &self.metadata) + } +} + +/// This trait is implemented on the statically generated root event type, so that we're able +/// to decode it properly via a pallet event that impls `DecodeAsMetadata`. This is necessary +/// becasue the "root event" type is generated using pallet info but doesn't actually exist in the +/// metadata types, so we have no easy way to decode things into it via type information and need a +/// little help via codegen. +#[doc(hidden)] +pub trait RootEvent: Sized { + /// Given details of the pallet event we wawnt to decode, and the name of the pallet, try to hand + /// back a "root event". + fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_event_ty: u32, metadata: &Metadata) -> Result; } /// Event related test utilities used outside this module. @@ -436,6 +467,16 @@ pub(crate) mod test_utils { Test(Ev), } + // We need this in order to be able to decode into a root event type: + impl RootEvent for AllEvents { + fn root_event(mut bytes: &[u8], pallet_name: &str, pallet_event_ty: u32, metadata: &Metadata) -> Result { + if pallet_name == "Test" { + return Ok(AllEvents::Test(Ev::decode_with_metadata(&mut bytes, pallet_event_ty, metadata)?)); + } + panic!("Asked for pallet name '{pallet_name}', which isn't in our test AllEvents type") + } + } + /// This encodes to the same format an event is expected to encode to /// in node System.Events storage. #[derive(Encode)] @@ -562,6 +603,7 @@ mod tests { // Make sure that the bytes handed back line up with the fields handed back; // encode the fields back into bytes and they should be equal. let actual_fields = actual.field_values().expect("can decode field values (1)"); + let mut actual_bytes = vec![]; for field in actual_fields.into_values() { scale_value::scale::encode_as_type( @@ -626,6 +668,41 @@ mod tests { assert_eq!(decoded_event, AllEvents::Test(event)); } + #[test] + fn statically_decode_single_pallet_event() { + #[derive( + Clone, Debug, PartialEq, Decode, Encode, TypeInfo, scale_decode::DecodeAsType, + )] + enum Event { + A(u8, bool, Vec), + } + + // Create fake metadata that knows about our single event, above: + let metadata = metadata::(); + + // Encode our events in the format we expect back from a node, and + // construst an Events object to iterate them: + let event = Event::A(1, true, vec!["Hi".into()]); + let events = events::( + metadata, + vec![event_record(Phase::ApplyExtrinsic(123), event.clone())], + ); + + let ev = events + .iter() + .next() + .expect("one event expected") + .expect("event should be extracted OK"); + + // This is the line we're testing; decode into our "pallet event" enum. + let decoded_event = ev + .as_pallet_event::() + .expect("can decode event into root enum again"); + + // It should equal the event we put in: + assert_eq!(decoded_event, event); + } + #[test] fn dynamically_decode_single_event() { #[derive(Clone, Debug, PartialEq, Decode, Encode, TypeInfo)] diff --git a/subxt/src/events/mod.rs b/subxt/src/events/mod.rs index 219bddc5b1..4499d10751 100644 --- a/subxt/src/events/mod.rs +++ b/subxt/src/events/mod.rs @@ -17,6 +17,8 @@ pub use events_client::EventsClient; pub use events_type::{ EventDetails, Events, + // Used in codegen but hidden from docs: + RootEvent, }; use scale_decode::DecodeAsFields; From 4bbec3946a2672aa7dc73f2655a86b66f2236a0b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 15:58:06 +0000 Subject: [PATCH 11/31] #[codec(skip)] will do, and combine map_key stuff into storage_address since it's all specific to that --- Cargo.lock | 14 ++++---- codegen/src/types/composite_def.rs | 2 -- codegen/src/types/tests.rs | 2 -- subxt/src/storage/mod.rs | 23 +++++------- subxt/src/storage/storage_address.rs | 50 ++++++++++++++++++++++++-- subxt/src/storage/storage_map_key.rs | 52 ---------------------------- 6 files changed, 63 insertions(+), 80 deletions(-) delete mode 100644 subxt/src/storage/storage_map_key.rs diff --git a/Cargo.lock b/Cargo.lock index 74c4d1e3d4..c9e2e1ddab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -405,9 +405,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.7" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3061d6db6d8fcbbd4b05e057f2acace52e64e96b498c08c2d7a4e65addd340" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", "clap_derive", @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.7" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d122164198950ba84a918270a3bb3f7ededd25e15f7451673d986f55bd2667" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" dependencies = [ "heck", "proc-macro-error", @@ -2599,7 +2599,7 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#d4fc0d45787cc37008da68d2ab14fe8122c02140" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#bcc00bb4bfb69702b0048aba585e7974ad1973a0" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#d4fc0d45787cc37008da68d2ab14fe8122c02140" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#bcc00bb4bfb69702b0048aba585e7974ad1973a0" dependencies = [ "darling", "proc-macro-crate", @@ -3451,7 +3451,7 @@ dependencies = [ name = "subxt-cli" version = "0.27.1" dependencies = [ - "clap 4.1.7", + "clap 4.1.8", "color-eyre", "frame-metadata", "hex", diff --git a/codegen/src/types/composite_def.rs b/codegen/src/types/composite_def.rs index b02b8eceb1..7d6af13af4 100644 --- a/codegen/src/types/composite_def.rs +++ b/codegen/src/types/composite_def.rs @@ -253,7 +253,6 @@ impl CompositeDefFields { let marker = phantom_data.map(|phantom_data| { quote!( #[codec(skip)] - #[decode_as_type(skip)] #visibility __subxt_unused_type_params: #phantom_data ) }); @@ -272,7 +271,6 @@ impl CompositeDefFields { let marker = phantom_data.map(|phantom_data| { quote!( #[codec(skip)] - #[decode_as_type(skip)] #visibility #phantom_data ) }); diff --git a/codegen/src/types/tests.rs b/codegen/src/types/tests.rs index 1cdd114a86..4c3c2cc14a 100644 --- a/codegen/src/types/tests.rs +++ b/codegen/src/types/tests.rs @@ -896,7 +896,6 @@ fn generics_with_alias_adds_phantom_data_marker() { pub struct NamedFields<_0> { pub b: ::core::primitive::u32, #[codec(skip)] - #[decode_as_type(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_0> } #[derive(::subxt_path::ext::codec::Decode, ::subxt_path::ext::codec::Encode, ::subxt_path::ext::scale_decode::DecodeAsType, ::subxt_path::ext::scale_encode::EncodeAsType, Debug)] @@ -905,7 +904,6 @@ fn generics_with_alias_adds_phantom_data_marker() { pub struct UnnamedFields<_0, _1> ( pub (::core::primitive::u32, ::core::primitive::u32,), #[codec(skip)] - #[decode_as_type(skip)] pub ::core::marker::PhantomData<(_0, _1)> ); } diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index 4edfd04a53..eda0fc4019 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -6,7 +6,6 @@ mod storage_address; mod storage_client; -mod storage_map_key; mod storage_type; pub mod utils; @@ -24,19 +23,15 @@ pub use crate::rpc::types::StorageKey; /// Types representing an address which describes where a storage /// entry lives and how to properly decode it. pub mod address { - pub use super::{ - storage_address::{ - dynamic, - dynamic_root, - DynamicStorageAddress, - StaticStorageAddress, - StorageAddress, - Yes, - }, - storage_map_key::{ - StorageHasher, - StorageMapKey, - }, + pub use frame_metadata::StorageHasher; + pub use super::storage_address::{ + dynamic, + dynamic_root, + DynamicStorageAddress, + StaticStorageAddress, + StorageAddress, + StorageMapKey, + Yes, }; } diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index e0c80ba384..2d75fa6a04 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -2,7 +2,6 @@ // This file is dual-licensed as Apache-2.0 or GPL-3.0. // see LICENSE for license details. -use super::storage_map_key::StorageMapKey; use crate::{ dynamic::{ DecodedValueThunk, @@ -21,6 +20,7 @@ use crate::{ use frame_metadata::StorageEntryType; use scale_info::TypeDef; use std::borrow::Cow; +use codec::Encode; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -77,6 +77,31 @@ pub struct StaticStorageAddress { _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, } +/// Storage key for a Map. +#[derive(Clone)] +pub struct StorageMapKey { + value: Vec, + hasher: StorageHasher, +} + +impl StorageMapKey { + /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. + pub fn new( + value: Encodable, + hasher: StorageHasher, + ) -> StorageMapKey { + Self { + value: value.encode(), + hasher, + } + } + + /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. + pub fn to_bytes(&self, bytes: &mut Vec) { + hash_bytes(&self.value, &self.hasher, bytes) + } +} + impl StaticStorageAddress where @@ -260,7 +285,7 @@ where for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { key.encode_with_metadata(type_id, metadata, &mut input)?; } - super::storage_map_key::hash_bytes(&input, &hashers[0], bytes); + hash_bytes(&input, &hashers[0], bytes); Ok(()) } else if hashers.len() == type_ids.len() { // A hasher per field; encode and hash each field independently. @@ -269,7 +294,7 @@ where { let mut input = Vec::new(); key.encode_with_metadata(type_id, metadata, &mut input)?; - super::storage_map_key::hash_bytes(&input, hasher, bytes); + hash_bytes(&input, hasher, bytes); } Ok(()) } else { @@ -284,3 +309,22 @@ where } } } + +/// Take some SCALE encoded bytes and a [`StorageHasher`] and hash the bytes accordingly. +fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { + match hasher { + StorageHasher::Identity => bytes.extend(input), + StorageHasher::Blake2_128 => bytes.extend(sp_core_hashing::blake2_128(input)), + StorageHasher::Blake2_128Concat => { + bytes.extend(sp_core_hashing::blake2_128(input)); + bytes.extend(input); + } + StorageHasher::Blake2_256 => bytes.extend(sp_core_hashing::blake2_256(input)), + StorageHasher::Twox128 => bytes.extend(sp_core_hashing::twox_128(input)), + StorageHasher::Twox256 => bytes.extend(sp_core_hashing::twox_256(input)), + StorageHasher::Twox64Concat => { + bytes.extend(sp_core_hashing::twox_64(input)); + bytes.extend(input); + } + } +} \ No newline at end of file diff --git a/subxt/src/storage/storage_map_key.rs b/subxt/src/storage/storage_map_key.rs deleted file mode 100644 index 2f0b585cba..0000000000 --- a/subxt/src/storage/storage_map_key.rs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2019-2022 Parity Technologies (UK) Ltd. -// This file is dual-licensed as Apache-2.0 or GPL-3.0. -// see LICENSE for license details. - -use codec::Encode; - -// We use this type a bunch, so export it from here. -pub use frame_metadata::StorageHasher; - -/// Storage key for a Map. -#[derive(Clone)] -pub struct StorageMapKey { - value: Vec, - hasher: StorageHasher, -} - -impl StorageMapKey { - /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. - pub fn new( - value: Encodable, - hasher: StorageHasher, - ) -> StorageMapKey { - Self { - value: value.encode(), - hasher, - } - } - - /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - hash_bytes(&self.value, &self.hasher, bytes) - } -} - -/// Take some SCALE encoded bytes and a [`StorageHasher`] and hash the bytes accordingly. -pub(super) fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { - match hasher { - StorageHasher::Identity => bytes.extend(input), - StorageHasher::Blake2_128 => bytes.extend(sp_core_hashing::blake2_128(input)), - StorageHasher::Blake2_128Concat => { - bytes.extend(sp_core_hashing::blake2_128(input)); - bytes.extend(input); - } - StorageHasher::Blake2_256 => bytes.extend(sp_core_hashing::blake2_256(input)), - StorageHasher::Twox128 => bytes.extend(sp_core_hashing::twox_128(input)), - StorageHasher::Twox256 => bytes.extend(sp_core_hashing::twox_256(input)), - StorageHasher::Twox64Concat => { - bytes.extend(sp_core_hashing::twox_64(input)); - bytes.extend(input); - } - } -} From 4767097ed9f8e612d8ba9fa50e9c51f6a3cec833 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 16:03:33 +0000 Subject: [PATCH 12/31] fmt and clippy --- codegen/src/api/mod.rs | 6 ++-- subxt/src/events/events_type.rs | 43 +++++++++++++++++++++------- subxt/src/storage/mod.rs | 2 +- subxt/src/storage/storage_address.rs | 4 +-- subxt/src/tx/tx_payload.rs | 20 ++++++++++--- 5 files changed, 55 insertions(+), 20 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index bc9379980a..6c36dd79fd 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -279,8 +279,10 @@ impl RuntimeGenerator { }) }).collect::>(); - let outer_event_variants = outer_event_variants_and_match_arms.iter().map(|v| &v.0); - let outer_event_match_arms = outer_event_variants_and_match_arms.iter().map(|v| &v.1); + let outer_event_variants = + outer_event_variants_and_match_arms.iter().map(|v| &v.0); + let outer_event_match_arms = + outer_event_variants_and_match_arms.iter().map(|v| &v.1); let outer_event = quote! { #default_derives diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index bd8b969361..033dbaf9ca 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -348,11 +348,12 @@ impl EventDetails { let event_metadata = self.event_metadata(); use scale_decode::DecodeAsFields; - let decoded = >::decode_as_fields( - bytes, - event_metadata.fields(), - &self.metadata.runtime_metadata().types - )?; + let decoded = + >::decode_as_fields( + bytes, + event_metadata.fields(), + &self.metadata.runtime_metadata().types, + )?; Ok(decoded) } @@ -402,7 +403,8 @@ impl EventDetails { /// the pallet and event enum variants as well as the event fields). A compatible /// type for this is exposed via static codegen as a root level `Event` type. pub fn as_root_event(&self) -> Result { - let pallet_bytes = &self.all_bytes[self.event_start_idx + 1..self.event_fields_end_idx]; + let pallet_bytes = + &self.all_bytes[self.event_start_idx + 1..self.event_fields_end_idx]; let pallet = self.metadata.pallet(self.pallet_name())?; let pallet_event_ty = pallet.event_ty_id().ok_or_else(|| { Error::Metadata(crate::metadata::MetadataError::EventNotFound( @@ -411,7 +413,12 @@ impl EventDetails { )) })?; - E::root_event(pallet_bytes, self.pallet_name(), pallet_event_ty, &self.metadata) + E::root_event( + pallet_bytes, + self.pallet_name(), + pallet_event_ty, + &self.metadata, + ) } } @@ -424,7 +431,12 @@ impl EventDetails { pub trait RootEvent: Sized { /// Given details of the pallet event we wawnt to decode, and the name of the pallet, try to hand /// back a "root event". - fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_event_ty: u32, metadata: &Metadata) -> Result; + fn root_event( + pallet_bytes: &[u8], + pallet_name: &str, + pallet_event_ty: u32, + metadata: &Metadata, + ) -> Result; } /// Event related test utilities used outside this module. @@ -468,10 +480,19 @@ pub(crate) mod test_utils { } // We need this in order to be able to decode into a root event type: - impl RootEvent for AllEvents { - fn root_event(mut bytes: &[u8], pallet_name: &str, pallet_event_ty: u32, metadata: &Metadata) -> Result { + impl RootEvent for AllEvents { + fn root_event( + mut bytes: &[u8], + pallet_name: &str, + pallet_event_ty: u32, + metadata: &Metadata, + ) -> Result { if pallet_name == "Test" { - return Ok(AllEvents::Test(Ev::decode_with_metadata(&mut bytes, pallet_event_ty, metadata)?)); + return Ok(AllEvents::Test(Ev::decode_with_metadata( + &mut bytes, + pallet_event_ty, + metadata, + )?)) } panic!("Asked for pallet name '{pallet_name}', which isn't in our test AllEvents type") } diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index eda0fc4019..aa3e8e50d9 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -23,7 +23,6 @@ pub use crate::rpc::types::StorageKey; /// Types representing an address which describes where a storage /// entry lives and how to properly decode it. pub mod address { - pub use frame_metadata::StorageHasher; pub use super::storage_address::{ dynamic, dynamic_root, @@ -33,6 +32,7 @@ pub mod address { StorageMapKey, Yes, }; + pub use frame_metadata::StorageHasher; } // For consistency with other modules, also expose diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 2d75fa6a04..4e681b89dd 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -17,10 +17,10 @@ use crate::{ Metadata, }, }; +use codec::Encode; use frame_metadata::StorageEntryType; use scale_info::TypeDef; use std::borrow::Cow; -use codec::Encode; // We use this type a bunch, so export it from here. pub use frame_metadata::StorageHasher; @@ -327,4 +327,4 @@ fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { bytes.extend(input); } } -} \ No newline at end of file +} diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index 3ba83350f4..c5d8d57e29 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -100,7 +100,13 @@ impl TxPayload for StaticTxPayload { metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { - encode_tx_payload(&self.pallet_name, &self.call_name, &self.call_data, metadata, out) + encode_tx_payload( + self.pallet_name, + self.call_name, + &self.call_data, + metadata, + out, + ) } fn validation_details(&self) -> Option> { @@ -167,7 +173,13 @@ impl<'a> TxPayload for DynamicTxPayload<'a> { metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { - encode_tx_payload(&self.pallet_name, &self.call_name, &self.fields, metadata, out) + encode_tx_payload( + &self.pallet_name, + &self.call_name, + &self.fields, + metadata, + out, + ) } } @@ -177,7 +189,7 @@ fn encode_tx_payload( call_name: &str, call_data: &CallData, metadata: &Metadata, - out: &mut Vec + out: &mut Vec, ) -> Result<(), Error> { let pallet = metadata.pallet(pallet_name)?; let call = pallet.call(call_name)?; @@ -190,4 +202,4 @@ fn encode_tx_payload( call_data.encode_as_fields_to(call.fields(), metadata.types(), out)?; Ok(()) -} \ No newline at end of file +} From 1d4f3ee8bc23b00acbd0837f2b3855cc9f6529e5 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 16:08:06 +0000 Subject: [PATCH 13/31] update Cargo.lock --- Cargo.lock | 164 +++++++++++++++++++++++++++-------------------------- 1 file changed, 84 insertions(+), 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9e2e1ddab..94408de04f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -531,9 +531,9 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.92.0" +version = "0.93.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab984c94593f876090fae92e984bdcc74d9b1acf740ab5f79036001c65cba13" +checksum = "af684f7f7b01427b1942c7102673322a51b9d6f261e9663dc5e5595786775531" dependencies = [ "serde", ] @@ -585,9 +585,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -595,9 +595,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -606,22 +606,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.7.1", + "memoffset 0.8.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] @@ -1302,6 +1302,9 @@ 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" @@ -1570,6 +1573,7 @@ dependencies = [ "scale-info", "sp-core", "sp-keyring", + "sp-runtime", "subxt", "subxt-codegen", "syn", @@ -1874,9 +1878,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -2950,9 +2954,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f08604ba4bd856311946722958711a08bded5c929e1227f7a697c58deb09468" +checksum = "65e5d5ec374fc23f4e1b87219be18e01080d8a21a2dee3b49df8befeddbf5780" dependencies = [ "parity-scale-codec", "scale-info", @@ -2964,9 +2968,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7796939f2e3b68a3b9410ea17a2063b78038cd366f57fa772dd3be0798bd3412" +checksum = "a3dd56a02ca86de62dc9485d95830a5fed56fd7e4a22b13c01e62e73bc2094d2" dependencies = [ "integer-sqrt", "num-traits", @@ -2979,9 +2983,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c96dc3debbe5c22ebf18f99e6a53199efe748e6e584a1902adb88cbad66ae7c" +checksum = "4ea27a1d8de728306d17502ba13127a1b1149c66e0ef348f67dafad630b50c1d" dependencies = [ "array-bytes", "base58", @@ -3023,9 +3027,9 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" +checksum = "d607f7209b1b9571177fc3722a03312df03606bb65f89317ba686d5fa59d438f" dependencies = [ "blake2", "byteorder", @@ -3038,9 +3042,9 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833921310f9883f2093849d3f5e9e57e9890f6b60839498b08d4c72572cc602" +checksum = "c86d231d36b86d5d433c3e439e0dcaa9192861eee30158ee12c7bc009e02bdbb" dependencies = [ "proc-macro2", "quote", @@ -3050,9 +3054,9 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fb9dc63d54de7d7bed62a505b6e0bd66c122525ea1abb348f6564717c3df2d" +checksum = "62211eed9ef9dac4b9d837c56ccc9f8ee4fc49d9d9b7e6b9daf098fe173389ab" dependencies = [ "proc-macro2", "quote", @@ -3061,9 +3065,9 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57052935c9c9b070ea6b339ef0da3bf241b7e065fc37f9c551669ee83ecfc3c1" +checksum = "8ae0f275760689aaefe967943331d458cd99f5169d18364365d4cb584b246d1c" dependencies = [ "environmental", "parity-scale-codec", @@ -3073,9 +3077,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578959f9a7e44fd2dd96e8b8bc893cea04fcd7c00a4ffbb0b91c5013899dd02b" +checksum = "3be5c4b33aa06da7745be99da2380a500d2f5ccf9b2df5b344d5d1c675adedaa" dependencies = [ "bytes", "ed25519", @@ -3099,9 +3103,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc13a168cdc15e185db5cbe8644e3eaafa534e229593768b3044b60bea00fc8c" +checksum = "1772c353908e9f5333c04b22137430f3b11c9efa50ad4521e05ef5ccf349596c" dependencies = [ "lazy_static", "sp-core", @@ -3111,9 +3115,9 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480dbd54b281c638209fbcfce69902b82a0a1af0e22219d46825eadced3136b6" +checksum = "811b1f0e8fc5b71fa359f5b4b67adedeba5dc313415e2923f8055e72c172a6ce" dependencies = [ "async-trait", "futures", @@ -3128,9 +3132,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abed79c3d5b3622f65ab065676addd9923b9b122cd257df23e2757ce487c6d2" +checksum = "75986cc917d897e0f6d0c848088064df4c74ccbb8f1c1848700b725f5ca7fe04" dependencies = [ "backtrace", "lazy_static", @@ -3139,9 +3143,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ab2fd44668d3e8674e2253a43852857a47d49be7db737e98bf157e4bcebefd" +checksum = "f02650b39d4bf5966fcd80a5b11e0cc871620952ab9be901edf1fdf1460b1ea9" dependencies = [ "either", "hash256-std-hasher", @@ -3162,9 +3166,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "13.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb7707246cee4967a8cc71e3ef0e82f562e8b1020606447a6a12b99c7c1b443" +checksum = "2446ea08a1ae6dac4218b26e01c7aad6dbf47eb506f4f2b1efa821aa418a07d2" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -3181,9 +3185,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2773c90e5765847c5e8b4a24b553d38a9ca52ded47c142cfcfb7948f42827af9" +checksum = "05ae5b00aef477127ddb6177b3464ad1e2bdcc12ee913fc5dfc9d065c6cea89b" dependencies = [ "Inflector", "proc-macro-crate", @@ -3194,9 +3198,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c957b8b4c252507c12674948db427c5e34fd1760ce256922f1ec5f89f781a4f" +checksum = "779f737342d849205b97e2aacd729695614d86ccb05604e34f0ffe6391d7a4ce" dependencies = [ "hash-db", "log", @@ -3215,15 +3219,15 @@ dependencies = [ [[package]] name = "sp-std" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" +checksum = "1de8eef39962b5b97478719c493bed2926cf70cb621005bbf68ebe58252ff986" [[package]] name = "sp-storage" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c20cb0c562d1a159ecb2c7ca786828c81e432c535474967d2df3a484977cea4" +checksum = "9ad1f8c52d4700ac7bc42b3375679a6c6fc1fe876f4b40c6efdf36f933ef0291" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3235,9 +3239,9 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46bd547da89a9cda69b4ce4c91a5b7e1f86915190d83cd407b715d0c6bac042" +checksum = "00fab60bf3d42255ce3f678903d3a2564662371c75623de4a1ffc7cac46143df" dependencies = [ "parity-scale-codec", "sp-std", @@ -3248,9 +3252,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efbe5b6d29a18fea7c2f52e0098135f2f864b31d335d5105b40a349866ba874" +checksum = "31b5f3e730d26923d699766a9ca065ec39161f7af815c19acfb89c73f0402bf9" dependencies = [ "ahash 0.8.3", "hash-db", @@ -3272,9 +3276,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f705c5c6c6dad760355df0b870dd8e510f720ae6adde3eeba069c116248024" +checksum = "53ebad12a51b507859dc2978f1a6b101b403d1544403a17a1b7c17eeed20cb0c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3290,9 +3294,9 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61fa10e7a0453c9eb2bfd49067585fe54d530f020e3bfa94bf0a9ce547aa5b3" +checksum = "a42f1acfd2bbaa92c4d97f7a0840e900a5dfa8e8d57b91c031c64f1df2112e90" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3302,9 +3306,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbc05650b6338808892a7b04f0c56bb1f7f928bfa9ac58e0af2c1e5bef33229" +checksum = "510bdd9ade55508e5aa05b99ab79aaa4b74a1f7476351b6ce0f3aab3b1cb2524" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -3317,9 +3321,9 @@ dependencies = [ [[package]] name = "sp-weights" -version = "14.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ebab7696f915aa548494aef3ca8d15217baf10458fe6edb87e60587a47de358" +checksum = "39c4a96e53621ae435981fb6037d8b0be7cf32fae627780094a94ef89f194715" dependencies = [ "parity-scale-codec", "scale-info", @@ -3839,12 +3843,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -4146,9 +4150,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.96.0" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adde01ade41ab9a5d10ec8ed0bb954238cf8625b5cd5a13093d6de2ad9c2be1a" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ "indexmap", "url", @@ -4156,9 +4160,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5b183a159484980138cc05231419c536d395a7b25c1802091310ea2f74276a" +checksum = "9010891d0b8e367c3be94ca35d7bc25c1de3240463bb1d61bcfc8c2233c4e0d0" dependencies = [ "anyhow", "bincode", @@ -4181,18 +4185,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0aeb1cb256d76cf07b20264c808351c8b525ece56de1ef4d93f87a0aaf342db" +checksum = "65805c663eaa8257b910666f6d4b056b5c7329750da754ba5df54f3af7dbf35c" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-environ" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a2a5f0fb93aa837a727a48dd1076e8a9f882cc2fee20b433c04a18740ff63b" +checksum = "4f964bb0b91fa021b8d1b488c62cc77b346c1dae6e3ebd010050b57c1f2ca657" dependencies = [ "anyhow", "cranelift-entity", @@ -4209,9 +4213,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c78f9fb2922dbb5a95f009539d4badb44866caeeb53d156bf2cf4d683c3afd" +checksum = "b7a1d06f5d109539e0168fc74fa65e3948ac8dac3bb8cdbd08b62b36a0ae27b8" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -4232,18 +4236,18 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cacdb52a77b8c8e744e510beeabf0bd698b1c94c59eed33c52b3fbd19639b0" +checksum = "f76ef2e410329aaf8555ac6571d6fe07711be0646dcdf7ff3ab750a42ed2e583" dependencies = [ "once_cell", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08fcba5ebd96da2a9f0747ab6337fe9788adfb3f63fa2c180520d665562d257e" +checksum = "ec1fd0f0dd79e7cc0f55b102e320d7c77ab76cd272008a8fd98e25b5777e2636" dependencies = [ "cfg-if", "libc", @@ -4252,9 +4256,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0793210acf50d4c69182c916abaee1d423dc5d172cdfde6acfea2f9446725940" +checksum = "271aef9b4ca2e953a866293683f2db33cda46f6933c5e431e68d8373723d4ab6" dependencies = [ "anyhow", "cc", @@ -4276,9 +4280,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d015ba8b231248a811e323cf7a525cd3f982d4be0b9e62d27685102e5f12b1" +checksum = "b18144b0e45479a830ac9fcebfc71a16d90dc72d8ebd5679700eb3bfe974d7df" dependencies = [ "cranelift-entity", "serde", From ee88037d8dabd57771a8cf0dd0f58033353caf7c Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 16:31:22 +0000 Subject: [PATCH 14/31] remove patched scale-encode --- Cargo.lock | 4 ++++ Cargo.toml | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94408de04f..6a7aee5ae2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2628,6 +2628,8 @@ dependencies = [ [[package]] name = "scale-encode" version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8af4c1ed8b78d7b7079d503b25df7b7cba2de8c5f879c5a22cc057c0bbe30a6" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2640,6 +2642,8 @@ dependencies = [ [[package]] name = "scale-encode-derive" version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b39f2457a4fb9248188e1f61aea1303592746a41193365682052094bf08b171" dependencies = [ "darling", "proc-macro-crate", diff --git a/Cargo.toml b/Cargo.toml index f8bc339d00..1adcacd1dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,3 @@ license = "Apache-2.0 OR GPL-3.0" repository = "https://github.com/paritytech/subxt" documentation = "https://docs.rs/subxt" homepage = "https://www.parity.io/" - -[patch.crates-io] -scale-encode = { path = "../scale-encode/scale-encode" } \ No newline at end of file From 6f70c2963d49155d2f0fa3874a7f24401c696777 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 28 Feb 2023 17:05:39 +0000 Subject: [PATCH 15/31] bump scale-encode to 0.1 and remove unused dep in testing crate --- Cargo.lock | 15 +++++++-------- subxt/Cargo.toml | 2 +- testing/integration-tests/Cargo.toml | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a7aee5ae2..f493bad260 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1573,7 +1573,6 @@ dependencies = [ "scale-info", "sp-core", "sp-keyring", - "sp-runtime", "subxt", "subxt-codegen", "syn", @@ -2603,7 +2602,7 @@ dependencies = [ [[package]] name = "scale-decode" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#bcc00bb4bfb69702b0048aba585e7974ad1973a0" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#109000b78ae048dae483340ed87c33dee6b5ae1b" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2616,7 +2615,7 @@ dependencies = [ [[package]] name = "scale-decode-derive" version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#bcc00bb4bfb69702b0048aba585e7974ad1973a0" +source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#109000b78ae048dae483340ed87c33dee6b5ae1b" dependencies = [ "darling", "proc-macro-crate", @@ -2627,9 +2626,9 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.0.18" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8af4c1ed8b78d7b7079d503b25df7b7cba2de8c5f879c5a22cc057c0bbe30a6" +checksum = "e1eca19770a61535e8f63979f664f7360d1bb57fa86c61a0efa476df59c6b2dd" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2641,9 +2640,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.0.18" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b39f2457a4fb9248188e1f61aea1303592746a41193365682052094bf08b171" +checksum = "03a91f785b0c1373b8070fedaf2ffbfb8d6d425c89de5cc45e6481c51768aa37" dependencies = [ "darling", "proc-macro-crate", @@ -2681,7 +2680,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#e2414d38030811a6517a2f00ef5ee549ab3d8837" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#910ab142daee272ee62b9b36be8eb0cdcdc7616d" dependencies = [ "either", "frame-metadata", diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 2f04444115..66c4288a5e 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -40,7 +40,7 @@ scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } scale-bits = "0.3" scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } -scale-encode = "0.0.18" +scale-encode = "0.1.0" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 42562c063e..ca19964229 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -25,7 +25,6 @@ regex = "1.5.0" scale-info = { version = "2.0.0", features = ["bit-vec"] } sp-core = { version = "18.0.0", default-features = false } sp-keyring = "20.0.0" -sp-runtime = "20.0.0" syn = "1.0.109" subxt = { version = "0.27.1", path = "../../subxt" } subxt-codegen = { version = "0.27.1", path = "../../codegen" } From e5b538c43e146e898be8ebd018ae9495a04a252e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 13 Mar 2023 13:05:05 +0000 Subject: [PATCH 16/31] update deps and use released scale-decode --- Cargo.lock | 298 ++++++++++++++++++++--------------------------- subxt/Cargo.toml | 2 +- 2 files changed, 128 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f493bad260..40cc315390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,19 +130,18 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2", "quote", @@ -201,9 +200,9 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "basic-toml" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" dependencies = [ "serde", ] @@ -276,9 +275,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array 0.14.6", ] @@ -354,9 +353,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "num-integer", @@ -531,9 +530,9 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.93.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af684f7f7b01427b1942c7102673322a51b9d6f261e9663dc5e5595786775531" +checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705" dependencies = [ "serde", ] @@ -700,9 +699,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" dependencies = [ "cc", "cxxbridge-flags", @@ -712,9 +711,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" dependencies = [ "cc", "codespan-reporting", @@ -727,15 +726,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" +checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" [[package]] name = "cxxbridge-macro" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" dependencies = [ "proc-macro2", "quote", @@ -744,9 +743,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -754,9 +753,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", @@ -768,9 +767,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", @@ -829,7 +828,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", "subtle", ] @@ -963,15 +962,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fixed-hash" version = "0.8.0" @@ -1019,9 +1009,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -1034,9 +1024,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -1044,15 +1034,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -1062,30 +1052,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" - -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2", "quote", @@ -1094,15 +1069,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-timer" @@ -1116,9 +1091,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-channel", "futures-core", @@ -1418,9 +1393,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -1542,15 +1517,6 @@ dependencies = [ "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "integer-sqrt" version = "0.1.5" @@ -1586,9 +1552,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" dependencies = [ "libc", "windows-sys 0.45.0", @@ -1617,9 +1583,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" @@ -1741,9 +1707,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libm" @@ -2122,12 +2088,6 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - [[package]] name = "parking_lot" version = "0.12.1" @@ -2153,9 +2113,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -2308,9 +2268,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] @@ -2326,9 +2286,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "50686e0021c4136d1d453b2dfe059902278681512a34d4248435dc34b6b5c8ec" dependencies = [ "proc-macro2", ] @@ -2412,9 +2372,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -2422,9 +2382,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2443,18 +2403,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" +checksum = "a9af2cf09ef80e610097515e80095b7f76660a92743c4185aff5406cd5ce3dd5" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" +checksum = "9c501201393982e275433bc55de7d6ae6f00e7699cd5572c5b57581cd69c881b" dependencies = [ "proc-macro2", "quote", @@ -2522,9 +2482,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" dependencies = [ "bitflags", "errno", @@ -2569,15 +2529,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "same-file" @@ -2601,8 +2561,9 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#109000b78ae048dae483340ed87c33dee6b5ae1b" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e5527e4b3bf079d4c0b2f253418598c380722ba37ef20fac9088081407f2b6" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2614,8 +2575,9 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.4.0" -source = "git+https://github.com/paritytech/scale-decode?branch=jsdw-decode-as-type#109000b78ae048dae483340ed87c33dee6b5ae1b" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38741b2f78e4391b94eac6b102af0f6ea2b0f7fe65adb55d7f4004f507854db" dependencies = [ "darling", "proc-macro-crate", @@ -2626,9 +2588,9 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1eca19770a61535e8f63979f664f7360d1bb57fa86c61a0efa476df59c6b2dd" +checksum = "15546e5efbb45f0fc2291f7e202dee8623274c5d8bbfdf9c6886cc8b44a7ced3" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2640,9 +2602,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a91f785b0c1373b8070fedaf2ffbfb8d6d425c89de5cc45e6481c51768aa37" +checksum = "dd983cf0a9effd76138554ead18a6de542d1af175ac12fd5e91836c5c0268082" dependencies = [ "darling", "proc-macro-crate", @@ -2680,7 +2642,7 @@ dependencies = [ [[package]] name = "scale-value" version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#910ab142daee272ee62b9b36be8eb0cdcdc7616d" +source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#3fbfc077f74ffaf7bdc54b515c4c171c83f0697c" dependencies = [ "either", "frame-metadata", @@ -2740,9 +2702,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -2812,18 +2774,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" dependencies = [ "proc-macro2", "quote", @@ -2832,9 +2794,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "itoa", "ryu", @@ -2932,9 +2894,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3594,18 +3556,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", @@ -3668,9 +3630,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -3681,7 +3643,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -3729,9 +3691,9 @@ checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.19.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" +checksum = "7082a95d48029677a28f181e5f6422d0c8339ad8396a39d3f33d62a90c1f6c30" dependencies = [ "indexmap", "toml_datetime", @@ -3874,9 +3836,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.77" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" +checksum = "db3115bddce1b5f52dd4b5e0ec8298a66ce733e4cc6759247dc2d1c11508ec38" dependencies = [ "basic-toml", "glob 0.3.1", @@ -3930,15 +3892,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -4013,12 +3975,6 @@ dependencies = [ "glob 0.2.11", ] -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" version = "2.3.2" @@ -4163,9 +4119,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9010891d0b8e367c3be94ca35d7bc25c1de3240463bb1d61bcfc8c2233c4e0d0" +checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632" dependencies = [ "anyhow", "bincode", @@ -4188,18 +4144,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65805c663eaa8257b910666f6d4b056b5c7329750da754ba5df54f3af7dbf35c" +checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-environ" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f964bb0b91fa021b8d1b488c62cc77b346c1dae6e3ebd010050b57c1f2ca657" +checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883" dependencies = [ "anyhow", "cranelift-entity", @@ -4216,9 +4172,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a1d06f5d109539e0168fc74fa65e3948ac8dac3bb8cdbd08b62b36a0ae27b8" +checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -4239,18 +4195,18 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76ef2e410329aaf8555ac6571d6fe07711be0646dcdf7ff3ab750a42ed2e583" +checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "once_cell", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1fd0f0dd79e7cc0f55b102e320d7c77ab76cd272008a8fd98e25b5777e2636" +checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064" dependencies = [ "cfg-if", "libc", @@ -4259,9 +4215,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271aef9b4ca2e953a866293683f2db33cda46f6933c5e431e68d8373723d4ab6" +checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d" dependencies = [ "anyhow", "cc", @@ -4283,9 +4239,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18144b0e45479a830ac9fcebfc71a16d90dc72d8ebd5679700eb3bfe974d7df" +checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2" dependencies = [ "cranelift-entity", "serde", @@ -4447,9 +4403,9 @@ checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winnow" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658" +checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f" dependencies = [ "memchr", ] diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 66c4288a5e..8f1fef9d52 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -39,7 +39,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = "2.0.0" scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } scale-bits = "0.3" -scale-decode = { git = "https://github.com/paritytech/scale-decode", branch = "jsdw-decode-as-type" } +scale-decode = "0.5.0" scale-encode = "0.1.0" futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" From 426049292722f65e24965c07587469f093a3c0b0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 13 Mar 2023 15:18:10 +0000 Subject: [PATCH 17/31] update scale-value to latest to remove git branch --- Cargo.lock | 41 +++++++++++++++++++++-------------------- subxt/Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40cc315390..7e7e065cc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2641,8 +2641,9 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.6.0" -source = "git+https://github.com/paritytech/scale-value?branch=jsdw-decode-as-type#3fbfc077f74ffaf7bdc54b515c4c171c83f0697c" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f549769261561e6764218f847e500588f9a79a289de49ce92f9e26642a3574" dependencies = [ "either", "frame-metadata", @@ -4346,9 +4347,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -4361,45 +4362,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winnow" @@ -4427,9 +4428,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "yap" -version = "0.7.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" +checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" [[package]] name = "zeroize" diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 8f1fef9d52..52ac593cf9 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -37,7 +37,7 @@ jsonrpsee-web = ["jsonrpsee/async-wasm-client", "jsonrpsee/client-web-transport" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } scale-info = "2.0.0" -scale-value = { git = "https://github.com/paritytech/scale-value", branch = "jsdw-decode-as-type" } +scale-value = "0.7.0" scale-bits = "0.3" scale-decode = "0.5.0" scale-encode = "0.1.0" From fbd544302a3c72afe368f8825377080393a0137d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 13 Mar 2023 15:37:58 +0000 Subject: [PATCH 18/31] Apply suggestions from code review Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> --- subxt/src/events/events_type.rs | 2 +- subxt/src/metadata/metadata_type.rs | 2 +- subxt/src/utils/wrapper_opaque.rs | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 033dbaf9ca..88ba95503e 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -429,7 +429,7 @@ impl EventDetails { /// little help via codegen. #[doc(hidden)] pub trait RootEvent: Sized { - /// Given details of the pallet event we wawnt to decode, and the name of the pallet, try to hand + /// Given details of the pallet event we want to decode, and the name of the pallet, try to hand /// back a "root event". fn root_event( pallet_bytes: &[u8], diff --git a/subxt/src/metadata/metadata_type.rs b/subxt/src/metadata/metadata_type.rs index c166fcc55b..2ae83f31d1 100644 --- a/subxt/src/metadata/metadata_type.rs +++ b/subxt/src/metadata/metadata_type.rs @@ -84,7 +84,7 @@ struct MetadataInner { // Errors are hashed by pallet and error index (decode oriented) errors: HashMap<(u8, u8), ErrorMetadata>, - // Other apllet details are hashed by pallet name. + // Other pallet details are hashed by pallet name. pallets: HashMap, // Type of the DispatchError type, which is what comes back if diff --git a/subxt/src/utils/wrapper_opaque.rs b/subxt/src/utils/wrapper_opaque.rs index 44ef5842ca..c92ec18985 100644 --- a/subxt/src/utils/wrapper_opaque.rs +++ b/subxt/src/utils/wrapper_opaque.rs @@ -100,7 +100,10 @@ impl EncodeAsType for WrapperKeepOpaque { // Do a basic check that the target shape lines up. let scale_info::TypeDef::Composite(_) = ty.type_def() else { - return Err(Error::new(ErrorKind::WrongShape { actual: Kind::Struct, expected: type_id })) + return Err(Error::new(ErrorKind::WrongShape { + actual: Kind::Struct, + expected: type_id, + })) }; // Check that the name also lines up. @@ -111,7 +114,7 @@ impl EncodeAsType for WrapperKeepOpaque { })) } - // Just blat the bytes out.. + // Just blat the bytes out. self.data.encode_to(out); Ok(()) } @@ -150,7 +153,7 @@ impl Visitor for WrapperKeepOpaqueVisitor { .expect("length checked")?; let field = value.next().expect("length checked")?; - // Sanity check that the compact length we decoded lines up with the number of bytes encoded inthe next field. + // Sanity check that the compact length we decoded lines up with the number of bytes encoded in the next field. if field.bytes().len() != len as usize { return Err(Error::new(ErrorKind::Custom("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len".into()))) } From 891800b1ab17dbe3dab5b90fbaa635ea94af8a7b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Mar 2023 10:44:54 +0000 Subject: [PATCH 19/31] remove sorting in derives/attr generation; spit them out in order given --- codegen/src/types/derives.rs | 20 ++++---------------- subxt/src/utils/wrapper_opaque.rs | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs index 1513fb7e6b..73c394e37d 100644 --- a/codegen/src/types/derives.rs +++ b/codegen/src/types/derives.rs @@ -143,27 +143,15 @@ impl Derives { impl quote::ToTokens for Derives { fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { if !self.derives.is_empty() { - let mut sorted = self.derives.iter().cloned().collect::>(); - sorted.sort_by(|a, b| { - quote::quote!(#a) - .to_string() - .cmp("e::quote!(#b).to_string()) - }); - + let derives_iter = self.derives.iter(); tokens.extend(quote::quote! { - #[derive(#( #sorted ),*)] + #[derive(#( #derives_iter ),*)] }) } if !self.attributes.is_empty() { - let mut sorted = self.attributes.iter().cloned().collect::>(); - sorted.sort_by(|a, b| { - quote::quote!(#a) - .to_string() - .cmp("e::quote!(#b).to_string()) - }); - + let attrs_iter = self.attributes.iter(); tokens.extend(quote::quote! { - #( #sorted )* + #( #attrs_iter )* }) } } diff --git a/subxt/src/utils/wrapper_opaque.rs b/subxt/src/utils/wrapper_opaque.rs index c92ec18985..2bf81954ef 100644 --- a/subxt/src/utils/wrapper_opaque.rs +++ b/subxt/src/utils/wrapper_opaque.rs @@ -155,7 +155,7 @@ impl Visitor for WrapperKeepOpaqueVisitor { // Sanity check that the compact length we decoded lines up with the number of bytes encoded in the next field. if field.bytes().len() != len as usize { - return Err(Error::new(ErrorKind::Custom("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len".into()))) + return Err(Error::new(ErrorKind::Custom("WrapperTypeKeepOpaque compact encoded length doesn't line up with encoded byte len".into()))); } Ok(WrapperKeepOpaque { From a252b67320e7c8f738809460e9eeb22e1126799f Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 16 Mar 2023 17:06:55 +0000 Subject: [PATCH 20/31] re-add derive sorting; it's a hashmap --- codegen/src/types/derives.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/codegen/src/types/derives.rs b/codegen/src/types/derives.rs index 73c394e37d..1513fb7e6b 100644 --- a/codegen/src/types/derives.rs +++ b/codegen/src/types/derives.rs @@ -143,15 +143,27 @@ impl Derives { impl quote::ToTokens for Derives { fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { if !self.derives.is_empty() { - let derives_iter = self.derives.iter(); + let mut sorted = self.derives.iter().cloned().collect::>(); + sorted.sort_by(|a, b| { + quote::quote!(#a) + .to_string() + .cmp("e::quote!(#b).to_string()) + }); + tokens.extend(quote::quote! { - #[derive(#( #derives_iter ),*)] + #[derive(#( #sorted ),*)] }) } if !self.attributes.is_empty() { - let attrs_iter = self.attributes.iter(); + let mut sorted = self.attributes.iter().cloned().collect::>(); + sorted.sort_by(|a, b| { + quote::quote!(#a) + .to_string() + .cmp("e::quote!(#b).to_string()) + }); + tokens.extend(quote::quote! { - #( #attrs_iter )* + #( #sorted )* }) } } From b38ae8eb6ad2e2872519175d78f12f6bcb56f825 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Mar 2023 18:19:54 +0000 Subject: [PATCH 21/31] StaticTxPayload and DynamicTxPayload rolled into single Payload struct --- codegen/src/api/calls.rs | 4 +- subxt/src/tx/mod.rs | 4 +- subxt/src/tx/tx_payload.rs | 177 +- .../integration-tests/src/codegen/polkadot.rs | 1620 ++++++++--------- 4 files changed, 893 insertions(+), 912 deletions(-) diff --git a/codegen/src/api/calls.rs b/codegen/src/api/calls.rs index 2f05a30815..a9db65aee7 100644 --- a/codegen/src/api/calls.rs +++ b/codegen/src/api/calls.rs @@ -104,8 +104,8 @@ pub fn generate_calls( pub fn #fn_name( &self, #( #call_fn_args, )* - ) -> #crate_path::tx::StaticTxPayload<#struct_name> { - #crate_path::tx::StaticTxPayload::new( + ) -> #crate_path::tx::Payload<#struct_name> { + #crate_path::tx::Payload::new_static( #pallet_name, #call_name, #struct_name { #( #call_args, )* }, diff --git a/subxt/src/tx/mod.rs b/subxt/src/tx/mod.rs index 2c52645e22..6063b957dc 100644 --- a/subxt/src/tx/mod.rs +++ b/subxt/src/tx/mod.rs @@ -27,8 +27,8 @@ pub use self::{ }, tx_payload::{ dynamic, - DynamicTxPayload, - StaticTxPayload, + Payload, + BoxedPayload, TxPayload, }, tx_progress::{ diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index c5d8d57e29..70249f328e 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -18,6 +18,7 @@ use scale_value::{ Variant, }; use std::borrow::Cow; +use std::sync::Arc; /// This represents a transaction payload that can be submitted /// to a node. @@ -55,31 +56,64 @@ pub struct ValidationDetails<'a> { pub hash: [u8; 32], } -/// This represents a statically generated transaction payload. +/// A transaction payload containing some generic `CallData`. #[derive(Clone, Debug)] -pub struct StaticTxPayload { - pallet_name: &'static str, - call_name: &'static str, +pub struct Payload { + pallet_name: Cow<'static, str>, + call_name: Cow<'static, str>, call_data: CallData, validation_hash: Option<[u8; 32]>, } -impl StaticTxPayload { - /// Create a new [`StaticTxPayload`] from static data. +/// A boxed transaction payload. +// Dev Note: Arc used to enable easy cloning (given that we can't have dyn Clone). +pub type BoxedPayload = Payload>; + +impl Payload { + /// Create a new [`Payload`]. pub fn new( + pallet_name: impl Into, + call_name: impl Into, + call_data: CallData, + ) -> Self { + Payload { + pallet_name: Cow::Owned(pallet_name.into()), + call_name: Cow::Owned(call_name.into()), + call_data, + validation_hash: None, + } + } + + /// Create a new [`Payload`] using static strings for the pallet and call name. + /// This is only expected to be used from codegen. + #[doc(hidden)] + pub fn new_static( pallet_name: &'static str, call_name: &'static str, call_data: CallData, validation_hash: [u8; 32], ) -> Self { - StaticTxPayload { - pallet_name, - call_name, + Payload { + pallet_name: Cow::Borrowed(pallet_name), + call_name: Cow::Borrowed(call_name), call_data, validation_hash: Some(validation_hash), } } + /// Box the payload. + pub fn boxed(self) -> BoxedPayload + where + CallData: EncodeAsFields + Send + Sync + 'static + { + BoxedPayload { + pallet_name: self.pallet_name, + call_name:self.call_name, + call_data: Arc::new(self.call_data), + validation_hash: self.validation_hash + } + } + /// Do not validate this call prior to submitting it. pub fn unvalidated(self) -> Self { Self { @@ -94,59 +128,16 @@ impl StaticTxPayload { } } -impl TxPayload for StaticTxPayload { - fn encode_call_data_to( - &self, - metadata: &Metadata, - out: &mut Vec, - ) -> Result<(), Error> { - encode_tx_payload( - self.pallet_name, - self.call_name, - &self.call_data, - metadata, - out, - ) - } - - fn validation_details(&self) -> Option> { - self.validation_hash.map(|hash| { - ValidationDetails { - pallet_name: self.pallet_name, - call_name: self.call_name, - hash, - } - }) - } -} - -/// This represents a dynamically generated transaction payload. -#[derive(Clone, Debug)] -pub struct DynamicTxPayload<'a> { - pallet_name: Cow<'a, str>, - call_name: Cow<'a, str>, - fields: Composite<()>, -} - -impl<'a> DynamicTxPayload<'a> { - /// Return the pallet name. - pub fn pallet_name(&self) -> &str { - &self.pallet_name - } - - /// Return the call name. - pub fn call_name(&self) -> &str { - &self.call_name - } - - /// Convert the dynamic payload into a [`Value`]. This is useful - /// if you need to submit this as part of a larger call. +impl Payload> { + /// Convert the dynamic `Composite` payload into a [`Value`]. + /// This is useful if you want to use this as an argument for a + /// larger dynamic call that wants to use this as a nested call. pub fn into_value(self) -> Value<()> { let call = Value { context: (), value: ValueDef::Variant(Variant { name: self.call_name.into_owned(), - values: self.fields, + values: self.call_data, }), }; @@ -154,52 +145,42 @@ impl<'a> DynamicTxPayload<'a> { } } -/// Construct a new dynamic transaction payload to submit to a node. -pub fn dynamic<'a>( - pallet_name: impl Into>, - call_name: impl Into>, - fields: impl Into>, -) -> DynamicTxPayload<'a> { - DynamicTxPayload { - pallet_name: pallet_name.into(), - call_name: call_name.into(), - fields: fields.into(), - } -} - -impl<'a> TxPayload for DynamicTxPayload<'a> { +impl TxPayload for Payload { fn encode_call_data_to( &self, metadata: &Metadata, out: &mut Vec, ) -> Result<(), Error> { - encode_tx_payload( - &self.pallet_name, - &self.call_name, - &self.fields, - metadata, - out, - ) + let pallet = metadata.pallet(&self.pallet_name)?; + let call = pallet.call(&self.call_name)?; + + let pallet_index = pallet.index(); + let call_index = call.index(); + + pallet_index.encode_to(out); + call_index.encode_to(out); + + self.call_data.encode_as_fields_to(call.fields(), metadata.types(), out)?; + Ok(()) } -} -// We use this same logic to encode both static and dynamic tx payloads. -fn encode_tx_payload( - pallet_name: &str, - call_name: &str, - call_data: &CallData, - metadata: &Metadata, - out: &mut Vec, -) -> Result<(), Error> { - let pallet = metadata.pallet(pallet_name)?; - let call = pallet.call(call_name)?; - - let pallet_index = pallet.index(); - let call_index = call.index(); - - pallet_index.encode_to(out); - call_index.encode_to(out); - - call_data.encode_as_fields_to(call.fields(), metadata.types(), out)?; - Ok(()) + fn validation_details(&self) -> Option> { + self.validation_hash.map(|hash| { + ValidationDetails { + pallet_name: &*self.pallet_name, + call_name: &*self.call_name, + hash, + } + }) + } } + +/// Construct a transaction at runtime; essentially an alias to [`Payload::new()`] +/// which provides a [`Composite`] value for the call data. +pub fn dynamic( + pallet_name: impl Into, + call_name: impl Into, + call_data: impl Into>, +) -> Payload> { + Payload::new(pallet_name, call_name, call_data.into()) +} \ No newline at end of file diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 21ef19b5e3..8c12421f3f 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -292,8 +292,8 @@ pub mod api { pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "remark", Remark { remark }, @@ -309,8 +309,8 @@ pub mod api { pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "set_heap_pages", SetHeapPages { pages }, @@ -337,8 +337,8 @@ pub mod api { pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "set_code", SetCode { code }, @@ -362,8 +362,8 @@ pub mod api { pub fn set_code_without_checks( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "set_code_without_checks", SetCodeWithoutChecks { code }, @@ -382,8 +382,8 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "set_storage", SetStorage { items }, @@ -399,8 +399,8 @@ pub mod api { pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "kill_storage", KillStorage { keys }, @@ -420,8 +420,8 @@ pub mod api { &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "kill_prefix", KillPrefix { prefix, subkeys }, @@ -437,8 +437,8 @@ pub mod api { pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "System", "remark_with_event", RemarkWithEvent { remark }, @@ -1270,8 +1270,8 @@ pub mod api { calls: ::std::vec::Vec< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "batch", Batch { calls }, @@ -1300,8 +1300,8 @@ pub mod api { &self, index: ::core::primitive::u16, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "as_derivative", AsDerivative { @@ -1335,8 +1335,8 @@ pub mod api { calls: ::std::vec::Vec< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "batch_all", BatchAll { calls }, @@ -1362,8 +1362,8 @@ pub mod api { &self, as_origin: runtime_types::kitchensink_runtime::OriginCaller, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "dispatch_as", DispatchAs { @@ -1397,8 +1397,8 @@ pub mod api { calls: ::std::vec::Vec< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "force_batch", ForceBatch { calls }, @@ -1420,8 +1420,8 @@ pub mod api { &self, call: runtime_types::kitchensink_runtime::RuntimeCall, weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Utility", "with_weight", WithWeight { @@ -1638,8 +1638,8 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Babe", "report_equivocation", ReportEquivocation { @@ -1668,9 +1668,9 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Babe", "report_equivocation_unsigned", ReportEquivocationUnsigned { @@ -1694,8 +1694,8 @@ pub mod api { pub fn plan_config_change( &self, config : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Babe", "plan_config_change", PlanConfigChange { config }, @@ -2223,8 +2223,8 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Timestamp", "set", Set { now }, @@ -2348,8 +2348,8 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Authorship", "set_uncles", SetUncles { new_uncles }, @@ -2566,8 +2566,8 @@ pub mod api { pub fn claim( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Indices", "claim", Claim { index }, @@ -2606,8 +2606,8 @@ pub mod api { ::core::primitive::u32, >, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Indices", "transfer", Transfer { new, index }, @@ -2640,8 +2640,8 @@ pub mod api { pub fn free( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Indices", "free", Free { index }, @@ -2682,8 +2682,8 @@ pub mod api { >, index: ::core::primitive::u32, freeze: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Indices", "force_transfer", ForceTransfer { new, index, freeze }, @@ -2716,8 +2716,8 @@ pub mod api { pub fn freeze( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Indices", "freeze", Freeze { index }, @@ -3021,8 +3021,8 @@ pub mod api { ::core::primitive::u32, >, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "transfer", Transfer { dest, value }, @@ -3050,8 +3050,8 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "set_balance", SetBalance { @@ -3084,8 +3084,8 @@ pub mod api { ::core::primitive::u32, >, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "force_transfer", ForceTransfer { @@ -3114,8 +3114,8 @@ pub mod api { ::core::primitive::u32, >, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "transfer_keep_alive", TransferKeepAlive { dest, value }, @@ -3151,8 +3151,8 @@ pub mod api { ::core::primitive::u32, >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "transfer_all", TransferAll { dest, keep_alive }, @@ -3174,8 +3174,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Balances", "force_unreserve", ForceUnreserve { who, amount }, @@ -3934,8 +3934,8 @@ pub mod api { &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >, witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "submit_unsigned", SubmitUnsigned { @@ -3960,9 +3960,9 @@ pub mod api { maybe_next_score: ::core::option::Option< runtime_types::sp_npos_elections::ElectionScore, >, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "set_minimum_untrusted_score", SetMinimumUntrustedScore { maybe_next_score }, @@ -3990,9 +3990,9 @@ pub mod api { ::subxt::utils::AccountId32, >, )>, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "set_emergency_election_result", SetEmergencyElectionResult { supports }, @@ -4016,8 +4016,8 @@ pub mod api { pub fn submit( &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "submit", Submit { @@ -4039,8 +4039,8 @@ pub mod api { &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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ElectionProviderMultiPhase", "governance_fallback", GovernanceFallback { @@ -5174,8 +5174,8 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "bond", Bond { @@ -5209,8 +5209,8 @@ pub mod api { pub fn bond_extra( &self, max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "bond_extra", BondExtra { max_additional }, @@ -5244,8 +5244,8 @@ pub mod api { pub fn unbond( &self, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "unbond", Unbond { value }, @@ -5275,8 +5275,8 @@ pub mod api { pub fn withdraw_unbonded( &self, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "withdraw_unbonded", WithdrawUnbonded { num_slashing_spans }, @@ -5296,8 +5296,8 @@ pub mod api { pub fn validate( &self, prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "validate", Validate { prefs }, @@ -5328,8 +5328,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "nominate", Nominate { targets }, @@ -5352,8 +5352,8 @@ pub mod api { #[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( + pub fn chill(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "chill", Chill {}, @@ -5386,8 +5386,8 @@ pub mod api { payee: runtime_types::pallet_staking::RewardDestination< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_payee", SetPayee { payee }, @@ -5421,8 +5421,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_controller", SetController { controller }, @@ -5445,8 +5445,8 @@ pub mod api { pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_validator_count", SetValidatorCount { new }, @@ -5469,9 +5469,9 @@ pub mod api { pub fn increase_validator_count( &self, additional: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Staking", "increase_validator_count", IncreaseValidatorCount { additional }, @@ -5494,8 +5494,8 @@ pub mod api { pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "scale_validator_count", ScaleValidatorCount { factor }, @@ -5522,8 +5522,8 @@ pub mod api { #[doc = "- Weight: O(1)"] #[doc = "- Write: ForceEra"] #[doc = "# "] - pub fn force_no_eras(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn force_no_eras(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "force_no_eras", ForceNoEras {}, @@ -5551,8 +5551,8 @@ pub mod api { #[doc = "- Weight: O(1)"] #[doc = "- Write ForceEra"] #[doc = "# "] - pub fn force_new_era(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn force_new_era(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "force_new_era", ForceNewEra {}, @@ -5570,8 +5570,8 @@ pub mod api { pub fn set_invulnerables( &self, invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_invulnerables", SetInvulnerables { invulnerables }, @@ -5590,8 +5590,8 @@ pub mod api { &self, stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "force_unstake", ForceUnstake { @@ -5617,8 +5617,8 @@ pub mod api { #[doc = "have enough blocks to get a result."] pub fn force_new_era_always( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "force_new_era_always", ForceNewEraAlways {}, @@ -5639,8 +5639,8 @@ pub mod api { &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "cancel_deferred_slash", CancelDeferredSlash { era, slash_indices }, @@ -5677,8 +5677,8 @@ pub mod api { &self, validator_stash: ::subxt::utils::AccountId32, era: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "payout_stakers", PayoutStakers { @@ -5705,8 +5705,8 @@ pub mod api { pub fn rebond( &self, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "rebond", Rebond { value }, @@ -5734,8 +5734,8 @@ pub mod api { &self, stash: ::subxt::utils::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "reap_stash", ReapStash { @@ -5769,8 +5769,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "kick", Kick { who }, @@ -5807,8 +5807,8 @@ pub mod api { 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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_staking_configs", SetStakingConfigs { @@ -5856,8 +5856,8 @@ pub mod api { pub fn chill_other( &self, controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "chill_other", ChillOther { controller }, @@ -5875,9 +5875,9 @@ pub mod api { pub fn force_apply_min_commission( &self, validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Staking", "force_apply_min_commission", ForceApplyMinCommission { validator_stash }, @@ -5896,8 +5896,8 @@ pub mod api { pub fn set_min_commission( &self, new: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Staking", "set_min_commission", SetMinCommission { new }, @@ -7809,8 +7809,8 @@ pub mod api { &self, keys: runtime_types::kitchensink_runtime::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Session", "set_keys", SetKeys { keys, proof }, @@ -7838,8 +7838,8 @@ pub mod api { #[doc = "- DbWrites: `NextKeys`, `origin account`"] #[doc = "- DbWrites per key id: `KeyOwner`"] #[doc = "# "] - pub fn purge_keys(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn purge_keys(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Session", "purge_keys", PurgeKeys {}, @@ -8362,8 +8362,8 @@ pub mod api { runtime_types::kitchensink_runtime::RuntimeCall, >, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "propose", Propose { proposal, value }, @@ -8384,8 +8384,8 @@ pub mod api { pub fn second( &self, proposal: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "second", Second { proposal }, @@ -8410,8 +8410,8 @@ pub mod api { vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "vote", Vote { ref_index, vote }, @@ -8434,8 +8434,8 @@ pub mod api { pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "emergency_cancel", EmergencyCancel { ref_index }, @@ -8458,8 +8458,8 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "external_propose", ExternalPropose { proposal }, @@ -8487,9 +8487,9 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Democracy", "external_propose_majority", ExternalProposeMajority { proposal }, @@ -8517,9 +8517,9 @@ pub mod api { proposal: runtime_types::frame_support::traits::preimages::Bounded< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Democracy", "external_propose_default", ExternalProposeDefault { proposal }, @@ -8552,8 +8552,8 @@ pub mod api { proposal_hash: ::subxt::utils::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "fast_track", FastTrack { @@ -8581,8 +8581,8 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "veto_external", VetoExternal { proposal_hash }, @@ -8604,8 +8604,8 @@ pub mod api { pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "cancel_referendum", CancelReferendum { ref_index }, @@ -8645,8 +8645,8 @@ pub mod api { >, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "delegate", Delegate { @@ -8674,8 +8674,8 @@ pub mod api { #[doc = ""] #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] #[doc = " voted on. Weight is charged as if maximum votes."] - pub fn undelegate(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn undelegate(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "undelegate", Undelegate {}, @@ -8694,8 +8694,8 @@ pub mod api { #[doc = "Weight: `O(1)`."] pub fn clear_public_proposals( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "clear_public_proposals", ClearPublicProposals {}, @@ -8720,8 +8720,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "unlock", Unlock { target }, @@ -8763,8 +8763,8 @@ pub mod api { pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "remove_vote", RemoveVote { index }, @@ -8798,8 +8798,8 @@ pub mod api { ::core::primitive::u32, >, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "remove_other_vote", RemoveOtherVote { target, index }, @@ -8830,8 +8830,8 @@ pub mod api { &self, proposal_hash: ::subxt::utils::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "blacklist", Blacklist { @@ -8856,8 +8856,8 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Democracy", "cancel_proposal", CancelProposal { prop_index }, @@ -9928,8 +9928,8 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "set_members", SetMembers { @@ -9960,8 +9960,8 @@ pub mod api { &self, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "execute", Execute { @@ -10008,8 +10008,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "propose", Propose { @@ -10045,8 +10045,8 @@ pub mod api { proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "vote", Vote { @@ -10100,8 +10100,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "close_old_weight", CloseOldWeight { @@ -10135,8 +10135,8 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "disapprove_proposal", DisapproveProposal { proposal_hash }, @@ -10186,8 +10186,8 @@ pub mod api { 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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Council", "close", Close { @@ -10691,8 +10691,8 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "set_members", SetMembers { @@ -10723,8 +10723,8 @@ pub mod api { &self, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "execute", Execute { @@ -10771,8 +10771,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "propose", Propose { @@ -10808,8 +10808,8 @@ pub mod api { proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "vote", Vote { @@ -10863,8 +10863,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "close_old_weight", CloseOldWeight { @@ -10898,8 +10898,8 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "disapprove_proposal", DisapproveProposal { proposal_hash }, @@ -10949,8 +10949,8 @@ pub mod api { 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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalCommittee", "close", Close { @@ -11415,8 +11415,8 @@ pub mod api { &self, votes: ::std::vec::Vec<::subxt::utils::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "vote", Vote { votes, value }, @@ -11433,8 +11433,8 @@ pub mod api { #[doc = "This removes the lock and returns the deposit."] #[doc = ""] #[doc = "The dispatch origin of this call must be signed and be a voter."] - pub fn remove_voter(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn remove_voter(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "remove_voter", RemoveVoter {}, @@ -11464,8 +11464,8 @@ pub mod api { pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "submit_candidacy", SubmitCandidacy { candidate_count }, @@ -11498,8 +11498,8 @@ pub mod api { pub fn renounce_candidacy( &self, renouncing: runtime_types::pallet_elections_phragmen::Renouncing, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "renounce_candidacy", RenounceCandidacy { renouncing }, @@ -11537,8 +11537,8 @@ pub mod api { >, slash_bond: ::core::primitive::bool, rerun_election: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "remove_member", RemoveMember { @@ -11568,8 +11568,8 @@ pub mod api { &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Elections", "clean_defunct_voters", CleanDefunctVoters { @@ -12173,8 +12173,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "add_member", AddMember { who }, @@ -12195,8 +12195,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "remove_member", RemoveMember { who }, @@ -12223,8 +12223,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "swap_member", SwapMember { remove, add }, @@ -12243,8 +12243,8 @@ pub mod api { pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "reset_members", ResetMembers { members }, @@ -12267,8 +12267,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "change_key", ChangeKey { new }, @@ -12289,8 +12289,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "set_prime", SetPrime { who }, @@ -12305,8 +12305,8 @@ pub mod api { #[doc = "Remove the prime member if it exists."] #[doc = ""] #[doc = "May only be called from `T::PrimeOrigin`."] - pub fn clear_prime(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn clear_prime(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TechnicalMembership", "clear_prime", ClearPrime {}, @@ -12533,8 +12533,8 @@ pub mod api { &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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Grandpa", "report_equivocation", ReportEquivocation { @@ -12564,9 +12564,9 @@ pub mod api { &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::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Grandpa", "report_equivocation_unsigned", ReportEquivocationUnsigned { @@ -12599,8 +12599,8 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Grandpa", "note_stalled", NoteStalled { @@ -12960,8 +12960,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Treasury", "propose_spend", ProposeSpend { value, beneficiary }, @@ -12985,8 +12985,8 @@ pub mod api { pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Treasury", "reject_proposal", RejectProposal { proposal_id }, @@ -13011,8 +13011,8 @@ pub mod api { pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Treasury", "approve_proposal", ApproveProposal { proposal_id }, @@ -13039,8 +13039,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Treasury", "spend", Spend { @@ -13073,8 +13073,8 @@ pub mod api { pub fn remove_approval( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Treasury", "remove_approval", RemoveApproval { proposal_id }, @@ -13700,8 +13700,8 @@ pub mod api { ::subxt::ext::codec::Compact<::core::primitive::u128>, >, data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "call_old_weight", CallOldWeight { @@ -13730,9 +13730,9 @@ pub mod api { code: ::std::vec::Vec<::core::primitive::u8>, data: ::std::vec::Vec<::core::primitive::u8>, salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Contracts", "instantiate_with_code_old_weight", InstantiateWithCodeOldWeight { @@ -13762,8 +13762,8 @@ pub mod api { code_hash: ::subxt::utils::H256, data: ::std::vec::Vec<::core::primitive::u8>, salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "instantiate_old_weight", InstantiateOldWeight { @@ -13809,8 +13809,8 @@ pub mod api { ::subxt::ext::codec::Compact<::core::primitive::u128>, >, determinism: runtime_types::pallet_contracts::wasm::Determinism, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "upload_code", UploadCode { @@ -13833,8 +13833,8 @@ pub mod api { pub fn remove_code( &self, code_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "remove_code", RemoveCode { code_hash }, @@ -13863,8 +13863,8 @@ pub mod api { ::core::primitive::u32, >, code_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "set_code", SetCode { dest, code_hash }, @@ -13904,8 +13904,8 @@ pub mod api { ::subxt::ext::codec::Compact<::core::primitive::u128>, >, data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "call", Call { @@ -13959,8 +13959,8 @@ pub mod api { code: ::std::vec::Vec<::core::primitive::u8>, data: ::std::vec::Vec<::core::primitive::u8>, salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "instantiate_with_code", InstantiateWithCode { @@ -13994,8 +13994,8 @@ pub mod api { code_hash: ::subxt::utils::H256, data: ::std::vec::Vec<::core::primitive::u8>, salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Contracts", "instantiate", Instantiate { @@ -14719,8 +14719,8 @@ pub mod api { pub fn sudo( &self, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Sudo", "sudo", Sudo { @@ -14748,8 +14748,8 @@ pub mod api { &self, call: runtime_types::kitchensink_runtime::RuntimeCall, weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Sudo", "sudo_unchecked_weight", SudoUncheckedWeight { @@ -14780,8 +14780,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Sudo", "set_key", SetKey { new }, @@ -14811,8 +14811,8 @@ pub mod api { ::core::primitive::u32, >, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Sudo", "sudo_as", SudoAs { @@ -14955,8 +14955,8 @@ pub mod api { ::core::primitive::u32, >, signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ImOnline", "heartbeat", Heartbeat { @@ -15789,8 +15789,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "add_registrar", AddRegistrar { account }, @@ -15824,8 +15824,8 @@ pub mod api { pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "set_identity", SetIdentity { @@ -15866,8 +15866,8 @@ pub mod api { ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "set_subs", SetSubs { subs }, @@ -15899,8 +15899,8 @@ pub mod api { #[doc = "# "] pub fn clear_identity( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "clear_identity", ClearIdentity {}, @@ -15939,8 +15939,8 @@ pub mod api { &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "request_judgement", RequestJudgement { reg_index, max_fee }, @@ -15972,8 +15972,8 @@ pub mod api { pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "cancel_request", CancelRequest { reg_index }, @@ -16002,8 +16002,8 @@ pub mod api { &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "set_fee", SetFee { index, fee }, @@ -16035,8 +16035,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "set_account_id", SetAccountId { index, new }, @@ -16067,8 +16067,8 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "set_fields", SetFields { index, fields }, @@ -16111,8 +16111,8 @@ pub mod api { ::core::primitive::u128, >, identity: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "provide_judgement", ProvideJudgement { @@ -16154,8 +16154,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "kill_identity", KillIdentity { target }, @@ -16181,8 +16181,8 @@ pub mod api { ::core::primitive::u32, >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "add_sub", AddSub { sub, data }, @@ -16205,8 +16205,8 @@ pub mod api { ::core::primitive::u32, >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "rename_sub", RenameSub { sub, data }, @@ -16231,8 +16231,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "remove_sub", RemoveSub { sub }, @@ -16254,8 +16254,8 @@ pub mod api { #[doc = ""] #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] #[doc = "controller of an account is maliciously registered as a sub-account."] - pub fn quit_sub(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn quit_sub(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Identity", "quit_sub", QuitSub {}, @@ -16986,8 +16986,8 @@ pub mod api { pub fn bid( &self, value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "bid", Bid { value }, @@ -17021,8 +17021,8 @@ pub mod api { pub fn unbid( &self, pos: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "unbid", Unbid { pos }, @@ -17087,8 +17087,8 @@ pub mod api { >, value: ::core::primitive::u128, tip: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "vouch", Vouch { who, value, tip }, @@ -17120,8 +17120,8 @@ pub mod api { pub fn unvouch( &self, pos: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "unvouch", Unvouch { pos }, @@ -17159,8 +17159,8 @@ pub mod api { ::core::primitive::u32, >, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "vote", Vote { candidate, approve }, @@ -17191,8 +17191,8 @@ pub mod api { pub fn defender_vote( &self, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "defender_vote", DefenderVote { approve }, @@ -17225,8 +17225,8 @@ pub mod api { #[doc = ""] #[doc = "Total Complexity: O(M + logM + P + X)"] #[doc = "# "] - pub fn payout(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn payout(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "payout", Payout {}, @@ -17265,8 +17265,8 @@ pub mod api { >, max_members: ::core::primitive::u32, rules: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "found", Found { @@ -17295,8 +17295,8 @@ pub mod api { #[doc = ""] #[doc = "Total Complexity: O(1)"] #[doc = "# "] - pub fn unfound(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn unfound(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "unfound", Unfound {}, @@ -17343,8 +17343,8 @@ pub mod api { ::core::primitive::u32, >, forgive: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "judge_suspended_member", JudgeSuspendedMember { who, forgive }, @@ -17403,9 +17403,9 @@ pub mod api { ::core::primitive::u32, >, judgement: runtime_types::pallet_society::Judgement, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Society", "judge_suspended_candidate", JudgeSuspendedCandidate { who, judgement }, @@ -17434,8 +17434,8 @@ pub mod api { pub fn set_max_members( &self, max: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Society", "set_max_members", SetMaxMembers { max }, @@ -18604,8 +18604,8 @@ pub mod api { ::core::primitive::u32, >, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "as_recovered", AsRecovered { @@ -18638,8 +18638,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "set_recovered", SetRecovered { lost, rescuer }, @@ -18672,8 +18672,8 @@ pub mod api { friends: ::std::vec::Vec<::subxt::utils::AccountId32>, threshold: ::core::primitive::u16, delay_period: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "create_recovery", CreateRecovery { @@ -18706,8 +18706,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "initiate_recovery", InitiateRecovery { account }, @@ -18741,8 +18741,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "vouch_recovery", VouchRecovery { lost, rescuer }, @@ -18769,8 +18769,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "claim_recovery", ClaimRecovery { account }, @@ -18799,8 +18799,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "close_recovery", CloseRecovery { rescuer }, @@ -18825,8 +18825,8 @@ pub mod api { #[doc = "recoverable account (i.e. has a recovery configuration)."] pub fn remove_recovery( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "remove_recovery", RemoveRecovery {}, @@ -18851,8 +18851,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Recovery", "cancel_recovered", CancelRecovered { account }, @@ -19355,8 +19355,8 @@ pub mod api { #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = "# "] - pub fn vest(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn vest(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Vesting", "vest", Vest {}, @@ -19389,8 +19389,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Vesting", "vest_other", VestOther { target }, @@ -19429,8 +19429,8 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Vesting", "vested_transfer", VestedTransfer { target, schedule }, @@ -19474,8 +19474,8 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Vesting", "force_vested_transfer", ForceVestedTransfer { @@ -19516,8 +19516,8 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Vesting", "merge_schedules", MergeSchedules { @@ -19821,8 +19821,8 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "schedule", Schedule { @@ -19844,8 +19844,8 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "cancel", Cancel { when, index }, @@ -19868,8 +19868,8 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "schedule_named", ScheduleNamed { @@ -19891,8 +19891,8 @@ pub mod api { pub fn cancel_named( &self, id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "cancel_named", CancelNamed { id }, @@ -19918,8 +19918,8 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "schedule_after", ScheduleAfter { @@ -19951,8 +19951,8 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Scheduler", "schedule_named_after", ScheduleNamedAfter { @@ -20340,8 +20340,8 @@ pub mod api { pub fn note_preimage( &self, bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Preimage", "note_preimage", NotePreimage { bytes }, @@ -20362,8 +20362,8 @@ pub mod api { pub fn unnote_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Preimage", "unnote_preimage", UnnotePreimage { hash }, @@ -20382,8 +20382,8 @@ pub mod api { pub fn request_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Preimage", "request_preimage", RequestPreimage { hash }, @@ -20401,8 +20401,8 @@ pub mod api { pub fn unrequest_preimage( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Preimage", "unrequest_preimage", UnrequestPreimage { hash }, @@ -20780,8 +20780,8 @@ pub mod api { runtime_types::kitchensink_runtime::ProxyType, >, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "proxy", Proxy { @@ -20814,8 +20814,8 @@ pub mod api { >, proxy_type: runtime_types::kitchensink_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "add_proxy", AddProxy { @@ -20846,8 +20846,8 @@ pub mod api { >, proxy_type: runtime_types::kitchensink_runtime::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "remove_proxy", RemoveProxy { @@ -20871,8 +20871,8 @@ pub mod api { #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] pub fn remove_proxies( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "remove_proxies", RemoveProxies {}, @@ -20907,8 +20907,8 @@ pub mod api { proxy_type: runtime_types::kitchensink_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "create_pure", CreatePure { @@ -20950,8 +20950,8 @@ pub mod api { index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "kill_pure", KillPure { @@ -20991,8 +20991,8 @@ pub mod api { ::core::primitive::u32, >, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "announce", Announce { real, call_hash }, @@ -21021,8 +21021,8 @@ pub mod api { ::core::primitive::u32, >, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "remove_announcement", RemoveAnnouncement { real, call_hash }, @@ -21051,8 +21051,8 @@ pub mod api { ::core::primitive::u32, >, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "reject_announcement", RejectAnnouncement { @@ -21092,8 +21092,8 @@ pub mod api { runtime_types::kitchensink_runtime::ProxyType, >, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Proxy", "proxy_announced", ProxyAnnounced { @@ -21564,8 +21564,8 @@ pub mod api { &self, other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Multisig", "as_multi_threshold_1", AsMultiThreshold1 { @@ -21634,8 +21634,8 @@ pub mod api { >, call: runtime_types::kitchensink_runtime::RuntimeCall, max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Multisig", "as_multi", AsMulti { @@ -21697,8 +21697,8 @@ pub mod api { >, call_hash: [::core::primitive::u8; 32usize], max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Multisig", "approve_as_multi", ApproveAsMulti { @@ -21750,8 +21750,8 @@ pub mod api { ::core::primitive::u32, >, call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Multisig", "cancel_as_multi", CancelAsMulti { @@ -22124,8 +22124,8 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "propose_bounty", ProposeBounty { value, description }, @@ -22148,8 +22148,8 @@ pub mod api { pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "approve_bounty", ApproveBounty { bounty_id }, @@ -22176,8 +22176,8 @@ pub mod api { ::core::primitive::u32, >, fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "propose_curator", ProposeCurator { @@ -22214,8 +22214,8 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "unassign_curator", UnassignCurator { bounty_id }, @@ -22238,8 +22238,8 @@ pub mod api { pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "accept_curator", AcceptCurator { bounty_id }, @@ -22269,8 +22269,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "award_bounty", AwardBounty { @@ -22297,8 +22297,8 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "claim_bounty", ClaimBounty { bounty_id }, @@ -22323,8 +22323,8 @@ pub mod api { pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "close_bounty", CloseBounty { bounty_id }, @@ -22350,8 +22350,8 @@ pub mod api { &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Bounties", "extend_bounty_expiry", ExtendBountyExpiry { bounty_id, remark }, @@ -22930,8 +22930,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "report_awesome", ReportAwesome { reason, who }, @@ -22965,8 +22965,8 @@ pub mod api { pub fn retract_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "retract_tip", RetractTip { hash }, @@ -23008,8 +23008,8 @@ pub mod api { ::core::primitive::u32, >, tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "tip_new", TipNew { @@ -23053,8 +23053,8 @@ pub mod api { &self, hash: ::subxt::utils::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "tip", Tip { hash, tip_value }, @@ -23085,8 +23085,8 @@ pub mod api { pub fn close_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "close_tip", CloseTip { hash }, @@ -23113,8 +23113,8 @@ pub mod api { pub fn slash_tip( &self, hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Tips", "slash_tip", SlashTip { hash }, @@ -23953,8 +23953,8 @@ pub mod api { ::core::primitive::u32, >, min_balance: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "create", Create { @@ -23998,8 +23998,8 @@ pub mod api { >, is_sufficient: ::core::primitive::bool, min_balance: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_create", ForceCreate { @@ -24030,8 +24030,8 @@ pub mod api { pub fn start_destroy( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "start_destroy", StartDestroy { id }, @@ -24058,8 +24058,8 @@ pub mod api { pub fn destroy_accounts( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "destroy_accounts", DestroyAccounts { id }, @@ -24086,8 +24086,8 @@ pub mod api { pub fn destroy_approvals( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "destroy_approvals", DestroyApprovals { id }, @@ -24112,8 +24112,8 @@ pub mod api { pub fn finish_destroy( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "finish_destroy", FinishDestroy { id }, @@ -24145,8 +24145,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "mint", Mint { @@ -24185,8 +24185,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "burn", Burn { id, who, amount }, @@ -24224,8 +24224,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "transfer", Transfer { id, target, amount }, @@ -24263,8 +24263,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "transfer_keep_alive", TransferKeepAlive { id, target, amount }, @@ -24307,8 +24307,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_transfer", ForceTransfer { @@ -24342,8 +24342,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "freeze", Freeze { id, who }, @@ -24372,8 +24372,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "thaw", Thaw { id, who }, @@ -24397,8 +24397,8 @@ pub mod api { pub fn freeze_asset( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "freeze_asset", FreezeAsset { id }, @@ -24422,8 +24422,8 @@ pub mod api { pub fn thaw_asset( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "thaw_asset", ThawAsset { id }, @@ -24452,8 +24452,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "transfer_ownership", TransferOwnership { id, owner }, @@ -24492,8 +24492,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "set_team", SetTeam { @@ -24532,8 +24532,8 @@ pub mod api { name: ::std::vec::Vec<::core::primitive::u8>, symbol: ::std::vec::Vec<::core::primitive::u8>, decimals: ::core::primitive::u8, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "set_metadata", SetMetadata { @@ -24564,8 +24564,8 @@ pub mod api { pub fn clear_metadata( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "clear_metadata", ClearMetadata { id }, @@ -24598,8 +24598,8 @@ pub mod api { symbol: ::std::vec::Vec<::core::primitive::u8>, decimals: ::core::primitive::u8, is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_set_metadata", ForceSetMetadata { @@ -24631,8 +24631,8 @@ pub mod api { pub fn force_clear_metadata( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_clear_metadata", ForceClearMetadata { id }, @@ -24688,8 +24688,8 @@ pub mod api { min_balance: ::core::primitive::u128, is_sufficient: ::core::primitive::bool, is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_asset_status", ForceAssetStatus { @@ -24738,8 +24738,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "approve_transfer", ApproveTransfer { @@ -24775,8 +24775,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "cancel_approval", CancelApproval { id, delegate }, @@ -24812,8 +24812,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "force_cancel_approval", ForceCancelApproval { @@ -24859,8 +24859,8 @@ pub mod api { ::core::primitive::u32, >, amount: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "transfer_approved", TransferApproved { @@ -24889,8 +24889,8 @@ pub mod api { pub fn touch( &self, id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "touch", Touch { id }, @@ -24914,8 +24914,8 @@ pub mod api { &self, id: ::core::primitive::u32, allow_burn: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Assets", "refund", Refund { id, allow_burn }, @@ -25836,8 +25836,8 @@ pub mod api { pub fn buy_ticket( &self, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Lottery", "buy_ticket", BuyTicket { @@ -25862,8 +25862,8 @@ pub mod api { calls: ::std::vec::Vec< runtime_types::kitchensink_runtime::RuntimeCall, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Lottery", "set_calls", SetCalls { calls }, @@ -25891,8 +25891,8 @@ pub mod api { length: ::core::primitive::u32, delay: ::core::primitive::u32, repeat: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Lottery", "start_lottery", StartLottery { @@ -25913,8 +25913,8 @@ pub mod api { #[doc = "The lottery will continue to run to completion."] #[doc = ""] #[doc = "This extrinsic must be called by the `ManagerOrigin`."] - pub fn stop_repeat(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn stop_repeat(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Lottery", "stop_repeat", StopRepeat {}, @@ -26340,8 +26340,8 @@ pub mod api { &self, amount: ::core::primitive::u128, duration: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nis", "place_bid", PlaceBid { amount, duration }, @@ -26364,8 +26364,8 @@ pub mod api { &self, amount: ::core::primitive::u128, duration: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nis", "retract_bid", RetractBid { amount, duration }, @@ -26380,8 +26380,8 @@ pub mod api { #[doc = "Ensure we have sufficient funding for all potential payouts."] #[doc = ""] #[doc = "- `origin`: Must be accepted by `FundOrigin`."] - pub fn fund_deficit(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn fund_deficit(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nis", "fund_deficit", FundDeficit {}, @@ -26405,8 +26405,8 @@ pub mod api { &self, index: ::core::primitive::u32, portion: ::core::option::Option<::core::primitive::u128>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nis", "thaw", Thaw { index, portion }, @@ -27371,8 +27371,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "create", Create { collection, admin }, @@ -27409,8 +27409,8 @@ pub mod api { ::core::primitive::u32, >, free_holding: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "force_create", ForceCreate { @@ -27445,8 +27445,8 @@ pub mod api { &self, collection: ::core::primitive::u32, witness: runtime_types::pallet_uniques::types::DestroyWitness, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "destroy", Destroy { @@ -27480,8 +27480,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "mint", Mint { @@ -27522,8 +27522,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "burn", Burn { @@ -27564,8 +27564,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "transfer", Transfer { @@ -27602,8 +27602,8 @@ pub mod api { &self, collection: ::core::primitive::u32, items: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "redeposit", Redeposit { collection, items }, @@ -27629,8 +27629,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "freeze", Freeze { collection, item }, @@ -27656,8 +27656,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "thaw", Thaw { collection, item }, @@ -27681,8 +27681,8 @@ pub mod api { pub fn freeze_collection( &self, collection: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "freeze_collection", FreezeCollection { collection }, @@ -27706,8 +27706,8 @@ pub mod api { pub fn thaw_collection( &self, collection: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "thaw_collection", ThawCollection { collection }, @@ -27737,8 +27737,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "transfer_ownership", TransferOwnership { collection, owner }, @@ -27777,8 +27777,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_team", SetTeam { @@ -27817,8 +27817,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "approve_transfer", ApproveTransfer { @@ -27860,8 +27860,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "cancel_approval", CancelApproval { @@ -27914,8 +27914,8 @@ pub mod api { >, free_holding: ::core::primitive::bool, is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "force_item_status", ForceItemStatus { @@ -27962,8 +27962,8 @@ pub mod api { value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_attribute", SetAttribute { @@ -28001,8 +28001,8 @@ pub mod api { key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "clear_attribute", ClearAttribute { @@ -28043,8 +28043,8 @@ pub mod api { ::core::primitive::u8, >, is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_metadata", SetMetadata { @@ -28078,8 +28078,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "clear_metadata", ClearMetadata { collection, item }, @@ -28114,8 +28114,8 @@ pub mod api { ::core::primitive::u8, >, is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_collection_metadata", SetCollectionMetadata { @@ -28146,9 +28146,9 @@ pub mod api { pub fn clear_collection_metadata( &self, collection: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Uniques", "clear_collection_metadata", ClearCollectionMetadata { collection }, @@ -28173,8 +28173,8 @@ pub mod api { pub fn set_accept_ownership( &self, maybe_collection: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_accept_ownership", SetAcceptOwnership { maybe_collection }, @@ -28201,9 +28201,9 @@ pub mod api { &self, collection: ::core::primitive::u32, max_supply: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Uniques", "set_collection_max_supply", SetCollectionMaxSupply { @@ -28240,8 +28240,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "set_price", SetPrice { @@ -28272,8 +28272,8 @@ pub mod api { collection: ::core::primitive::u32, item: ::core::primitive::u32, bid_price: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Uniques", "buy_item", BuyItem { @@ -30022,8 +30022,8 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "create", Create { admin, config }, @@ -30061,8 +30061,8 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "force_create", ForceCreate { owner, config }, @@ -30093,8 +30093,8 @@ pub mod api { &self, collection: ::core::primitive::u32, witness: runtime_types::pallet_nfts::types::DestroyWitness, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "destroy", Destroy { @@ -30137,8 +30137,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "mint", Mint { @@ -30177,8 +30177,8 @@ pub mod api { ::core::primitive::u32, >, item_config: runtime_types::pallet_nfts::types::ItemConfig, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "force_mint", ForceMint { @@ -30220,8 +30220,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "burn", Burn { @@ -30260,8 +30260,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "transfer", Transfer { @@ -30298,8 +30298,8 @@ pub mod api { &self, collection: ::core::primitive::u32, items: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "redeposit", Redeposit { collection, items }, @@ -30325,8 +30325,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "lock_item_transfer", LockItemTransfer { collection, item }, @@ -30352,8 +30352,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "unlock_item_transfer", UnlockItemTransfer { collection, item }, @@ -30382,8 +30382,8 @@ pub mod api { lock_settings: runtime_types::pallet_nfts::types::BitFlags< runtime_types::pallet_nfts::types::CollectionSetting, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "lock_collection", LockCollection { @@ -30416,8 +30416,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "transfer_ownership", TransferOwnership { collection, owner }, @@ -30457,8 +30457,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_team", SetTeam { @@ -30492,8 +30492,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "force_collection_owner", ForceCollectionOwner { collection, owner }, @@ -30523,8 +30523,8 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "force_collection_config", ForceCollectionConfig { collection, config }, @@ -30559,8 +30559,8 @@ pub mod api { ::core::primitive::u32, >, maybe_deadline: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "approve_transfer", ApproveTransfer { @@ -30600,8 +30600,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "cancel_approval", CancelApproval { @@ -30635,9 +30635,9 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Nfts", "clear_all_transfer_approvals", ClearAllTransferApprovals { collection, item }, @@ -30672,8 +30672,8 @@ pub mod api { item: ::core::primitive::u32, lock_metadata: ::core::primitive::bool, lock_attributes: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "lock_item_properties", LockItemProperties { @@ -30723,8 +30723,8 @@ pub mod api { value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_attribute", SetAttribute { @@ -30771,8 +30771,8 @@ pub mod api { value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "force_set_attribute", ForceSetAttribute { @@ -30814,8 +30814,8 @@ pub mod api { key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "clear_attribute", ClearAttribute { @@ -30849,8 +30849,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "approve_item_attributes", ApproveItemAttributes { @@ -30885,9 +30885,9 @@ pub mod api { ::core::primitive::u32, >, witness : runtime_types :: pallet_nfts :: types :: CancelAttributesApprovalWitness, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Nfts", "cancel_item_attributes_approval", CancelItemAttributesApproval { @@ -30927,8 +30927,8 @@ pub mod api { data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_metadata", SetMetadata { @@ -30961,8 +30961,8 @@ pub mod api { &self, collection: ::core::primitive::u32, item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "clear_metadata", ClearMetadata { collection, item }, @@ -30995,8 +30995,8 @@ pub mod api { data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_collection_metadata", SetCollectionMetadata { collection, data }, @@ -31023,9 +31023,9 @@ pub mod api { pub fn clear_collection_metadata( &self, collection: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Nfts", "clear_collection_metadata", ClearCollectionMetadata { collection }, @@ -31050,8 +31050,8 @@ pub mod api { pub fn set_accept_ownership( &self, maybe_collection: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_accept_ownership", SetAcceptOwnership { maybe_collection }, @@ -31076,9 +31076,9 @@ pub mod api { &self, collection: ::core::primitive::u32, max_supply: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Nfts", "set_collection_max_supply", SetCollectionMaxSupply { @@ -31110,8 +31110,8 @@ pub mod api { ::core::primitive::u32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "update_mint_settings", UpdateMintSettings { @@ -31148,8 +31148,8 @@ pub mod api { ::core::primitive::u32, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "set_price", SetPrice { @@ -31180,8 +31180,8 @@ pub mod api { collection: ::core::primitive::u32, item: ::core::primitive::u32, bid_price: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "buy_item", BuyItem { @@ -31214,8 +31214,8 @@ pub mod api { ::core::primitive::u128, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "pay_tips", PayTips { tips }, @@ -31255,8 +31255,8 @@ pub mod api { >, >, duration: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "create_swap", CreateSwap { @@ -31288,8 +31288,8 @@ pub mod api { &self, offered_collection: ::core::primitive::u32, offered_item: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "cancel_swap", CancelSwap { @@ -31327,8 +31327,8 @@ pub mod api { ::core::primitive::u128, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Nfts", "claim_swap", ClaimSwap { @@ -32951,8 +32951,8 @@ pub mod api { pub fn store( &self, data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TransactionStorage", "store", Store { data }, @@ -32975,8 +32975,8 @@ pub mod api { &self, block: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TransactionStorage", "renew", Renew { block, index }, @@ -32999,8 +32999,8 @@ pub mod api { pub fn check_proof( &self, proof : runtime_types :: sp_transaction_storage_proof :: TransactionStorageProof, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "TransactionStorage", "check_proof", CheckProof { proof }, @@ -33336,8 +33336,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "VoterList", "rebag", Rebag { dislocated }, @@ -33363,8 +33363,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "VoterList", "put_in_front_of", PutInFrontOf { lighter }, @@ -33714,8 +33714,8 @@ pub mod api { pub fn control_auto_migration( &self, maybe_config : :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "control_auto_migration", ControlAutoMigration { maybe_config }, @@ -33753,8 +33753,8 @@ pub mod api { limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, real_size_upper: ::core::primitive::u32, witness_task : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationTask, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "continue_migrate", ContinueMigrate { @@ -33778,8 +33778,8 @@ pub mod api { &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, witness_size: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "migrate_custom_top", MigrateCustomTop { keys, witness_size }, @@ -33802,8 +33802,8 @@ pub mod api { root: ::std::vec::Vec<::core::primitive::u8>, child_keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, total_size: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "migrate_custom_child", MigrateCustomChild { @@ -33823,8 +33823,8 @@ pub mod api { pub fn set_signed_max_limits( &self, limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "set_signed_max_limits", SetSignedMaxLimits { limits }, @@ -33849,8 +33849,8 @@ pub mod api { &self, progress_top : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, progress_child : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "StateTrieMigration", "force_set_progress", ForceSetProgress { @@ -34204,8 +34204,8 @@ pub mod api { parent_bounty_id: ::core::primitive::u32, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "add_child_bounty", AddChildBounty { @@ -34245,8 +34245,8 @@ pub mod api { ::core::primitive::u32, >, fee: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "propose_curator", ProposeCurator { @@ -34286,8 +34286,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "accept_curator", AcceptCurator { @@ -34340,8 +34340,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "unassign_curator", UnassignCurator { @@ -34381,8 +34381,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "award_child_bounty", AwardChildBounty { @@ -34418,8 +34418,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "claim_child_bounty", ClaimChildBounty { @@ -34460,8 +34460,8 @@ pub mod api { &self, parent_bounty_id: ::core::primitive::u32, child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ChildBounties", "close_child_bounty", CloseChildBounty { @@ -34966,8 +34966,8 @@ pub mod api { runtime_types::kitchensink_runtime::RuntimeCall, >, enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "submit", Submit { @@ -34994,8 +34994,8 @@ pub mod api { pub fn place_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "place_decision_deposit", PlaceDecisionDeposit { index }, @@ -35017,8 +35017,8 @@ pub mod api { pub fn refund_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "refund_decision_deposit", RefundDecisionDeposit { index }, @@ -35039,8 +35039,8 @@ pub mod api { pub fn cancel( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "cancel", Cancel { index }, @@ -35061,8 +35061,8 @@ pub mod api { pub fn kill( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "kill", Kill { index }, @@ -35081,8 +35081,8 @@ pub mod api { pub fn nudge_referendum( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "nudge_referendum", NudgeReferendum { index }, @@ -35106,8 +35106,8 @@ pub mod api { pub fn one_fewer_deciding( &self, track: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Referenda", "one_fewer_deciding", OneFewerDeciding { track }, @@ -35129,9 +35129,9 @@ pub mod api { pub fn refund_submission_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Referenda", "refund_submission_deposit", RefundSubmissionDeposit { index }, @@ -35748,8 +35748,8 @@ pub mod api { pub fn store( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Remark", "store", Store { remark }, @@ -35813,8 +35813,8 @@ pub mod api { pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RootTesting", "fill_block", FillBlock { ratio }, @@ -35948,8 +35948,8 @@ pub mod api { vote: runtime_types::pallet_conviction_voting::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "vote", Vote { poll_index, vote }, @@ -35993,8 +35993,8 @@ pub mod api { >, conviction : runtime_types :: pallet_conviction_voting :: conviction :: Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "delegate", Delegate { @@ -36028,8 +36028,8 @@ pub mod api { pub fn undelegate( &self, class: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "undelegate", Undelegate { class }, @@ -36057,8 +36057,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "unlock", Unlock { class, target }, @@ -36103,8 +36103,8 @@ pub mod api { &self, class: ::core::option::Option<::core::primitive::u16>, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "remove_vote", RemoveVote { class, index }, @@ -36140,8 +36140,8 @@ pub mod api { >, class: ::core::primitive::u16, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "ConvictionVoting", "remove_other_vote", RemoveOtherVote { @@ -36433,8 +36433,8 @@ pub mod api { pub fn whitelist_call( &self, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Whitelist", "whitelist_call", WhitelistCall { call_hash }, @@ -36449,8 +36449,8 @@ pub mod api { pub fn remove_whitelisted_call( &self, call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Whitelist", "remove_whitelisted_call", RemoveWhitelistedCall { call_hash }, @@ -36467,9 +36467,9 @@ pub mod api { call_hash: ::subxt::utils::H256, call_encoded_len: ::core::primitive::u32, call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Whitelist", "dispatch_whitelisted_call", DispatchWhitelistedCall { @@ -36488,9 +36488,9 @@ pub mod api { pub fn dispatch_whitelisted_call_with_preimage( &self, call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Whitelist", "dispatch_whitelisted_call_with_preimage", DispatchWhitelistedCallWithPreimage { @@ -36771,8 +36771,8 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, prime: ::core::option::Option<::subxt::utils::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "set_members", SetMembers { @@ -36803,8 +36803,8 @@ pub mod api { &self, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "execute", Execute { @@ -36851,8 +36851,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "propose", Propose { @@ -36888,8 +36888,8 @@ pub mod api { proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "vote", Vote { @@ -36943,8 +36943,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "close_old_weight", CloseOldWeight { @@ -36978,8 +36978,8 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "disapprove_proposal", DisapproveProposal { proposal_hash }, @@ -37029,8 +37029,8 @@ pub mod api { 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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "AllianceMotion", "close", Close { @@ -37648,8 +37648,8 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::kitchensink_runtime::RuntimeCall, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "propose", Propose { @@ -37673,8 +37673,8 @@ pub mod api { proposal: ::subxt::utils::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "vote", Vote { @@ -37699,8 +37699,8 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: runtime_types::sp_weights::OldWeight, length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "close_old_weight", CloseOldWeight { @@ -37726,8 +37726,8 @@ pub mod api { &self, fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "init_members", InitMembers { fellows, allies }, @@ -37745,8 +37745,8 @@ pub mod api { pub fn disband( &self, witness: runtime_types::pallet_alliance::types::DisbandWitness, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "disband", Disband { witness }, @@ -37762,8 +37762,8 @@ pub mod api { pub fn set_rule( &self, rule: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "set_rule", SetRule { rule }, @@ -37779,8 +37779,8 @@ pub mod api { pub fn announce( &self, announcement: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "announce", Announce { announcement }, @@ -37796,8 +37796,8 @@ pub mod api { pub fn remove_announcement( &self, announcement: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "remove_announcement", RemoveAnnouncement { announcement }, @@ -37812,8 +37812,8 @@ pub mod api { #[doc = "Submit oneself for candidacy. A fixed deposit is reserved."] pub fn join_alliance( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "join_alliance", JoinAlliance {}, @@ -37833,8 +37833,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "nominate_ally", NominateAlly { who }, @@ -37853,8 +37853,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "elevate_ally", ElevateAlly { ally }, @@ -37870,8 +37870,8 @@ pub mod api { #[doc = "order to retire."] pub fn give_retirement_notice( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "give_retirement_notice", GiveRetirementNotice {}, @@ -37887,8 +37887,8 @@ pub mod api { #[doc = ""] #[doc = "This can only be done once you have called `give_retirement_notice` and the"] #[doc = "`RetirementPeriod` has passed."] - pub fn retire(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn retire(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "retire", Retire {}, @@ -37907,8 +37907,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "kick_member", KickMember { who }, @@ -37931,8 +37931,8 @@ pub mod api { >, >, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "add_unscrupulous_items", AddUnscrupulousItems { items }, @@ -37955,9 +37955,9 @@ pub mod api { >, >, >, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "Alliance", "remove_unscrupulous_items", RemoveUnscrupulousItems { items }, @@ -37978,8 +37978,8 @@ pub mod api { 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( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "close", Close { @@ -38001,8 +38001,8 @@ pub mod api { #[doc = "operationally for some time."] pub fn abdicate_fellow_status( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "Alliance", "abdicate_fellow_status", AbdicateFellowStatus {}, @@ -38853,8 +38853,8 @@ pub mod api { &self, amount: ::core::primitive::u128, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "join", Join { amount, pool_id }, @@ -38877,8 +38877,8 @@ pub mod api { extra: runtime_types::pallet_nomination_pools::BondExtra< ::core::primitive::u128, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "bond_extra", BondExtra { extra }, @@ -38896,8 +38896,8 @@ pub mod api { #[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( + pub fn claim_payout(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "claim_payout", ClaimPayout {}, @@ -38947,8 +38947,8 @@ pub mod api { ::core::primitive::u32, >, unbonding_points: ::core::primitive::u128, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "unbond", Unbond { @@ -38973,8 +38973,8 @@ pub mod api { &self, pool_id: ::core::primitive::u32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "pool_withdraw_unbonded", PoolWithdrawUnbonded { @@ -39015,8 +39015,8 @@ pub mod api { ::core::primitive::u32, >, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "withdraw_unbonded", WithdrawUnbonded { @@ -39063,8 +39063,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "create", Create { @@ -39103,8 +39103,8 @@ pub mod api { ::core::primitive::u32, >, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "create_with_pool_id", CreateWithPoolId { @@ -39133,8 +39133,8 @@ pub mod api { &self, pool_id: ::core::primitive::u32, validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "nominate", Nominate { @@ -39163,8 +39163,8 @@ pub mod api { &self, pool_id: ::core::primitive::u32, state: runtime_types::pallet_nomination_pools::PoolState, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "set_state", SetState { pool_id, state }, @@ -39184,8 +39184,8 @@ pub mod api { &self, pool_id: ::core::primitive::u32, metadata: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "set_metadata", SetMetadata { pool_id, metadata }, @@ -39222,8 +39222,8 @@ pub mod api { ::core::primitive::u32, >, max_members_per_pool : runtime_types :: pallet_nomination_pools :: ConfigOp < :: core :: primitive :: u32 >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "set_configs", SetConfigs { @@ -39260,8 +39260,8 @@ pub mod api { new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< ::subxt::utils::AccountId32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "update_roles", UpdateRoles { @@ -39288,8 +39288,8 @@ pub mod api { pub fn chill( &self, pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "NominationPools", "chill", Chill { pool_id }, @@ -40283,8 +40283,8 @@ pub mod api { runtime_types::kitchensink_runtime::RuntimeCall, >, enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "submit", Submit { @@ -40311,8 +40311,8 @@ pub mod api { pub fn place_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "place_decision_deposit", PlaceDecisionDeposit { index }, @@ -40334,8 +40334,8 @@ pub mod api { pub fn refund_decision_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "refund_decision_deposit", RefundDecisionDeposit { index }, @@ -40356,8 +40356,8 @@ pub mod api { pub fn cancel( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "cancel", Cancel { index }, @@ -40378,8 +40378,8 @@ pub mod api { pub fn kill( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "kill", Kill { index }, @@ -40398,8 +40398,8 @@ pub mod api { pub fn nudge_referendum( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "nudge_referendum", NudgeReferendum { index }, @@ -40423,8 +40423,8 @@ pub mod api { pub fn one_fewer_deciding( &self, track: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedPolls", "one_fewer_deciding", OneFewerDeciding { track }, @@ -40446,9 +40446,9 @@ pub mod api { pub fn refund_submission_deposit( &self, index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload + ) -> ::subxt::tx::Payload { - ::subxt::tx::StaticTxPayload::new( + ::subxt::tx::Payload::new_static( "RankedPolls", "refund_submission_deposit", RefundSubmissionDeposit { index }, @@ -41133,8 +41133,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "add_member", AddMember { who }, @@ -41158,8 +41158,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "promote_member", PromoteMember { who }, @@ -41184,8 +41184,8 @@ pub mod api { ::subxt::utils::AccountId32, ::core::primitive::u32, >, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "demote_member", DemoteMember { who }, @@ -41211,8 +41211,8 @@ pub mod api { ::core::primitive::u32, >, min_rank: ::core::primitive::u16, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "remove_member", RemoveMember { who, min_rank }, @@ -41239,8 +41239,8 @@ pub mod api { &self, poll: ::core::primitive::u32, aye: ::core::primitive::bool, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "vote", Vote { poll, aye }, @@ -41266,8 +41266,8 @@ pub mod api { &self, poll_index: ::core::primitive::u32, max: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "RankedCollective", "cleanup_poll", CleanupPoll { poll_index, max }, @@ -41714,8 +41714,8 @@ pub mod api { #[doc = "the chain's resources."] pub fn register_fast_unstake( &self, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "FastUnstake", "register_fast_unstake", RegisterFastUnstake {}, @@ -41734,8 +41734,8 @@ pub mod api { #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] #[doc = "`Staking::rebond`."] - pub fn deregister(&self) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + pub fn deregister(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "FastUnstake", "deregister", Deregister {}, @@ -41753,8 +41753,8 @@ pub mod api { pub fn control( &self, unchecked_eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "FastUnstake", "control", Control { @@ -42059,8 +42059,8 @@ pub mod api { &self, message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin, page_index: ::core::primitive::u32, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "MessageQueue", "reap_page", ReapPage { @@ -42091,8 +42091,8 @@ pub mod api { page: ::core::primitive::u32, index: ::core::primitive::u32, weight_limit: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::StaticTxPayload { - ::subxt::tx::StaticTxPayload::new( + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( "MessageQueue", "execute_overweight", ExecuteOverweight { From 0131eda5636fe5197aba8f58353d3f1b5775792b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 16 Mar 2023 18:43:18 +0000 Subject: [PATCH 22/31] StaticStorageAddress and DynamicStorageAddress into single Address struct --- codegen/src/api/storage.rs | 54 +- examples/examples/storage_iterating.rs | 17 +- subxt/src/storage/mod.rs | 11 +- subxt/src/storage/storage_address.rs | 457 +- subxt/src/storage/storage_client.rs | 11 + subxt/src/storage/storage_type.rs | 25 +- subxt/src/tx/mod.rs | 2 +- subxt/src/tx/tx_payload.rs | 17 +- testing/integration-tests/src/client/mod.rs | 6 +- testing/integration-tests/src/codegen/mod.rs | 5 +- .../integration-tests/src/codegen/polkadot.rs | 68548 +++++++--------- .../integration-tests/src/frame/contracts.rs | 4 +- testing/integration-tests/src/storage/mod.rs | 9 +- 13 files changed, 28192 insertions(+), 40974 deletions(-) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 8306909bcf..968c993f15 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -12,7 +12,6 @@ use frame_metadata::{ StorageEntryMetadata, StorageEntryModifier, StorageEntryType, - StorageHasher, }; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; @@ -92,22 +91,6 @@ fn generate_storage_entry_fns( .. } => { let key_ty = type_gen.resolve_type(key.id()); - let hashers = hashers - .iter() - .map(|hasher| { - let hasher = match hasher { - StorageHasher::Blake2_128 => "Blake2_128", - StorageHasher::Blake2_256 => "Blake2_256", - StorageHasher::Blake2_128Concat => "Blake2_128Concat", - StorageHasher::Twox128 => "Twox128", - StorageHasher::Twox256 => "Twox256", - StorageHasher::Twox64Concat => "Twox64Concat", - StorageHasher::Identity => "Identity", - }; - let hasher = format_ident!("{}", hasher); - quote!( #crate_path::storage::address::StorageHasher::#hasher ) - }) - .collect::>(); match key_ty.type_def() { TypeDef::Tuple(tuple) => { let fields = tuple @@ -125,11 +108,10 @@ fn generate_storage_entry_fns( // If the number of hashers matches the number of fields, we're dealing with // something shaped like a StorageNMap, and each field should be hashed separately // according to the corresponding hasher. - let keys = hashers - .into_iter() - .zip(&fields) - .map(|(hasher, (field_name, _))| { - quote!( #crate_path::storage::address::StorageMapKey::new(#field_name.borrow(), #hasher) ) + let keys = fields + .iter() + .map(|(field_name, _)| { + quote!( #crate_path::storage::address::StaticStorageMapKey::new(#field_name.borrow()) ) }); quote! { vec![ #( #keys ),* ] @@ -138,11 +120,10 @@ fn generate_storage_entry_fns( // If there is one hasher, then however many fields we have, we want to hash a // tuple of them using the one hasher we're told about. This corresponds to a // StorageMap. - let hasher = hashers.get(0).expect("checked for 1 hasher"); let items = fields.iter().map(|(field_name, _)| quote!( #field_name )); quote! { - vec![ #crate_path::storage::address::StorageMapKey::new(&(#( #items.borrow() ),*), #hasher) ] + vec![ #crate_path::storage::address::StaticStorageMapKey::new(&(#( #items.borrow() ),*)) ] } } else { return Err(CodegenError::MismatchHashers( @@ -156,11 +137,8 @@ fn generate_storage_entry_fns( _ => { let ty_path = type_gen.resolve_type_path(key.id()); let fields = vec![(format_ident!("_0"), ty_path)]; - let Some(hasher) = hashers.get(0) else { - return Err(CodegenError::MissingHasher) - }; let key_impl = quote! { - vec![ #crate_path::storage::address::StorageMapKey::new(_0.borrow(), #hasher) ] + vec![ #crate_path::storage::address::StaticStorageMapKey::new(_0.borrow()) ] }; (fields, key_impl) } @@ -233,8 +211,14 @@ fn generate_storage_entry_fns( #docs pub fn #fn_name_root( &self, - ) -> #crate_path::storage::address::StaticStorageAddress::<#storage_entry_value_ty, (), #is_defaultable_type, #is_iterable_type> { - #crate_path::storage::address::StaticStorageAddress::new( + ) -> #crate_path::storage::address::Address::< + #crate_path::storage::address::StaticStorageMapKey, + #storage_entry_value_ty, + (), + #is_defaultable_type, + #is_iterable_type + > { + #crate_path::storage::address::Address::new_static( #pallet_name, #storage_name, Vec::new(), @@ -252,8 +236,14 @@ fn generate_storage_entry_fns( pub fn #fn_name( &self, #( #key_args, )* - ) -> #crate_path::storage::address::StaticStorageAddress::<#storage_entry_value_ty, #crate_path::storage::address::Yes, #is_defaultable_type, #is_iterable_type> { - #crate_path::storage::address::StaticStorageAddress::new( + ) -> #crate_path::storage::address::Address::< + #crate_path::storage::address::StaticStorageMapKey, + #storage_entry_value_ty, + #crate_path::storage::address::Yes, + #is_defaultable_type, + #is_iterable_type + > { + #crate_path::storage::address::Address::new_static( #pallet_name, #storage_name, #key_impl, diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index 718373e321..e3d6a1da56 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -10,12 +10,11 @@ //! polkadot --dev --tmp //! ``` -use codec::Decode; +use codec::{ + Decode, + Encode, +}; use subxt::{ - storage::address::{ - StorageHasher, - StorageMapKey, - }, OnlineClient, PolkadotConfig, }; @@ -83,11 +82,13 @@ async fn main() -> Result<(), Box> { let mut query_key = key_addr.to_root_bytes(); // We know that the first key is a u32 (the `XcmVersion`) and is hashed by twox64_concat. - // We can build a `StorageMapKey` that replicates that, and append those bytes to the above. - StorageMapKey::new(2u32, StorageHasher::Twox64Concat).to_bytes(&mut query_key); + // twox64_concat is just the result of running the twox_64 hasher on some value and concatenating + // the value itself after it: + query_key.extend(subxt::ext::sp_core::twox_64(&2u32.encode())); + query_key.extend(&2u32.encode()); // The final query key is essentially the result of: - // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(2u32) ++ 2u32` + // `twox_128("XcmPallet") ++ twox_128("VersionNotifiers") ++ twox_64(scale_encode(2u32)) ++ scale_encode(2u32)` println!("\nExample 3\nQuery key: 0x{}", hex::encode(&query_key)); let keys = api diff --git a/subxt/src/storage/mod.rs b/subxt/src/storage/mod.rs index aa3e8e50d9..b4b2c85424 100644 --- a/subxt/src/storage/mod.rs +++ b/subxt/src/storage/mod.rs @@ -26,13 +26,12 @@ pub mod address { pub use super::storage_address::{ dynamic, dynamic_root, - DynamicStorageAddress, - StaticStorageAddress, + Address, + DynamicAddress, + StaticStorageMapKey, StorageAddress, - StorageMapKey, Yes, }; - pub use frame_metadata::StorageHasher; } // For consistency with other modules, also expose @@ -40,7 +39,7 @@ pub mod address { pub use storage_address::{ dynamic, dynamic_root, - DynamicStorageAddress, - StaticStorageAddress, + Address, + DynamicAddress, StorageAddress, }; diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 4e681b89dd..3d66d8ded9 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -17,14 +17,13 @@ use crate::{ Metadata, }, }; -use codec::Encode; -use frame_metadata::StorageEntryType; +use frame_metadata::{ + StorageEntryType, + StorageHasher, +}; use scale_info::TypeDef; use std::borrow::Cow; -// We use this type a bunch, so export it from here. -pub use frame_metadata::StorageHasher; - /// This represents a storage address. Anything implementing this trait /// can be used to fetch and iterate over storage entries. pub trait StorageAddress { @@ -66,59 +65,55 @@ pub trait StorageAddress { /// fetched and returned with a default value in the type system. pub struct Yes; -/// This represents a statically generated storage lookup address. -pub struct StaticStorageAddress { - pallet_name: &'static str, - entry_name: &'static str, - // How to access the specific value at that storage address. - storage_entry_keys: Vec, - // Hash provided from static code for validation. +/// A concrete storage address. This can be created from static values (ie those generated +/// via the `subxt` macro) or dynamic values via [`dynamic`] and [`dynamic_root`]. +pub struct Address { + pallet_name: Cow<'static, str>, + entry_name: Cow<'static, str>, + storage_entry_keys: Vec, validation_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, } -/// Storage key for a Map. -#[derive(Clone)] -pub struct StorageMapKey { - value: Vec, - hasher: StorageHasher, -} +/// A typical storage address constructed at runtime rather than via the `subxt` macro; this +/// has no restriction on what it can be used for (since we don't statically know). +pub type DynamicAddress = + Address; -impl StorageMapKey { - /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. - pub fn new( - value: Encodable, - hasher: StorageHasher, - ) -> StorageMapKey { - Self { - value: value.encode(), - hasher, - } - } - - /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. - pub fn to_bytes(&self, bytes: &mut Vec) { - hash_bytes(&self.value, &self.hasher, bytes) - } -} - -impl - StaticStorageAddress +impl + Address where + StorageKey: EncodeWithMetadata, ReturnTy: DecodeWithMetadata, { - /// Create a new [`StaticStorageAddress`] that will be validated - /// against node metadata using the hash given. + /// Create a new [`Address`] to use to access a storage entry. pub fn new( + pallet_name: impl Into, + entry_name: impl Into, + storage_entry_keys: Vec, + ) -> Self { + Self { + pallet_name: Cow::Owned(pallet_name.into()), + entry_name: Cow::Owned(entry_name.into()), + storage_entry_keys: storage_entry_keys.into_iter().collect(), + validation_hash: None, + _marker: std::marker::PhantomData, + } + } + + /// Create a new [`Address`] using static strings for the pallet and call name. + /// This is only expected to be used from codegen. + #[doc(hidden)] + pub fn new_static( pallet_name: &'static str, entry_name: &'static str, - storage_entry_keys: Vec, + storage_entry_keys: Vec, hash: [u8; 32], ) -> Self { Self { - pallet_name, - entry_name, - storage_entry_keys, + pallet_name: Cow::Borrowed(pallet_name), + entry_name: Cow::Borrowed(entry_name), + storage_entry_keys: storage_entry_keys.into_iter().collect(), validation_hash: Some(hash), _marker: std::marker::PhantomData, } @@ -132,16 +127,6 @@ where } } - /// Return bytes representing this storage entry. - pub fn to_bytes(&self) -> Vec { - let mut bytes = Vec::new(); - super::utils::write_storage_address_root_bytes(self, &mut bytes); - for entry in &self.storage_entry_keys { - entry.to_bytes(&mut bytes); - } - bytes - } - /// Return bytes representing the root of this storage entry (ie a hash of /// the pallet and entry name). pub fn to_root_bytes(&self) -> Vec { @@ -149,83 +134,16 @@ where } } -impl StorageAddress - for StaticStorageAddress +impl StorageAddress + for Address where + StorageKey: EncodeWithMetadata, ReturnTy: DecodeWithMetadata, { type Target = ReturnTy; + type IsFetchable = Fetchable; type IsDefaultable = Defaultable; type IsIterable = Iterable; - type IsFetchable = Fetchable; - - fn pallet_name(&self) -> &str { - self.pallet_name - } - - fn entry_name(&self) -> &str { - self.entry_name - } - - fn append_entry_bytes( - &self, - _metadata: &Metadata, - bytes: &mut Vec, - ) -> Result<(), Error> { - for entry in &self.storage_entry_keys { - entry.to_bytes(bytes); - } - Ok(()) - } - - fn validation_hash(&self) -> Option<[u8; 32]> { - self.validation_hash - } -} - -/// This represents a dynamically generated storage address. -pub struct DynamicStorageAddress<'a, Encodable> { - pallet_name: Cow<'a, str>, - entry_name: Cow<'a, str>, - storage_entry_keys: Vec, -} - -/// Construct a new dynamic storage lookup to the root of some entry. -pub fn dynamic_root<'a>( - pallet_name: impl Into>, - entry_name: impl Into>, -) -> DynamicStorageAddress<'a, Value> { - DynamicStorageAddress { - pallet_name: pallet_name.into(), - entry_name: entry_name.into(), - storage_entry_keys: vec![], - } -} - -/// Construct a new dynamic storage lookup. -pub fn dynamic<'a, Encodable: EncodeWithMetadata>( - pallet_name: impl Into>, - entry_name: impl Into>, - storage_entry_keys: Vec, -) -> DynamicStorageAddress<'a, Encodable> { - DynamicStorageAddress { - pallet_name: pallet_name.into(), - entry_name: entry_name.into(), - storage_entry_keys, - } -} - -impl<'a, Encodable> StorageAddress for DynamicStorageAddress<'a, Encodable> -where - Encodable: EncodeWithMetadata, -{ - type Target = DecodedValueThunk; - - // For dynamic types, we have no static guarantees about any of - // this stuff, so we just allow it and let it fail at runtime: - type IsFetchable = Yes; - type IsDefaultable = Yes; - type IsIterable = Yes; fn pallet_name(&self) -> &str { &self.pallet_name @@ -308,6 +226,51 @@ where } } } + + fn validation_hash(&self) -> Option<[u8; 32]> { + self.validation_hash + } +} + +/// A static storage key; this is some pre-encoded bytes +/// likely provided by the generated interface. +pub struct StaticStorageMapKey(pub Vec); + +impl StaticStorageMapKey { + /// Create a new [`StaticStorageMapKey`] by pre-encoding static data. + pub fn new(value: Encodable) -> StaticStorageMapKey { + Self(value.encode()) + } +} + +impl EncodeWithMetadata for StaticStorageMapKey { + fn encode_with_metadata( + &self, + _type_id: u32, + _metadata: &Metadata, + bytes: &mut Vec, + ) -> Result<(), Error> { + // We just use the already-encoded bytes for a static storage key: + bytes.extend(&self.0); + Ok(()) + } +} + +/// Construct a new dynamic storage lookup to the root of some entry. +pub fn dynamic_root<'a>( + pallet_name: impl Into, + entry_name: impl Into, +) -> DynamicAddress { + DynamicAddress::new(pallet_name, entry_name, vec![]) +} + +/// Construct a new dynamic storage lookup. +pub fn dynamic<'a, StorageKey: EncodeWithMetadata>( + pallet_name: impl Into, + entry_name: impl Into, + storage_entry_keys: Vec, +) -> DynamicAddress { + DynamicAddress::new(pallet_name, entry_name, storage_entry_keys) } /// Take some SCALE encoded bytes and a [`StorageHasher`] and hash the bytes accordingly. @@ -328,3 +291,247 @@ fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { } } } + +// /// This represents a statically generated storage lookup address. +// pub struct StaticStorageAddress { +// pallet_name: &'static str, +// entry_name: &'static str, +// // How to access the specific value at that storage address. +// storage_entry_keys: Vec, +// // Hash provided from static code for validation. +// validation_hash: Option<[u8; 32]>, +// _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, +// } + +// /// Storage key for a Map. +// #[derive(Clone)] +// pub struct StorageMapKey { +// value: Vec, +// hasher: StorageHasher, +// } + +// impl StorageMapKey { +// /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. +// pub fn new( +// value: Encodable, +// hasher: StorageHasher, +// ) -> StorageMapKey { +// Self { +// value: value.encode(), +// hasher, +// } +// } + +// /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. +// pub fn to_bytes(&self, bytes: &mut Vec) { +// hash_bytes(&self.value, &self.hasher, bytes) +// } +// } + +// impl +// StaticStorageAddress +// where +// ReturnTy: DecodeWithMetadata, +// { +// /// Create a new [`StaticStorageAddress`] that will be validated +// /// against node metadata using the hash given. +// pub fn new( +// pallet_name: &'static str, +// entry_name: &'static str, +// storage_entry_keys: Vec, +// hash: [u8; 32], +// ) -> Self { +// Self { +// pallet_name, +// entry_name, +// storage_entry_keys, +// validation_hash: Some(hash), +// _marker: std::marker::PhantomData, +// } +// } + +// /// Do not validate this storage entry prior to accessing it. +// pub fn unvalidated(self) -> Self { +// Self { +// validation_hash: None, +// ..self +// } +// } + +// /// Return bytes representing this storage entry. +// pub fn to_bytes(&self) -> Vec { +// let mut bytes = Vec::new(); +// super::utils::write_storage_address_root_bytes(self, &mut bytes); +// for entry in &self.storage_entry_keys { +// entry.to_bytes(&mut bytes); +// } +// bytes +// } + +// /// Return bytes representing the root of this storage entry (ie a hash of +// /// the pallet and entry name). +// pub fn to_root_bytes(&self) -> Vec { +// super::utils::storage_address_root_bytes(self) +// } +// } + +// impl StorageAddress +// for StaticStorageAddress +// where +// ReturnTy: DecodeWithMetadata, +// { +// type Target = ReturnTy; +// type IsDefaultable = Defaultable; +// type IsIterable = Iterable; +// type IsFetchable = Fetchable; + +// fn pallet_name(&self) -> &str { +// self.pallet_name +// } + +// fn entry_name(&self) -> &str { +// self.entry_name +// } + +// fn append_entry_bytes( +// &self, +// _metadata: &Metadata, +// bytes: &mut Vec, +// ) -> Result<(), Error> { +// for entry in &self.storage_entry_keys { +// entry.to_bytes(bytes); +// } +// Ok(()) +// } + +// fn validation_hash(&self) -> Option<[u8; 32]> { +// self.validation_hash +// } +// } + +// /// This represents a dynamically generated storage address. +// pub struct DynamicStorageAddress<'a, Encodable> { +// pallet_name: Cow<'a, str>, +// entry_name: Cow<'a, str>, +// storage_entry_keys: Vec, +// } + +// /// Construct a new dynamic storage lookup to the root of some entry. +// pub fn dynamic_root<'a>( +// pallet_name: impl Into>, +// entry_name: impl Into>, +// ) -> DynamicStorageAddress<'a, Value> { +// DynamicStorageAddress { +// pallet_name: pallet_name.into(), +// entry_name: entry_name.into(), +// storage_entry_keys: vec![], +// } +// } + +// /// Construct a new dynamic storage lookup. +// pub fn dynamic<'a, Encodable: EncodeWithMetadata>( +// pallet_name: impl Into>, +// entry_name: impl Into>, +// storage_entry_keys: Vec, +// ) -> DynamicStorageAddress<'a, Encodable> { +// DynamicStorageAddress { +// pallet_name: pallet_name.into(), +// entry_name: entry_name.into(), +// storage_entry_keys, +// } +// } + +// impl<'a, Encodable> StorageAddress for DynamicStorageAddress<'a, Encodable> +// where +// Encodable: EncodeWithMetadata, +// { +// type Target = DecodedValueThunk; + +// // For dynamic types, we have no static guarantees about any of +// // this stuff, so we just allow it and let it fail at runtime: +// type IsFetchable = Yes; +// type IsDefaultable = Yes; +// type IsIterable = Yes; + +// fn pallet_name(&self) -> &str { +// &self.pallet_name +// } + +// fn entry_name(&self) -> &str { +// &self.entry_name +// } + +// fn append_entry_bytes( +// &self, +// metadata: &Metadata, +// bytes: &mut Vec, +// ) -> Result<(), Error> { +// let pallet = metadata.pallet(&self.pallet_name)?; +// let storage = pallet.storage(&self.entry_name)?; + +// match &storage.ty { +// StorageEntryType::Plain(_) => { +// if !self.storage_entry_keys.is_empty() { +// Err(StorageAddressError::WrongNumberOfKeys { +// expected: 0, +// actual: self.storage_entry_keys.len(), +// } +// .into()) +// } else { +// Ok(()) +// } +// } +// StorageEntryType::Map { hashers, key, .. } => { +// let ty = metadata +// .resolve_type(key.id()) +// .ok_or_else(|| StorageAddressError::TypeNotFound(key.id()))?; + +// // If the key is a tuple, we encode each value to the corresponding tuple type. +// // If the key is not a tuple, encode a single value to the key type. +// let type_ids = match ty.type_def() { +// TypeDef::Tuple(tuple) => { +// tuple.fields().iter().map(|f| f.id()).collect() +// } +// _other => { +// vec![key.id()] +// } +// }; + +// if type_ids.len() != self.storage_entry_keys.len() { +// return Err(StorageAddressError::WrongNumberOfKeys { +// expected: type_ids.len(), +// actual: self.storage_entry_keys.len(), +// } +// .into()) +// } + +// if hashers.len() == 1 { +// // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. +// let mut input = Vec::new(); +// for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { +// key.encode_with_metadata(type_id, metadata, &mut input)?; +// } +// hash_bytes(&input, &hashers[0], bytes); +// Ok(()) +// } else if hashers.len() == type_ids.len() { +// // A hasher per field; encode and hash each field independently. +// for ((key, type_id), hasher) in +// self.storage_entry_keys.iter().zip(type_ids).zip(hashers) +// { +// let mut input = Vec::new(); +// key.encode_with_metadata(type_id, metadata, &mut input)?; +// hash_bytes(&input, hasher, bytes); +// } +// Ok(()) +// } else { +// // Mismatch; wrong number of hashers/fields. +// Err(StorageAddressError::WrongNumberOfHashers { +// hashers: hashers.len(), +// fields: type_ids.len(), +// } +// .into()) +// } +// } +// } +// } +// } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 60c5cc24e2..c4de4f2583 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -57,6 +57,17 @@ where ) -> Result<(), Error> { validate_storage_address(address, &self.client.metadata()) } + + /// Convert some storage address into the raw bytes that would be submitted to the node in order + /// to retrieve the associated entry. + pub fn address_bytes( + &self, + address: &Address, + ) -> Result, Error> { + let mut bytes = Vec::new(); + address.append_entry_bytes(&self.client.metadata(), &mut bytes)?; + Ok(bytes) + } } impl StorageClient diff --git a/subxt/src/storage/storage_type.rs b/subxt/src/storage/storage_type.rs index 73d864a2da..201f754976 100644 --- a/subxt/src/storage/storage_type.rs +++ b/subxt/src/storage/storage_type.rs @@ -7,10 +7,7 @@ use super::storage_address::{ Yes, }; use crate::{ - client::{ - OfflineClientT, - OnlineClientT, - }, + client::OnlineClientT, error::Error, metadata::{ DecodeWithMetadata, @@ -50,22 +47,6 @@ impl Storage { } } -impl Storage -where - T: Config, - Client: OfflineClientT, -{ - /// Run the validation logic against some storage address you'd like to access. - /// - /// Method has the same meaning as [`StorageClient::validate`](super::storage_client::StorageClient::validate). - pub fn validate( - &self, - address: &Address, - ) -> Result<(), Error> { - validate_storage_address(address, &self.client.metadata()) - } -} - impl Storage where T: Config, @@ -129,7 +110,7 @@ where // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - client.validate(address)?; + validate_storage_address(address, &client.client.metadata())?; // Look up the return type ID to enable DecodeWithMetadata: let metadata = client.client.metadata(); @@ -249,7 +230,7 @@ where // is likely to actually correspond to a real storage entry or not. // if not, it means static codegen doesn't line up with runtime // metadata. - client.validate(&address)?; + validate_storage_address(&address, &client.client.metadata())?; let metadata = client.client.metadata(); diff --git a/subxt/src/tx/mod.rs b/subxt/src/tx/mod.rs index 6063b957dc..a5b8bbb9ea 100644 --- a/subxt/src/tx/mod.rs +++ b/subxt/src/tx/mod.rs @@ -27,8 +27,8 @@ pub use self::{ }, tx_payload::{ dynamic, - Payload, BoxedPayload, + Payload, TxPayload, }, tx_progress::{ diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index 70249f328e..d9c913e629 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -17,8 +17,10 @@ use scale_value::{ ValueDef, Variant, }; -use std::borrow::Cow; -use std::sync::Arc; +use std::{ + borrow::Cow, + sync::Arc, +}; /// This represents a transaction payload that can be submitted /// to a node. @@ -104,13 +106,13 @@ impl Payload { /// Box the payload. pub fn boxed(self) -> BoxedPayload where - CallData: EncodeAsFields + Send + Sync + 'static + CallData: EncodeAsFields + Send + Sync + 'static, { BoxedPayload { pallet_name: self.pallet_name, - call_name:self.call_name, + call_name: self.call_name, call_data: Arc::new(self.call_data), - validation_hash: self.validation_hash + validation_hash: self.validation_hash, } } @@ -160,7 +162,8 @@ impl TxPayload for Payload { pallet_index.encode_to(out); call_index.encode_to(out); - self.call_data.encode_as_fields_to(call.fields(), metadata.types(), out)?; + self.call_data + .encode_as_fields_to(call.fields(), metadata.types(), out)?; Ok(()) } @@ -183,4 +186,4 @@ pub fn dynamic( call_data: impl Into>, ) -> Payload> { Payload::new(pallet_name, call_name, call_data.into()) -} \ No newline at end of file +} diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 8273a9d4df..bae2c1e90a 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -471,10 +471,12 @@ async fn chainhead_unstable_storage() { let sub_id = blocks.subscription_id().unwrap().clone(); let alice: AccountId32 = AccountKeyring::Alice.to_account_id().into(); - let addr = node_runtime::storage().system().account(alice).to_bytes(); + let addr = node_runtime::storage().system().account(alice); + let addr_bytes = api.storage().address_bytes(&addr).unwrap(); + let mut sub = api .rpc() - .chainhead_unstable_storage(sub_id, hash, &addr, None) + .chainhead_unstable_storage(sub_id, hash, &addr_bytes, None) .await .unwrap(); let event = sub.next().await.unwrap().unwrap(); diff --git a/testing/integration-tests/src/codegen/mod.rs b/testing/integration-tests/src/codegen/mod.rs index c8b8142fb0..874c7745b4 100644 --- a/testing/integration-tests/src/codegen/mod.rs +++ b/testing/integration-tests/src/codegen/mod.rs @@ -7,8 +7,9 @@ /// /// Generate by: /// -/// - run `polkadot --dev --tmp` node locally -/// - `cargo run -p subxt-cli -- codegen | rustfmt > testing/integration-tests/src/codegen/polkadot.rs` +/// ``` +/// cargo run --bin subxt -- codegen --file artifacts/polkadot_metadata.scale | rustfmt > testing/integration-tests/src/codegen/polkadot.rs` +/// ``` #[rustfmt::skip] #[allow(clippy::all)] mod polkadot; diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 8c12421f3f..3cf60fc06e 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -2,65 +2,60 @@ #[allow(clippy::all)] pub mod api { use super::api as root_mod; - pub static PALLETS: [&str; 58usize] = [ + pub static PALLETS: [&str; 53usize] = [ "System", - "Utility", + "Scheduler", + "Preimage", "Babe", "Timestamp", - "Authorship", "Indices", "Balances", "TransactionPayment", - "AssetTxPayment", - "ElectionProviderMultiPhase", + "Authorship", "Staking", + "Offences", + "Historical", "Session", + "Grandpa", + "ImOnline", + "AuthorityDiscovery", "Democracy", "Council", "TechnicalCommittee", - "Elections", + "PhragmenElection", "TechnicalMembership", - "Grandpa", "Treasury", - "Contracts", - "Sudo", - "ImOnline", - "AuthorityDiscovery", - "Offences", - "Historical", - "RandomnessCollectiveFlip", - "Identity", - "Society", - "Recovery", + "Claims", "Vesting", - "Scheduler", - "Preimage", + "Utility", + "Identity", "Proxy", "Multisig", "Bounties", + "ChildBounties", "Tips", - "Assets", - "Mmr", - "Lottery", - "Nis", - "Uniques", - "Nfts", - "TransactionStorage", + "ElectionProviderMultiPhase", "VoterList", - "StateTrieMigration", - "ChildBounties", - "Referenda", - "Remark", - "RootTesting", - "ConvictionVoting", - "Whitelist", - "AllianceMotion", - "Alliance", "NominationPools", - "RankedPolls", - "RankedCollective", "FastUnstake", - "MessageQueue", + "ParachainsOrigin", + "Configuration", + "ParasShared", + "ParaInclusion", + "ParaInherent", + "ParaScheduler", + "Paras", + "Initializer", + "Dmp", + "Ump", + "Hrmp", + "ParaSessionInfo", + "ParasDisputes", + "Registrar", + "Slots", + "Auctions", + "Crowdloan", + "XcmPallet", ]; #[derive( :: subxt :: ext :: codec :: Decode, @@ -75,103 +70,398 @@ pub mod api { #[codec(index = 0)] System(system::Event), #[codec(index = 1)] - Utility(utility::Event), - #[codec(index = 5)] + Scheduler(scheduler::Event), + #[codec(index = 10)] + Preimage(preimage::Event), + #[codec(index = 4)] Indices(indices::Event), - #[codec(index = 6)] + #[codec(index = 5)] Balances(balances::Event), - #[codec(index = 7)] + #[codec(index = 32)] TransactionPayment(transaction_payment::Event), + #[codec(index = 7)] + Staking(staking::Event), #[codec(index = 8)] - AssetTxPayment(asset_tx_payment::Event), + Offences(offences::Event), #[codec(index = 9)] - ElectionProviderMultiPhase(election_provider_multi_phase::Event), - #[codec(index = 10)] - Staking(staking::Event), - #[codec(index = 11)] Session(session::Event), + #[codec(index = 11)] + Grandpa(grandpa::Event), #[codec(index = 12)] - Democracy(democracy::Event), - #[codec(index = 13)] - Council(council::Event), + ImOnline(im_online::Event), #[codec(index = 14)] - TechnicalCommittee(technical_committee::Event), + Democracy(democracy::Event), #[codec(index = 15)] - Elections(elections::Event), + Council(council::Event), #[codec(index = 16)] - TechnicalMembership(technical_membership::Event), + TechnicalCommittee(technical_committee::Event), #[codec(index = 17)] - Grandpa(grandpa::Event), + PhragmenElection(phragmen_election::Event), #[codec(index = 18)] - Treasury(treasury::Event), + TechnicalMembership(technical_membership::Event), #[codec(index = 19)] - Contracts(contracts::Event), - #[codec(index = 20)] - Sudo(sudo::Event), - #[codec(index = 21)] - ImOnline(im_online::Event), - #[codec(index = 23)] - Offences(offences::Event), + Treasury(treasury::Event), + #[codec(index = 24)] + Claims(claims::Event), + #[codec(index = 25)] + Vesting(vesting::Event), #[codec(index = 26)] - Identity(identity::Event), - #[codec(index = 27)] - Society(society::Event), + Utility(utility::Event), #[codec(index = 28)] - Recovery(recovery::Event), + Identity(identity::Event), #[codec(index = 29)] - Vesting(vesting::Event), - #[codec(index = 30)] - Scheduler(scheduler::Event), - #[codec(index = 31)] - Preimage(preimage::Event), - #[codec(index = 32)] Proxy(proxy::Event), - #[codec(index = 33)] + #[codec(index = 30)] Multisig(multisig::Event), #[codec(index = 34)] Bounties(bounties::Event), + #[codec(index = 38)] + ChildBounties(child_bounties::Event), #[codec(index = 35)] Tips(tips::Event), #[codec(index = 36)] - Assets(assets::Event), - #[codec(index = 38)] - Lottery(lottery::Event), + ElectionProviderMultiPhase(election_provider_multi_phase::Event), + #[codec(index = 37)] + VoterList(voter_list::Event), #[codec(index = 39)] - Nis(nis::Event), + NominationPools(nomination_pools::Event), #[codec(index = 40)] - Uniques(uniques::Event), - #[codec(index = 41)] - Nfts(nfts::Event), - #[codec(index = 42)] - TransactionStorage(transaction_storage::Event), - #[codec(index = 43)] - VoterList(voter_list::Event), - #[codec(index = 44)] - StateTrieMigration(state_trie_migration::Event), - #[codec(index = 45)] - ChildBounties(child_bounties::Event), - #[codec(index = 46)] - Referenda(referenda::Event), - #[codec(index = 47)] - Remark(remark::Event), - #[codec(index = 49)] - ConvictionVoting(conviction_voting::Event), - #[codec(index = 50)] - Whitelist(whitelist::Event), - #[codec(index = 51)] - AllianceMotion(alliance_motion::Event), - #[codec(index = 52)] - Alliance(alliance::Event), + FastUnstake(fast_unstake::Event), #[codec(index = 53)] - NominationPools(nomination_pools::Event), - #[codec(index = 54)] - RankedPolls(ranked_polls::Event), - #[codec(index = 55)] - RankedCollective(ranked_collective::Event), + ParaInclusion(para_inclusion::Event), #[codec(index = 56)] - FastUnstake(fast_unstake::Event), - #[codec(index = 57)] - MessageQueue(message_queue::Event), + Paras(paras::Event), + #[codec(index = 59)] + Ump(ump::Event), + #[codec(index = 60)] + Hrmp(hrmp::Event), + #[codec(index = 62)] + ParasDisputes(paras_disputes::Event), + #[codec(index = 70)] + Registrar(registrar::Event), + #[codec(index = 71)] + Slots(slots::Event), + #[codec(index = 72)] + Auctions(auctions::Event), + #[codec(index = 73)] + Crowdloan(crowdloan::Event), + #[codec(index = 99)] + XcmPallet(xcm_pallet::Event), + } + impl ::subxt::events::RootEvent for Event { + fn root_event( + pallet_bytes: &[u8], + 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 == "Scheduler" { + return Ok(Event::Scheduler(scheduler::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 == "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 == "Staking" { + return Ok(Event::Staking(staking::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 == "Session" { + return Ok(Event::Session(session::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 == "ImOnline" { + return Ok(Event::ImOnline(im_online::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 == "PhragmenElection" { + return Ok(Event::PhragmenElection( + phragmen_election::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "TechnicalMembership" { + return Ok(Event::TechnicalMembership( + technical_membership::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Treasury" { + return Ok(Event::Treasury(treasury::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Claims" { + return Ok(Event::Claims(claims::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Vesting" { + return Ok(Event::Vesting(vesting::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 == "Identity" { + return Ok(Event::Identity(identity::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Proxy" { + return Ok(Event::Proxy(proxy::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 == "Bounties" { + return Ok(Event::Bounties(bounties::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "ChildBounties" { + return Ok(Event::ChildBounties( + child_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 == "ElectionProviderMultiPhase" { + return Ok(Event::ElectionProviderMultiPhase( + election_provider_multi_phase::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, + )?, + )); + } + if pallet_name == "FastUnstake" { + return Ok(Event::FastUnstake( + fast_unstake::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "ParaInclusion" { + return Ok(Event::ParaInclusion( + para_inclusion::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Paras" { + return Ok(Event::Paras(paras::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Ump" { + return Ok(Event::Ump(ump::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Hrmp" { + return Ok(Event::Hrmp(hrmp::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "ParasDisputes" { + return Ok(Event::ParasDisputes( + paras_disputes::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?, + )); + } + if pallet_name == "Registrar" { + return Ok(Event::Registrar(registrar::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Slots" { + return Ok(Event::Slots(slots::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Auctions" { + return Ok(Event::Auctions(auctions::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "Crowdloan" { + return Ok(Event::Crowdloan(crowdloan::Event::decode_with_metadata( + &mut &*pallet_bytes, + pallet_ty, + metadata, + )?)); + } + if pallet_name == "XcmPallet" { + return Ok(Event::XcmPallet(xcm_pallet::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()) + } } pub mod system { use super::root_mod; @@ -190,6 +480,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct FillBlock { + pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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>, } @@ -284,6 +586,23 @@ pub mod api { } pub struct TransactionApi; impl TransactionApi { + #[doc = "A dispatch that will fill the block weight up to the given ratio."] + pub fn fill_block( + &self, + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "System", + "fill_block", + FillBlock { ratio }, + [ + 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, + 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, + 191u8, 145u8, 130u8, 245u8, 177u8, 201u8, 169u8, 129u8, + 173u8, 105u8, 88u8, 45u8, 136u8, 191u8, + ], + ) + } #[doc = "Make some on-chain remark."] #[doc = ""] #[doc = "# "] @@ -567,7 +886,8 @@ pub mod api { pub fn account( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::AccountInfo< ::core::primitive::u32, runtime_types::pallet_balances::AccountData< @@ -578,12 +898,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "Account", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8, @@ -596,7 +915,8 @@ pub mod api { #[doc = " The full account information for a particular account ID."] pub fn account_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::AccountInfo< ::core::primitive::u32, runtime_types::pallet_balances::AccountData< @@ -607,7 +927,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "Account", Vec::new(), @@ -622,13 +942,14 @@ pub mod api { #[doc = " Total extrinsics count for the current block."] pub fn extrinsic_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "ExtrinsicCount", vec![], @@ -643,7 +964,8 @@ pub mod api { #[doc = " The current weight for the block."] pub fn block_weight( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_support::dispatch::PerDispatchClass< runtime_types::sp_weights::weight_v2::Weight, >, @@ -651,7 +973,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "BlockWeight", vec![], @@ -666,13 +988,14 @@ pub mod api { #[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::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "AllExtrinsicsLen", vec![], @@ -688,18 +1011,18 @@ pub mod api { pub fn block_hash( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "System", "BlockHash", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8, @@ -712,13 +1035,14 @@ pub mod api { #[doc = " Map of block numbers to block hashes."] pub fn block_hash_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::subxt::utils::H256, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "BlockHash", Vec::new(), @@ -734,18 +1058,18 @@ pub mod api { pub fn extrinsic_data( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "ExtrinsicData", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8, @@ -758,13 +1082,14 @@ pub mod api { #[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::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( + ::subxt::storage::address::Address::new_static( "System", "ExtrinsicData", Vec::new(), @@ -779,13 +1104,14 @@ pub mod api { #[doc = " The current block number being processed. Set by `execute_block`."] pub fn number( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "Number", vec![], @@ -800,13 +1126,14 @@ pub mod api { #[doc = " Hash of the previous block."] pub fn parent_hash( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::subxt::utils::H256, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "ParentHash", vec![], @@ -821,13 +1148,14 @@ pub mod api { #[doc = " Digest of the current block, also part of the block header."] pub fn digest( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "Digest", vec![], @@ -848,10 +1176,11 @@ pub mod api { #[doc = " just in case someone still reads them from within the runtime."] pub fn events( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec< runtime_types::frame_system::EventRecord< - runtime_types::kitchensink_runtime::RuntimeEvent, + runtime_types::polkadot_runtime::RuntimeEvent, ::subxt::utils::H256, >, >, @@ -859,28 +1188,29 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "Events", vec![], [ - 134u8, 132u8, 50u8, 86u8, 182u8, 182u8, 18u8, 241u8, 61u8, - 219u8, 108u8, 254u8, 9u8, 218u8, 225u8, 121u8, 207u8, 72u8, - 165u8, 249u8, 159u8, 100u8, 9u8, 172u8, 211u8, 246u8, 146u8, - 248u8, 168u8, 246u8, 226u8, 137u8, + 230u8, 215u8, 9u8, 223u8, 139u8, 55u8, 22u8, 144u8, 226u8, + 245u8, 166u8, 235u8, 8u8, 182u8, 131u8, 51u8, 41u8, 148u8, + 102u8, 40u8, 86u8, 230u8, 82u8, 41u8, 226u8, 151u8, 247u8, + 41u8, 186u8, 190u8, 85u8, 20u8, ], ) } #[doc = " The number of events in the `Events` list."] pub fn event_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "EventCount", vec![], @@ -905,18 +1235,18 @@ pub mod api { pub fn event_topics( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "EventTopics", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8, @@ -938,13 +1268,14 @@ pub mod api { #[doc = " no notification will be triggered thus the event might be lost."] pub fn event_topics_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "EventTopics", Vec::new(), @@ -959,13 +1290,14 @@ pub mod api { #[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::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::LastRuntimeUpgradeInfo, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "LastRuntimeUpgrade", vec![], @@ -980,13 +1312,14 @@ pub mod api { #[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::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "UpgradedToU32RefCount", vec![], @@ -1002,13 +1335,14 @@ pub mod api { #[doc = " (default) if not."] pub fn upgraded_to_triple_ref_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "UpgradedToTripleRefCount", vec![], @@ -1023,13 +1357,14 @@ pub mod api { #[doc = " The execution phase of the block."] pub fn execution_phase( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::frame_system::Phase, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "System", "ExecutionPhase", vec![], @@ -1154,7 +1489,7 @@ pub mod api { } } } - pub mod utility { + pub mod scheduler { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -1171,9 +1506,14 @@ pub mod api { )] #[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, + 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, @@ -1184,10 +1524,9 @@ pub mod api { )] #[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, + pub struct Cancel { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1198,9 +1537,15 @@ pub mod api { )] #[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, + 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, @@ -1211,11 +1556,8 @@ pub mod api { )] #[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, + pub struct CancelNamed { + pub id: [::core::primitive::u8; 32usize], } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1226,9 +1568,14 @@ pub mod api { )] #[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, + 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, @@ -1239,207 +1586,181 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WithWeight { - pub call: - ::std::boxed::Box, - pub weight: runtime_types::sp_weights::weight_v2::Weight, + pub struct 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 = "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( + #[doc = "Anonymously schedule a task."] + pub fn schedule( &self, - calls: ::std::vec::Vec< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "batch", - Batch { calls }, + "Scheduler", + "schedule", + Schedule { + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 62u8, 136u8, 113u8, 235u8, 148u8, 170u8, 205u8, 39u8, 83u8, - 193u8, 255u8, 141u8, 246u8, 154u8, 62u8, 1u8, 130u8, 30u8, - 240u8, 252u8, 5u8, 189u8, 162u8, 35u8, 77u8, 117u8, 234u8, - 39u8, 85u8, 162u8, 15u8, 78u8, + 110u8, 118u8, 202u8, 51u8, 211u8, 53u8, 194u8, 114u8, 80u8, + 166u8, 134u8, 18u8, 89u8, 144u8, 204u8, 155u8, 201u8, 237u8, + 138u8, 170u8, 86u8, 16u8, 7u8, 2u8, 12u8, 96u8, 17u8, 148u8, + 147u8, 144u8, 196u8, 4u8, ], ) } - #[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( + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( &self, - index: ::core::primitive::u16, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + when: ::core::primitive::u32, + index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "as_derivative", - AsDerivative { - index, - call: ::std::boxed::Box::new(call), - }, + "Scheduler", + "cancel", + Cancel { when, index }, [ - 211u8, 250u8, 152u8, 77u8, 181u8, 199u8, 247u8, 99u8, 23u8, - 108u8, 191u8, 169u8, 114u8, 21u8, 21u8, 223u8, 28u8, 26u8, - 143u8, 125u8, 2u8, 156u8, 204u8, 84u8, 175u8, 199u8, 58u8, - 92u8, 62u8, 10u8, 51u8, 209u8, + 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 = "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( + #[doc = "Schedule a named task."] + pub fn schedule_named( &self, - calls: ::std::vec::Vec< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "batch_all", - BatchAll { calls }, + "Scheduler", + "schedule_named", + ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 68u8, 38u8, 31u8, 206u8, 216u8, 184u8, 101u8, 154u8, 252u8, - 86u8, 87u8, 144u8, 84u8, 54u8, 148u8, 51u8, 88u8, 155u8, - 225u8, 71u8, 144u8, 139u8, 4u8, 250u8, 110u8, 219u8, 24u8, - 65u8, 145u8, 11u8, 185u8, 209u8, + 84u8, 106u8, 212u8, 23u8, 117u8, 33u8, 204u8, 44u8, 79u8, + 178u8, 21u8, 241u8, 151u8, 179u8, 201u8, 1u8, 48u8, 13u8, + 125u8, 176u8, 166u8, 49u8, 118u8, 174u8, 1u8, 187u8, 45u8, + 75u8, 204u8, 219u8, 229u8, 24u8, ], ) } - #[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( + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( &self, - as_origin: runtime_types::kitchensink_runtime::OriginCaller, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + id: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "dispatch_as", - DispatchAs { - as_origin: ::std::boxed::Box::new(as_origin), - call: ::std::boxed::Box::new(call), - }, + "Scheduler", + "cancel_named", + CancelNamed { id }, [ - 54u8, 74u8, 229u8, 187u8, 235u8, 51u8, 114u8, 41u8, 227u8, - 155u8, 105u8, 171u8, 185u8, 177u8, 164u8, 144u8, 81u8, 50u8, - 105u8, 194u8, 205u8, 127u8, 105u8, 62u8, 194u8, 7u8, 198u8, - 122u8, 187u8, 231u8, 178u8, 9u8, + 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8, + 230u8, 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8, + 11u8, 246u8, 37u8, 192u8, 207u8, 90u8, 157u8, 171u8, 93u8, + 233u8, 189u8, 64u8, 180u8, ], ) } - #[doc = "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 = "Anonymously schedule a task after a delay."] #[doc = ""] #[doc = "# "] - #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] + #[doc = "Same as [`schedule`]."] #[doc = "# "] - pub fn force_batch( + pub fn schedule_after( &self, - calls: ::std::vec::Vec< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "force_batch", - ForceBatch { calls }, + "Scheduler", + "schedule_after", + ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::std::boxed::Box::new(call), + }, [ - 182u8, 123u8, 124u8, 127u8, 7u8, 64u8, 14u8, 109u8, 80u8, - 109u8, 239u8, 139u8, 117u8, 155u8, 83u8, 112u8, 86u8, 176u8, - 89u8, 236u8, 63u8, 100u8, 231u8, 162u8, 113u8, 242u8, 248u8, - 229u8, 19u8, 4u8, 104u8, 217u8, + 176u8, 3u8, 143u8, 176u8, 250u8, 9u8, 0u8, 75u8, 62u8, 93u8, + 220u8, 19u8, 98u8, 136u8, 178u8, 98u8, 187u8, 57u8, 228u8, + 147u8, 133u8, 88u8, 146u8, 58u8, 113u8, 166u8, 41u8, 25u8, + 163u8, 95u8, 6u8, 47u8, ], ) } - #[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 = "Schedule a named task after a delay."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - pub fn with_weight( + #[doc = "# "] + #[doc = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = "# "] + pub fn schedule_named_after( &self, - call: runtime_types::kitchensink_runtime::RuntimeCall, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Utility", - "with_weight", - WithWeight { + "Scheduler", + "schedule_named_after", + ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, call: ::std::boxed::Box::new(call), - weight, }, [ - 140u8, 177u8, 172u8, 97u8, 191u8, 107u8, 58u8, 138u8, 167u8, - 177u8, 185u8, 9u8, 86u8, 53u8, 181u8, 21u8, 161u8, 198u8, - 134u8, 90u8, 185u8, 172u8, 132u8, 177u8, 250u8, 162u8, 8u8, - 128u8, 198u8, 37u8, 157u8, 224u8, + 195u8, 224u8, 47u8, 168u8, 137u8, 114u8, 75u8, 129u8, 115u8, + 108u8, 190u8, 194u8, 60u8, 179u8, 249u8, 51u8, 110u8, 4u8, + 109u8, 50u8, 68u8, 121u8, 101u8, 41u8, 203u8, 4u8, 18u8, + 182u8, 245u8, 197u8, 244u8, 195u8, ], ) } } } - #[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; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -1451,15 +1772,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] - #[doc = "well as the error."] - pub struct BatchInterrupted { + #[doc = "Scheduled some task."] + pub struct Scheduled { + pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, - pub error: runtime_types::sp_runtime::DispatchError, } - impl ::subxt::events::StaticEvent for BatchInterrupted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchInterrupted"; + impl ::subxt::events::StaticEvent for Scheduled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Scheduled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1470,11 +1790,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed fully with no error."] - pub struct BatchCompleted; - impl ::subxt::events::StaticEvent for BatchCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompleted"; + #[doc = "Canceled some task."] + pub struct Canceled { + pub when: ::core::primitive::u32, + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Canceled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1485,11 +1808,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Batch of dispatches completed but has errors."] - pub struct BatchCompletedWithErrors; - impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "BatchCompletedWithErrors"; + #[doc = "Dispatched some task."] + pub struct Dispatched { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for Dispatched { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Dispatched"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1500,11 +1828,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - pub struct ItemCompleted; - impl ::subxt::events::StaticEvent for ItemCompleted { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemCompleted"; + #[doc = "The call for the provided hash was not found so the task has been aborted."] + pub struct CallUnavailable { + pub task: (::core::primitive::u32, ::core::primitive::u32), + pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + } + impl ::subxt::events::StaticEvent for CallUnavailable { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallUnavailable"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1515,13 +1846,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A single item within a Batch of dispatches has completed with error."] - pub struct ItemFailed { - pub error: runtime_types::sp_runtime::DispatchError, + #[doc = "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 ItemFailed { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "ItemFailed"; + impl ::subxt::events::StaticEvent for PeriodicFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PeriodicFailed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -1532,69 +1864,545 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A call was dispatched."] - pub struct DispatchedAs { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "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 DispatchedAs { - const PALLET: &'static str = "Utility"; - const EVENT: &'static str = "DispatchedAs"; + impl ::subxt::events::StaticEvent for PermanentlyOverweight { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PermanentlyOverweight"; } } - pub mod constants { + pub mod storage { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The limit on the number of batched calls."] - pub fn batched_calls_limit( + pub struct StorageApi; + impl StorageApi { + pub fn incomplete_since( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Utility", - "batched_calls_limit", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Scheduler", + "IncompleteSince", + 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, + 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, ], ) } - } - } - } - pub mod babe { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocation { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::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::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::polkadot_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, >, - runtime_types::sp_consensus_babe::app::Public, >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, + 185u8, 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, + 254u8, 2u8, 66u8, 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, + 88u8, 172u8, 127u8, 143u8, + ], + ) + } + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::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::polkadot_runtime::RuntimeCall, + >, + ::core::primitive::u32, + runtime_types::polkadot_runtime::OriginCaller, + ::subxt::utils::AccountId32, + >, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Agenda", + Vec::new(), + [ + 159u8, 237u8, 79u8, 176u8, 214u8, 27u8, 183u8, 165u8, 63u8, + 185u8, 233u8, 151u8, 81u8, 170u8, 97u8, 115u8, 47u8, 90u8, + 254u8, 2u8, 66u8, 209u8, 3u8, 247u8, 92u8, 11u8, 54u8, 144u8, + 88u8, 172u8, 127u8, 143u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup( + &self, + _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, + 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, + 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, + 211u8, 158u8, 250u8, 103u8, 243u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Scheduler", + "Lookup", + Vec::new(), + [ + 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, + 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, + 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, + 211u8, 158u8, 250u8, 103u8, 243u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] + pub fn maximum_weight( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::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, + ], + ) + } + #[doc = " The maximum number of scheduled calls in the queue for a single block."] + pub fn max_scheduled_per_block( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::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, + ], + ) + } + } + } + } + pub mod preimage { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NotePreimage { + pub bytes: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnnotePreimage { + pub hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RequestPreimage { + pub hash: ::subxt::utils::H256, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnrequestPreimage { + pub hash: ::subxt::utils::H256, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub fn note_preimage( + &self, + bytes: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "note_preimage", + NotePreimage { bytes }, + [ + 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8, + 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8, + 35u8, 17u8, 125u8, 130u8, 31u8, 206u8, 106u8, 83u8, 163u8, + 192u8, 81u8, 23u8, 232u8, 230u8, + ], + ) + } + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub fn unnote_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unnote_preimage", + UnnotePreimage { hash }, + [ + 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8, + 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8, + 147u8, 116u8, 27u8, 130u8, 84u8, 34u8, 231u8, 197u8, 135u8, + 8u8, 19u8, 242u8, 207u8, 17u8, + ], + ) + } + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub fn request_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "request_preimage", + RequestPreimage { hash }, + [ + 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8, + 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8, + 170u8, 169u8, 127u8, 30u8, 236u8, 65u8, 38u8, 16u8, 118u8, + 228u8, 141u8, 83u8, 162u8, 233u8, + ], + ) + } + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( + &self, + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Preimage", + "unrequest_preimage", + UnrequestPreimage { hash }, + [ + 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8, + 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8, + 105u8, 152u8, 69u8, 177u8, 193u8, 15u8, 60u8, 26u8, 95u8, + 130u8, 11u8, 113u8, 187u8, 108u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has been noted."] + pub struct Noted { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has been requested."] + pub struct Requested { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A preimage has ben cleared."] + pub struct Cleared { + pub hash: ::subxt::utils::H256, + } + impl ::subxt::events::StaticEvent for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The request status of a given hash."] + pub fn status_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, + 80u8, 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, + 37u8, 108u8, 88u8, 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, + 132u8, 42u8, 17u8, 227u8, 56u8, + ], + ) + } + #[doc = " The request status of a given hash."] + pub fn status_for_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_preimage::RequestStatus< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "StatusFor", + Vec::new(), + [ + 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, + 80u8, 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, + 37u8, 108u8, 88u8, 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, + 132u8, 42u8, 17u8, 227u8, 56u8, + ], + ) + } + pub fn preimage_for( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::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::StaticStorageMapKey::new(&( + _0.borrow(), + _1.borrow(), + ))], + [ + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, + 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, + 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, + 185u8, 234u8, 131u8, 124u8, + ], + ) + } + pub fn preimage_for_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Preimage", + "PreimageFor", + Vec::new(), + [ + 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, + 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, + 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, + 185u8, 234u8, 131u8, 124u8, + ], + ) + } + } + } + } + pub mod babe { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocation { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -1668,8 +2476,7 @@ pub mod api { &self, equivocation_proof : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload - { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Babe", "report_equivocation_unsigned", @@ -1716,13 +2523,14 @@ pub mod api { #[doc = " Current epoch index."] pub fn epoch_index( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u64, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "EpochIndex", vec![], @@ -1737,7 +2545,8 @@ pub mod api { #[doc = " Current epoch authorities."] pub fn authorities( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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, @@ -1746,7 +2555,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "Authorities", vec![], @@ -1762,13 +2571,14 @@ pub mod api { #[doc = " until the first block of the chain."] pub fn genesis_slot( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Babe", "GenesisSlot", vec![], @@ -1783,13 +2593,14 @@ pub mod api { #[doc = " Current slot number."] pub fn current_slot( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Babe", "CurrentSlot", vec![], @@ -1813,13 +2624,14 @@ pub mod api { #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] pub fn randomness( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Babe", "Randomness", vec![], @@ -1834,13 +2646,14 @@ pub mod api { #[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::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "PendingEpochConfigChange", vec![], @@ -1855,13 +2668,14 @@ pub mod api { #[doc = " Next epoch randomness."] pub fn next_randomness( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Babe", "NextRandomness", vec![], @@ -1876,7 +2690,8 @@ pub mod api { #[doc = " Next epoch authorities."] pub fn next_authorities( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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, @@ -1885,7 +2700,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "NextAuthorities", vec![], @@ -1908,13 +2723,14 @@ pub mod api { #[doc = " epoch."] pub fn segment_index( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "SegmentIndex", vec![], @@ -1930,7 +2746,8 @@ pub mod api { pub fn under_construction( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, @@ -1938,12 +2755,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "UnderConstruction", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8, @@ -1956,7 +2772,8 @@ pub mod api { #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] pub fn under_construction_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< [::core::primitive::u8; 32usize], >, @@ -1964,7 +2781,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "UnderConstruction", Vec::new(), @@ -1980,7 +2797,8 @@ pub mod api { #[doc = " if per-block initialization has already been called for current block."] pub fn initialized( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::option::Option< runtime_types::sp_consensus_babe::digests::PreDigest, >, @@ -1988,7 +2806,7 @@ pub mod api { (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "Initialized", vec![], @@ -2006,13 +2824,14 @@ pub mod api { #[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::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "AuthorVrfRandomness", vec![], @@ -2031,13 +2850,14 @@ pub mod api { #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] pub fn epoch_start( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Babe", "EpochStart", vec![], @@ -2056,13 +2876,14 @@ pub mod api { #[doc = " execution context should always yield zero."] pub fn lateness( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "Lateness", vec![], @@ -2078,13 +2899,14 @@ pub mod api { #[doc = " genesis."] pub fn epoch_config( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_consensus_babe::BabeEpochConfiguration, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "EpochConfig", vec![], @@ -2100,13 +2922,14 @@ pub mod api { #[doc = " (you can fallback to `EpochConfig` instead in that case)."] pub fn next_epoch_config( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_consensus_babe::BabeEpochConfiguration, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Babe", "NextEpochConfig", vec![], @@ -2245,13 +3068,14 @@ pub mod api { #[doc = " Current time for the current block."] pub fn now( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u64, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Timestamp", "Now", vec![], @@ -2266,13 +3090,14 @@ pub mod api { #[doc = " Did the timestamp get updated in this block?"] pub fn did_update( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Timestamp", "DidUpdate", vec![], @@ -2312,7 +3137,7 @@ pub mod api { } } } - pub mod authorship { + pub mod indices { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -2321,6 +3146,7 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -2329,219 +3155,61 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetUncles { - pub new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Provide a set of uncles."] - pub fn set_uncles( - &self, - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Authorship", - "set_uncles", - SetUncles { new_uncles }, - [ - 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, - 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, - 90u8, 60u8, 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, - 37u8, 235u8, 119u8, 42u8, 64u8, - ], - ) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Uncles"] - pub fn uncles( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::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< - ::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<::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; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Claim { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Free { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Freeze { - pub index: ::core::primitive::u32, + pub struct Claim { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Transfer { + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Free { + pub index: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceTransfer { + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub index: ::core::primitive::u32, + pub freeze: ::core::primitive::bool, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Freeze { + pub index: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { @@ -2601,10 +3269,7 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -2612,10 +3277,10 @@ pub mod api { "transfer", Transfer { new, index }, [ - 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, + 154u8, 191u8, 183u8, 50u8, 185u8, 69u8, 126u8, 132u8, 12u8, + 77u8, 146u8, 189u8, 254u8, 7u8, 72u8, 191u8, 118u8, 102u8, + 180u8, 2u8, 161u8, 151u8, 68u8, 93u8, 79u8, 45u8, 97u8, + 202u8, 131u8, 103u8, 174u8, 189u8, ], ) } @@ -2676,10 +3341,7 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, freeze: ::core::primitive::bool, ) -> ::subxt::tx::Payload { @@ -2688,10 +3350,10 @@ pub mod api { "force_transfer", ForceTransfer { new, index, freeze }, [ - 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, + 37u8, 220u8, 91u8, 118u8, 222u8, 81u8, 225u8, 131u8, 101u8, + 203u8, 60u8, 149u8, 102u8, 92u8, 58u8, 91u8, 227u8, 64u8, + 229u8, 62u8, 201u8, 57u8, 168u8, 11u8, 51u8, 149u8, 146u8, + 156u8, 209u8, 226u8, 11u8, 181u8, ], ) } @@ -2798,7 +3460,8 @@ pub mod api { pub fn accounts( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -2808,12 +3471,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Indices", "Accounts", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8, @@ -2826,7 +3488,8 @@ pub mod api { #[doc = " The lookup from index to account."] pub fn accounts_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -2836,7 +3499,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Indices", "Accounts", Vec::new(), @@ -2891,10 +3554,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Transfer { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -2908,10 +3568,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct SetBalance { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub new_free: ::core::primitive::u128, #[codec(compact)] @@ -2927,14 +3584,8 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ForceTransfer { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -2948,10 +3599,7 @@ pub mod api { #[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, - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } @@ -2965,10 +3613,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct TransferAll { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub keep_alive: ::core::primitive::bool, } #[derive( @@ -2981,10 +3626,7 @@ pub mod api { #[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 who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub amount: ::core::primitive::u128, } pub struct TransactionApi; @@ -3016,10 +3658,7 @@ pub mod api { #[doc = "# "] pub fn transfer( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -3027,10 +3666,10 @@ pub mod api { "transfer", Transfer { dest, value }, [ - 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, + 111u8, 222u8, 32u8, 56u8, 171u8, 77u8, 252u8, 29u8, 194u8, + 155u8, 200u8, 192u8, 198u8, 81u8, 23u8, 115u8, 236u8, 91u8, + 218u8, 114u8, 107u8, 141u8, 138u8, 100u8, 237u8, 21u8, 58u8, + 172u8, 3u8, 20u8, 216u8, 38u8, ], ) } @@ -3044,10 +3683,7 @@ pub mod api { #[doc = "The dispatch origin for this call is `root`."] pub fn set_balance( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, ) -> ::subxt::tx::Payload { @@ -3060,10 +3696,10 @@ pub mod api { 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, + 234u8, 215u8, 97u8, 98u8, 243u8, 199u8, 57u8, 76u8, 59u8, + 161u8, 118u8, 207u8, 34u8, 197u8, 198u8, 61u8, 231u8, 210u8, + 169u8, 235u8, 150u8, 137u8, 173u8, 49u8, 28u8, 77u8, 84u8, + 149u8, 143u8, 210u8, 139u8, 193u8, ], ) } @@ -3075,14 +3711,8 @@ pub mod api { #[doc = "# "] pub fn force_transfer( &self, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -3094,10 +3724,10 @@ pub mod api { value, }, [ - 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, + 79u8, 174u8, 212u8, 108u8, 184u8, 33u8, 170u8, 29u8, 232u8, + 254u8, 195u8, 218u8, 221u8, 134u8, 57u8, 99u8, 6u8, 70u8, + 181u8, 227u8, 56u8, 239u8, 243u8, 158u8, 157u8, 245u8, 36u8, + 162u8, 11u8, 237u8, 147u8, 15u8, ], ) } @@ -3109,10 +3739,7 @@ pub mod api { #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"] pub fn transfer_keep_alive( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, value: ::core::primitive::u128, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -3120,10 +3747,10 @@ pub mod api { "transfer_keep_alive", TransferKeepAlive { dest, value }, [ - 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, + 112u8, 179u8, 75u8, 168u8, 193u8, 221u8, 9u8, 82u8, 190u8, + 113u8, 253u8, 13u8, 130u8, 134u8, 170u8, 216u8, 136u8, 111u8, + 242u8, 220u8, 202u8, 112u8, 47u8, 79u8, 73u8, 244u8, 226u8, + 59u8, 240u8, 188u8, 210u8, 208u8, ], ) } @@ -3146,10 +3773,7 @@ pub mod api { #[doc = " #"] pub fn transfer_all( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + dest: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, keep_alive: ::core::primitive::bool, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -3157,10 +3781,10 @@ pub mod api { "transfer_all", TransferAll { dest, keep_alive }, [ - 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, + 46u8, 129u8, 29u8, 177u8, 221u8, 107u8, 245u8, 69u8, 238u8, + 126u8, 145u8, 26u8, 219u8, 208u8, 14u8, 80u8, 149u8, 1u8, + 214u8, 63u8, 67u8, 201u8, 144u8, 45u8, 129u8, 145u8, 174u8, + 71u8, 238u8, 113u8, 208u8, 34u8, ], ) } @@ -3169,10 +3793,7 @@ pub mod api { #[doc = "Can only be called by ROOT."] pub fn force_unreserve( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, amount: ::core::primitive::u128, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -3180,10 +3801,10 @@ pub mod api { "force_unreserve", ForceUnreserve { who, amount }, [ - 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, + 160u8, 146u8, 137u8, 76u8, 157u8, 187u8, 66u8, 148u8, 207u8, + 76u8, 32u8, 254u8, 82u8, 215u8, 35u8, 161u8, 213u8, 52u8, + 32u8, 98u8, 102u8, 106u8, 234u8, 123u8, 6u8, 175u8, 184u8, + 188u8, 174u8, 106u8, 176u8, 78u8, ], ) } @@ -3388,13 +4009,14 @@ pub mod api { #[doc = " The total units issued in the system."] pub fn total_issuance( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Balances", "TotalIssuance", vec![], @@ -3406,27 +4028,6 @@ pub mod api { ], ) } - #[doc = " The total units of outstanding deactivated balance in the system."] - pub fn inactive_issuance( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Balances", - "InactiveIssuance", - vec![], - [ - 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8, - 12u8, 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8, - 184u8, 250u8, 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8, - 46u8, 204u8, 160u8, 154u8, 21u8, - ], - ) - } #[doc = " The Balances pallet example of storing the balance of an account."] #[doc = ""] #[doc = " # Example"] @@ -3454,18 +4055,18 @@ pub mod api { pub fn account( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Balances", "Account", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8, @@ -3501,13 +4102,14 @@ pub mod api { #[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::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( + ::subxt::storage::address::Address::new_static( "Balances", "Account", Vec::new(), @@ -3524,7 +4126,8 @@ pub mod api { pub fn locks( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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, @@ -3534,12 +4137,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Balances", "Locks", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8, @@ -3553,7 +4155,8 @@ pub mod api { #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] pub fn locks_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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, @@ -3563,7 +4166,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Balances", "Locks", Vec::new(), @@ -3579,7 +4182,8 @@ pub mod api { pub fn reserves( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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], @@ -3590,12 +4194,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Balances", "Reserves", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8, @@ -3608,7 +4211,8 @@ pub mod api { #[doc = " Named reserves on some account balances."] pub fn reserves_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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], @@ -3619,7 +4223,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Balances", "Reserves", Vec::new(), @@ -3631,6 +4235,30 @@ pub mod api { ], ) } + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " This is set to v2.0.0 for new networks."] + pub fn storage_version( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_balances::Releases, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Balances", + "StorageVersion", + vec![], + [ + 135u8, 96u8, 28u8, 234u8, 124u8, 212u8, 56u8, 140u8, 40u8, + 101u8, 235u8, 128u8, 136u8, 221u8, 182u8, 81u8, 17u8, 9u8, + 184u8, 228u8, 174u8, 165u8, 200u8, 162u8, 214u8, 178u8, + 227u8, 72u8, 34u8, 5u8, 173u8, 96u8, + ], + ) + } } } pub mod constants { @@ -3723,13 +4351,14 @@ pub mod api { impl StorageApi { pub fn next_fee_multiplier( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "TransactionPayment", "NextFeeMultiplier", vec![], @@ -3743,13 +4372,14 @@ pub mod api { } pub fn storage_version( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "TransactionPayment", "StorageVersion", vec![], @@ -3806,13 +4436,14 @@ pub mod api { } } } - pub mod asset_tx_payment { + pub mod authorship { use super::root_mod; use super::runtime_types; - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_asset_tx_payment::pallet::Event; - pub mod events { + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -3822,21 +4453,144 @@ pub mod api { )] #[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` in an asset `asset_id`."] - pub struct AssetTxFeePaid { - pub who: ::subxt::utils::AccountId32, - pub actual_fee: ::core::primitive::u128, - pub tip: ::core::primitive::u128, - pub asset_id: ::core::option::Option<::core::primitive::u32>, + pub struct SetUncles { + pub new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Provide a set of uncles."] + pub fn set_uncles( + &self, + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Authorship", + "set_uncles", + SetUncles { new_uncles }, + [ + 181u8, 70u8, 222u8, 83u8, 154u8, 215u8, 200u8, 64u8, 154u8, + 228u8, 115u8, 247u8, 117u8, 89u8, 229u8, 102u8, 128u8, 189u8, + 90u8, 60u8, 223u8, 19u8, 111u8, 172u8, 5u8, 223u8, 132u8, + 37u8, 235u8, 119u8, 42u8, 64u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Uncles"] + pub fn uncles( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_authorship::UncleEntryItem< + ::core::primitive::u32, + ::subxt::utils::H256, + ::subxt::utils::AccountId32, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Authorship", + "Uncles", + vec![], + [ + 193u8, 226u8, 196u8, 151u8, 233u8, 82u8, 60u8, 164u8, 27u8, + 156u8, 231u8, 51u8, 79u8, 134u8, 170u8, 166u8, 71u8, 120u8, + 250u8, 255u8, 52u8, 168u8, 74u8, 199u8, 122u8, 253u8, 248u8, + 178u8, 39u8, 233u8, 132u8, 67u8, + ], + ) + } + #[doc = " Author of current block."] + pub fn author( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Authorship", + "Author", + vec![], + [ + 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8, + 110u8, 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8, + 177u8, 126u8, 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8, + 95u8, 15u8, 91u8, 103u8, 113u8, + ], + ) + } + #[doc = " Whether uncles were already set in this block."] + pub fn did_set_uncles( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Authorship", + "DidSetUncles", + vec![], + [ + 64u8, 3u8, 208u8, 187u8, 50u8, 45u8, 37u8, 88u8, 163u8, + 226u8, 37u8, 126u8, 232u8, 107u8, 156u8, 187u8, 29u8, 15u8, + 53u8, 46u8, 28u8, 73u8, 83u8, 123u8, 14u8, 244u8, 243u8, + 43u8, 245u8, 143u8, 15u8, 115u8, + ], + ) + } } - impl ::subxt::events::StaticEvent for AssetTxFeePaid { - const PALLET: &'static str = "AssetTxPayment"; - const EVENT: &'static str = "AssetTxFeePaid"; + } + 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<::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 election_provider_multi_phase { + pub mod staking { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -3853,7 +4607,15 @@ pub mod api { )] #[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 :: kitchensink_runtime :: NposSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } + pub struct Bond { + pub controller: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -3863,10 +4625,9 @@ pub mod api { )] #[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< - runtime_types::sp_npos_elections::ElectionScore, - >, + pub struct BondExtra { + #[codec(compact)] + pub max_additional: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -3877,15 +4638,12 @@ pub mod api { )] #[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, - >, - )>, + pub struct Unbond { + #[codec(compact)] + pub value: ::core::primitive::u128, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -3894,11 +4652,33 @@ pub mod api { )] #[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::kitchensink_runtime::NposSolution16, - >, + pub struct WithdrawUnbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Validate { + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, } #[derive( @@ -3910,158 +4690,34 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GovernanceFallback { - pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, + pub struct Chill; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + >, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Submit a solution for the unsigned phase."] - #[doc = ""] - #[doc = "The dispatch origin fo this call must be __none__."] - #[doc = ""] - #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] - #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] - #[doc = "that only active validators can submit this transaction when authoring a block (similar"] - #[doc = "to an inherent)."] - #[doc = ""] - #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] - #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] - #[doc = "putting their authoring reward at risk."] - #[doc = ""] - #[doc = "No deposit or reward is associated with this submission."] - pub fn submit_unsigned( - &self, - raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >, - witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "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, - ], - ) - } - #[doc = "Set a new value for `MinimumUntrustedScore`."] - #[doc = ""] - #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] - #[doc = ""] - #[doc = "This check can be turned off by setting the value to `None`."] - pub fn set_minimum_untrusted_score( - &self, - maybe_next_score: ::core::option::Option< - runtime_types::sp_npos_elections::ElectionScore, - >, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "set_minimum_untrusted_score", - SetMinimumUntrustedScore { maybe_next_score }, - [ - 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, - 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, - 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, - 76u8, 4u8, 67u8, 81u8, - ], - ) - } - #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] - #[doc = "call to `ElectionProvider::elect`."] - #[doc = ""] - #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] - #[doc = ""] - #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] - #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] - #[doc = "memory/weight constrains)."] - pub fn set_emergency_election_result( - &self, - supports: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::sp_npos_elections::Support< - ::subxt::utils::AccountId32, - >, - )>, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "set_emergency_election_result", - SetEmergencyElectionResult { supports }, - [ - 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, - 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, - 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8, - 250u8, 151u8, 5u8, 44u8, 133u8, - ], - ) - } - #[doc = "Submit a solution for the signed phase."] - #[doc = ""] - #[doc = "The dispatch origin fo this call must be __signed__."] - #[doc = ""] - #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] - #[doc = "of the signed phase."] - #[doc = ""] - #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] - #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] - pub fn submit( - &self, - raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "submit", - Submit { - raw_solution: ::std::boxed::Box::new(raw_solution), - }, - [ - 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, - 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, - 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, - 225u8, 241u8, 58u8, 193u8, 134u8, - ], - ) - } - #[doc = "Trigger the governance fallback."] - #[doc = ""] - #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] - #[doc = "calling [`Call::set_emergency_election_result`]."] - pub fn governance_fallback( - &self, - maybe_max_voters: ::core::option::Option<::core::primitive::u32>, - maybe_max_targets: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ElectionProviderMultiPhase", - "governance_fallback", - GovernanceFallback { - maybe_max_voters, - maybe_max_targets, - }, - [ - 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, - 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, - 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8, - 190u8, 53u8, 226u8, 142u8, 182u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, ()>, } - } - #[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, @@ -4071,22 +4727,22 @@ pub mod api { )] #[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, + pub struct SetValidatorCount { + #[codec(compact)] + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for SolutionStored { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "SolutionStored"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct IncreaseValidatorCount { + #[codec(compact)] + pub additional: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4097,15 +4753,40 @@ pub mod api { )] #[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, + pub struct ScaleValidatorCount { + pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - impl ::subxt::events::StaticEvent for ElectionFinalized { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFinalized"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNoEras; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceNewEra; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetInvulnerables { + pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4116,13 +4797,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An election failed."] - #[doc = ""] - #[doc = "Not much can be said about which computes failed in the process."] - pub struct ElectionFailed; - impl ::subxt::events::StaticEvent for ElectionFailed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "ElectionFailed"; + pub struct ForceUnstake { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4133,14 +4810,32 @@ pub mod api { )] #[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, + pub struct ForceNewEraAlways; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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::events::StaticEvent for Rewarded { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Rewarded"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PayoutStakers { + pub validator_stash: ::subxt::utils::AccountId32, + pub era: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4151,14 +4846,22 @@ pub mod api { )] #[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 struct Rebond { + #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "Slashed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReapStash { + pub stash: ::subxt::utils::AccountId32, + pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4169,642 +4872,812 @@ pub mod api { )] #[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 struct Kick { + pub who: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, >, - pub round: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for PhaseTransitioned { - const PALLET: &'static str = "ElectionProviderMultiPhase"; - const EVENT: &'static str = "PhaseTransitioned"; } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Internal counter for the number of rounds."] + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetStakingConfigs { + pub min_nominator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub min_validator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + pub max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + pub chill_threshold: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + pub min_commission: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ChillOther { + pub controller: ::subxt::utils::AccountId32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceApplyMinCommission { + pub validator_stash: ::subxt::utils::AccountId32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] #[doc = ""] - #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] - #[doc = " diagnostics of the pallet."] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] #[doc = ""] - #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] - pub fn round( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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, - ], - ) - } - #[doc = " Current phase."] - pub fn current_phase( + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "# "] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ and gets removed as dust."] + #[doc = "------------------"] + #[doc = "# "] + pub fn bond( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_election_provider_multi_phase::Phase< - ::core::primitive::u32, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "CurrentPhase", - vec![], + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "bond", + Bond { + controller, + value, + payee, + }, [ - 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, + 215u8, 211u8, 69u8, 215u8, 33u8, 158u8, 62u8, 3u8, 31u8, + 216u8, 213u8, 188u8, 151u8, 43u8, 165u8, 154u8, 117u8, 163u8, + 190u8, 227u8, 116u8, 70u8, 155u8, 178u8, 64u8, 174u8, 203u8, + 179u8, 214u8, 187u8, 176u8, 10u8, ], ) } - #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] - pub fn queued_solution( + #[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( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_election_provider_multi_phase::ReadySolution, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "QueuedSolution", - vec![], + max_additional: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "bond_extra", + BondExtra { max_additional }, [ - 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, + 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, ], ) } - #[doc = " Snapshot data of the round."] + #[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 = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] - pub fn snapshot( + #[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. In that case, [`Call::withdraw_unbonded`] need"] + #[doc = "to be called first 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, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "Snapshot", - vec![], + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "unbond", + Unbond { value }, [ - 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, + 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, ], ) } - #[doc = " Desired number of targets to elect for this round."] + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] - pub fn desired_targets( + #[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 = "# "] + pub fn withdraw_unbonded( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "DesiredTargets", - vec![], + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "withdraw_unbonded", + WithdrawUnbonded { num_slashing_spans }, [ - 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, + 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, ], ) } - #[doc = " The metadata of the [`RoundSnapshot`]"] + #[doc = "Declare the desire to validate for the origin controller."] #[doc = ""] - #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , :: subxt :: storage :: address :: Yes , () , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SnapshotMetadata", - vec![], + #[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."] + pub fn validate( + &self, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "validate", + Validate { prefs }, [ - 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, + 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, ], ) } - #[doc = " The next index to be assigned to an incoming signed submission."] + #[doc = "Declare the desire to nominate `targets` for the origin controller."] #[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 = "Effects will be felt at the beginning of the next era."] #[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 = "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 = "# "] + pub fn nominate( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionNextIndex", - vec![], + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "nominate", + Nominate { targets }, [ - 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, + 112u8, 162u8, 70u8, 26u8, 74u8, 7u8, 188u8, 193u8, 210u8, + 247u8, 27u8, 189u8, 133u8, 137u8, 33u8, 155u8, 255u8, 171u8, + 122u8, 68u8, 175u8, 247u8, 139u8, 253u8, 97u8, 187u8, 254u8, + 201u8, 66u8, 166u8, 226u8, 90u8, ], ) } - #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] - #[doc = " value in `SignedSubmissions`."] + #[doc = "Declare no desire to either validate or nominate."] #[doc = ""] - #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] - #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] - #[doc = " them one at a time instead of reading and decoding all of them at once."] - pub fn signed_submission_indices( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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( - "ElectionProviderMultiPhase", - "SignedSubmissionIndices", - vec![], + #[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 = "# "] + pub fn chill(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "chill", + Chill {}, [ - 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, + 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 = " Unchecked, signed solutions."] + #[doc = "(Re-)set the payment target for a controller."] #[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 = "Effects will be felt instantly (as soon as this function is completed successfully)."] #[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 :: < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + #[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, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt::utils::AccountId32, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_payee", + SetPayee { payee }, [ - 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, + 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 = " Unchecked, signed solutions."] + #[doc = "(Re-)set the controller of a stash."] #[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 = "Effects will be felt instantly (as soon as this function is completed successfully)."] #[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 :: < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "SignedSubmissionsMap", - Vec::new(), + #[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( + &self, + controller: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_controller", + SetController { controller }, [ - 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, + 165u8, 250u8, 213u8, 32u8, 179u8, 163u8, 15u8, 35u8, 14u8, + 152u8, 56u8, 171u8, 43u8, 101u8, 7u8, 167u8, 178u8, 60u8, + 89u8, 186u8, 59u8, 28u8, 82u8, 159u8, 13u8, 96u8, 168u8, + 123u8, 194u8, 212u8, 205u8, 184u8, ], ) } - #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] - #[doc = " feasible."] + #[doc = "Sets the ideal number of validators."] #[doc = ""] - #[doc = " Can be set via `set_minimum_untrusted_score`."] - pub fn minimum_untrusted_score( + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# "] + #[doc = "Weight: O(1)"] + #[doc = "Write: Validator Count"] + #[doc = "# "] + pub fn set_validator_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_npos_elections::ElectionScore, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ElectionProviderMultiPhase", - "MinimumUntrustedScore", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_validator_count", + SetValidatorCount { new }, [ - 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, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Duration of the unsigned phase."] - pub fn unsigned_phase( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "UnsignedPhase", + additional: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "increase_validator_count", + IncreaseValidatorCount { additional }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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 = " Duration of the signed phase."] - pub fn signed_phase( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::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, - ], - ) - } - #[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 = "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, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_arithmetic::per_things::Perbill, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "BetterSignedThreshold", + factor: runtime_types::sp_arithmetic::per_things::Percent, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "scale_validator_count", + ScaleValidatorCount { factor }, [ - 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, + 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 = " 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::constants::StaticConstantAddress< - runtime_types::sp_arithmetic::per_things::Perbill, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "BetterUnsignedThreshold", + #[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", + ForceNoEras {}, [ - 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, + 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 = " The repeat threshold of the offchain worker."] + #[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 = " 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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "OffchainRepeat", + #[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", + ForceNewEra {}, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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 = " The priority of the unsigned transaction submitted in the unsigned-phase"] - pub fn miner_tx_priority( + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub fn set_invulnerables( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerTxPriority", + invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_invulnerables", + SetInvulnerables { invulnerables }, [ - 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, + 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 = " Maximum number of signed submissions that can be queued."] + #[doc = "Force a current staker to become completely unstaked, immediately."] #[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 dispatch origin must be Root."] + pub fn force_unstake( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxSubmissions", + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_unstake", + ForceUnstake { + stash, + num_slashing_spans, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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 = " Maximum weight of a signed solution."] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] #[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 = "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::constants::StaticConstantAddress< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxWeight", + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_new_era_always", + ForceNewEraAlways {}, [ - 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, + 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 = " The maximum amount of unchecked solutions to refund the call fee for."] - pub fn signed_max_refunds( + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::SlashCancelOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + pub fn cancel_deferred_slash( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedMaxRefunds", + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "cancel_deferred_slash", + CancelDeferredSlash { era, slash_indices }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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, ], ) } - #[doc = " Base reward for a signed solution"] - pub fn signed_reward_base( + #[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::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedRewardBase", + validator_stash: ::subxt::utils::AccountId32, + era: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "payout_stakers", + PayoutStakers { + validator_stash, + era, + }, [ - 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, + 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 = " Base deposit for a signed solution."] - pub fn signed_deposit_base( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositBase", + value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "rebond", + Rebond { value }, [ - 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, + 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 = " Per-byte deposit for a signed solution."] - pub fn signed_deposit_byte( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositByte", + stash: ::subxt::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "reap_stash", + ReapStash { + stash, + num_slashing_spans, + }, [ - 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, + 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 = " Per-weight deposit for a signed solution."] - pub fn signed_deposit_weight( + #[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::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "SignedDepositWeight", + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "kick", + Kick { who }, [ - 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, + 32u8, 26u8, 202u8, 6u8, 186u8, 180u8, 58u8, 121u8, 185u8, + 208u8, 123u8, 10u8, 53u8, 179u8, 167u8, 203u8, 96u8, 229u8, + 7u8, 144u8, 231u8, 172u8, 145u8, 141u8, 162u8, 180u8, 212u8, + 42u8, 34u8, 5u8, 199u8, 82u8, ], ) } - #[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( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxElectingVoters", + 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::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "set_staking_configs", + SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 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 = " The maximum number of electable targets to put in the snapshot."] - pub fn max_electable_targets( + #[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::constants::StaticConstantAddress<::core::primitive::u16> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxElectableTargets", + controller: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "chill_other", + ChillOther { controller }, [ - 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, + 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 = " 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( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MaxWinners", + validator_stash: ::subxt::utils::AccountId32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Staking", + "force_apply_min_commission", + ForceApplyMinCommission { validator_stash }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - pub fn miner_max_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - pub fn miner_max_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::StaticConstantAddress::new( - "ElectionProviderMultiPhase", - "MinerMaxWeight", - [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, - 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, - 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, - 165u8, 147u8, 134u8, 106u8, 76u8, - ], - ) - } - pub fn miner_max_votes_per_voter( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::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, + 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, ], ) } } } - } - pub mod staking { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[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; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, @@ -4814,25 +5687,18 @@ pub mod api { )] #[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 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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for EraPaid { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "EraPaid"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -4841,20 +5707,14 @@ pub mod api { )] #[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, + #[doc = "The nominator has been rewarded by this amount."] + pub struct Rewarded { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Validate { - pub prefs: runtime_types::pallet_staking::ValidatorPrefs, + impl ::subxt::events::StaticEvent for Rewarded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Rewarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4865,39 +5725,17 @@ pub mod api { )] #[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, - ::core::primitive::u32, - >, - >, + #[doc = "One staker (and potentially its nominators) has been slashed by the given amount."] + pub struct Slashed { + pub staker: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - >, + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Slashed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -4906,24 +5744,14 @@ pub mod api { )] #[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, - >, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "OldSlashingReportDiscarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4934,9 +5762,11 @@ pub mod api { )] #[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 = "A new set of stakers was elected."] + pub struct StakersElected; + impl ::subxt::events::StaticEvent for StakersElected { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakersElected"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4947,40 +5777,17 @@ pub mod api { )] #[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 = "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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNoEras; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEra; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Bonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Bonded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -4991,32 +5798,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceUnstake { + #[doc = "An account has unbonded this amount."] + pub struct Unbonded { pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, + pub amount: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceNewEraAlways; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Unbonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Unbonded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5027,22 +5816,15 @@ pub mod api { )] #[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, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Withdrawn"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5053,26 +5835,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReapStash { + #[doc = "A nominator has been kicked from a validator."] + pub struct Kicked { + pub nominator: ::subxt::utils::AccountId32, pub stash: ::subxt::utils::AccountId32, - pub num_slashing_spans: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Kicked { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Kicked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5083,31 +5853,11 @@ pub mod api { )] #[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, - >, + #[doc = "The election failed. No new era is planned."] + pub struct StakingElectionFailed; + impl ::subxt::events::StaticEvent for StakingElectionFailed { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakingElectionFailed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5118,8 +5868,13 @@ pub mod api { )] #[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, + #[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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Chilled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -5130,9 +5885,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceApplyMinCommission { + #[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 PALLET: &'static str = "Staking"; + const EVENT: &'static str = "PayoutStarted"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -5142,2464 +5903,2534 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMinCommission { - pub new: runtime_types::sp_arithmetic::per_things::Perbill, + #[doc = "A validator has set their preferences."] + pub struct ValidatorPrefsSet { + pub stash: ::subxt::utils::AccountId32, + pub prefs: runtime_types::pallet_staking::ValidatorPrefs, } - 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( + impl ::subxt::events::StaticEvent for ValidatorPrefsSet { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ValidatorPrefsSet"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The ideal number of active validators."] + pub fn validator_count( &self, - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "bond", - Bond { - controller, - value, - payee, - }, + "ValidatorCount", + vec![], [ - 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, + 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 = "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 = " Minimum number of staking participants before emergency conditions are imposed."] + pub fn minimum_validator_count( &self, - max_additional: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "bond_extra", - BondExtra { max_additional }, + "MinimumValidatorCount", + vec![], [ - 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, + 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, ], ) } - #[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( + #[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, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "unbond", - Unbond { value }, + "Invulnerables", + vec![], [ - 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, + 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, ], ) } - #[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 = "# "] - pub fn withdraw_unbonded( + #[doc = " Map from all locked \"stash\" accounts to the controller account."] + pub fn bonded( &self, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + _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", - "withdraw_unbonded", - WithdrawUnbonded { num_slashing_spans }, + "Bonded", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[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."] - pub fn validate( + #[doc = " Map from all locked \"stash\" accounts to the controller account."] + pub fn bonded_root( &self, - prefs: runtime_types::pallet_staking::ValidatorPrefs, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "validate", - Validate { prefs }, + "Bonded", + Vec::new(), [ - 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, + 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, ], ) } - #[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 = "# "] - pub fn nominate( + #[doc = " The minimum active bond to become and maintain the role of a nominator."] + pub fn min_nominator_bond( &self, - targets: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "nominate", - Nominate { targets }, + "MinNominatorBond", + vec![], [ - 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, + 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 = "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 = "# "] - pub fn chill(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + #[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", - "chill", - Chill {}, + "MinValidatorBond", + vec![], [ - 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, + 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 = "(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 = " The minimum amount of commission that validators can set."] #[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( + #[doc = " If set to `0`, no limit exists."] + pub fn min_commission( &self, - payee: runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "set_payee", - SetPayee { payee }, + "MinCommission", + vec![], [ - 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, + 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 = "(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 = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger( &self, - controller: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + _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", - "set_controller", - SetController { controller }, + "Ledger", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[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( + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + pub fn ledger_root( &self, - new: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::StakingLedger, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "set_validator_count", - SetValidatorCount { new }, + "Ledger", + Vec::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, + 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, ], ) } - #[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( + #[doc = " Where the reward payment should be made. Keyed by stash."] + pub fn payee( &self, - additional: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( + _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::Address::new_static( "Staking", - "increase_validator_count", - IncreaseValidatorCount { additional }, + "Payee", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[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( + #[doc = " Where the reward payment should be made. Keyed by stash."] + pub fn payee_root( &self, - factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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::Address::new_static( "Staking", - "scale_validator_count", - ScaleValidatorCount { factor }, + "Payee", + Vec::new(), [ - 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, + 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, ], ) } - #[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( + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + pub fn validators( + &self, + _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::Address::new_static( "Staking", - "force_no_eras", - ForceNoEras {}, + "Validators", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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 = "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( + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + pub fn validators_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::Address::new_static( "Staking", - "force_new_era", - ForceNewEra {}, + "Validators", + Vec::new(), [ - 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, + 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 = "Set the validators who cannot be slashed (if any)."] - #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn set_invulnerables( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_validators( &self, - invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "set_invulnerables", - SetInvulnerables { invulnerables }, + "CounterForValidators", + vec![], [ - 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, + 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, ], ) } - #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = " The maximum validator count before we stop allowing new validators to join."] #[doc = ""] - #[doc = "The dispatch origin must be Root."] - pub fn force_unstake( + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_validators_count( &self, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( "Staking", - "force_unstake", - ForceUnstake { - stash, - num_slashing_spans, - }, + "MaxValidatorsCount", + vec![], [ - 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, + 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, ], ) } - #[doc = "Force there to be a new era at the end of sessions indefinitely."] + #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] + #[doc = " they wish to support."] #[doc = ""] - #[doc = "The dispatch origin must be Root."] + #[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 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( + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] + pub fn nominators( &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + _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::Address::new_static( "Staking", - "force_new_era_always", - ForceNewEraAlways {}, + "Nominators", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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 = "Cancel enactment of a deferred slash."] + #[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 = "Can be called by the `T::AdminOrigin`."] + #[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 = "Parameters: era and indices of the slashes for that era to kill."] - pub fn cancel_deferred_slash( + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] + pub fn nominators_root( &self, - era: ::core::primitive::u32, - slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Nominations, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "cancel_deferred_slash", - CancelDeferredSlash { era, slash_indices }, + "Nominators", + Vec::new(), [ - 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, + 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 = "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 = "Counter for the related counted storage map"] + pub fn counter_for_nominators( + &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( + "Staking", + "CounterForNominators", + vec![], + [ + 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, + ], + ) + } + #[doc = " The maximum nominator count before we stop allowing new validators to join."] #[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 = " When this value is not set, no limits are enforced."] + pub fn max_nominators_count( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "MaxNominatorsCount", + vec![], + [ + 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, + ], + ) + } + #[doc = " The current era index."] #[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 = " 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, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Staking", + "CurrentEra", + vec![], + [ + 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, + ], + ) + } + #[doc = " The active era information, it holds index and start."] #[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 = " 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, - validator_stash: ::subxt::utils::AccountId32, - era: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::ActiveEraInfo, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( "Staking", - "payout_stakers", - PayoutStakers { - validator_stash, - era, - }, + "ActiveEra", + vec![], [ - 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, + 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, ], ) } - #[doc = "Rebond a portion of the stash scheduled to be unlocked."] + #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[doc = ""] - #[doc = "The dispatch origin must be signed by the controller."] + #[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::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 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, + ], + ) + } + #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` eras."] #[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( + #[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, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "rebond", - Rebond { value }, + "ErasStartSessionIndex", + Vec::new(), [ - 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, + 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, ], ) } - #[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 = " Exposure of validator at era."] #[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 = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[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 = " 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, + _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::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 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, + ], + ) + } + #[doc = " Exposure of validator at era."] #[doc = ""] - #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "Refunds the transaction fees upon successful execution."] - pub fn reap_stash( + #[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, - stash: ::subxt::utils::AccountId32, - num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "reap_stash", - ReapStash { - stash, - num_slashing_spans, - }, + "ErasStakers", + Vec::new(), [ - 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, + 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, ], ) } - #[doc = "Remove the given nominations from the calling validator."] - #[doc = ""] - #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = " Clipped Exposure of validator at era."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[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 = "- `who`: A list of nominator stash accounts who are nominating this validator which"] - #[doc = " should no longer be nominating this validator."] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] #[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( + #[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, - who: ::std::vec::Vec< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + _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::tx::Payload { - ::subxt::tx::Payload::new_static( + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "kick", - Kick { who }, + "ErasStakersClipped", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 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, + 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, ], ) } - #[doc = "Update the various staking configurations ."] + #[doc = " Clipped Exposure of validator at era."] #[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 = " 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 = "RuntimeOrigin must be Root to call this function."] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] #[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( + #[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, - 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::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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", - "set_staking_configs", - SetStakingConfigs { - min_nominator_bond, - min_validator_bond, - max_nominator_count, - max_validator_count, - chill_threshold, - min_commission, - }, + "ErasStakersClipped", + Vec::new(), [ - 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, + 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, ], ) } - #[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 = " Similar to `ErasStakers`, this holds the preferences of validators."] #[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 = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "If the caller is different than the controller being targeted, the following conditions"] - #[doc = "must be met:"] + #[doc = " Is it removed after `HISTORY_DEPTH` eras."] + pub fn eras_validator_prefs( + &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::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::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 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, + ], + ) + } + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] #[doc = ""] - #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] #[doc = ""] - #[doc = "Or:"] + #[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::Address::new_static( + "Staking", + "ErasValidatorPrefs", + Vec::new(), + [ + 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, + ], + ) + } + #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."] #[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 = " 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<::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::Address::new_static( + "Staking", + "ErasValidatorReward", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 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 = "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( + #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] + pub fn eras_validator_reward_root( &self, - controller: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( "Staking", - "chill_other", - ChillOther { controller }, + "ErasValidatorReward", + Vec::new(), [ - 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, + 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 = "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( + #[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, - validator_stash: ::subxt::utils::AccountId32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( + _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::Address::new_static( "Staking", - "force_apply_min_commission", - ForceApplyMinCommission { validator_stash }, + "ErasRewardPoints", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[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( + #[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, - new: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( + ) -> ::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::Address::new_static( "Staking", - "set_min_commission", - SetMinCommission { new }, + "ErasRewardPoints", + Vec::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, + 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, ], ) } - } - } - #[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; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "EraPaid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Rewarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Slashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] - #[doc = "era as been reported."] - pub struct SlashReported { - pub validator: ::subxt::utils::AccountId32, - pub fraction: runtime_types::sp_arithmetic::per_things::Perbill, - pub slash_era: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for SlashReported { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "SlashReported"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "OldSlashingReportDiscarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new set of stakers was elected."] - pub struct StakersElected; - impl ::subxt::events::StaticEvent for StakersElected { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakersElected"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has 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, - } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Bonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has unbonded this amount."] - pub struct Unbonded { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Unbonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Withdrawn"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Kicked"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The election failed. No new era is planned."] - pub struct StakingElectionFailed; - impl ::subxt::events::StaticEvent for StakingElectionFailed { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "StakingElectionFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has stopped participating as either a validator or nominator."] - pub struct Chilled { - pub stash: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Chilled { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "Chilled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "PayoutStarted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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 PALLET: &'static str = "Staking"; - const EVENT: &'static str = "ValidatorPrefsSet"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new force era mode was set."] - pub struct ForceEra { - pub mode: runtime_types::pallet_staking::Forcing, - } - impl ::subxt::events::StaticEvent for ForceEra { - const PALLET: &'static str = "Staking"; - const EVENT: &'static str = "ForceEra"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The ideal number of active validators."] - pub fn validator_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< - ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "ValidatorCount", - vec![], + "ErasTotalStake", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[doc = " Minimum number of staking participants before emergency conditions are imposed."] - pub fn minimum_validator_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_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "MinimumValidatorCount", - vec![], + "ErasTotalStake", + Vec::new(), [ - 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, + 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, ], ) } - #[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 = " Mode of era forcing."] + pub fn force_era( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "Invulnerables", + "ForceEra", 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, + 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, ], ) } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = " The percentage of the slash that is distributed to reporters."] #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn bonded( + #[doc = " The rest of the slashed value is handled by the `Slash`."] + pub fn slash_reward_fraction( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, + ) -> ::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( - "Staking", - "Bonded", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[doc = " Map from all locked \"stash\" accounts to the controller account."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn bonded_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "Bonded", - Vec::new(), + "SlashRewardFraction", + vec![], [ - 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, + 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, ], ) } - #[doc = " The minimum active bond to become and maintain the role of a nominator."] - pub fn min_nominator_bond( + #[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::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MinNominatorBond", + "CanceledSlashPayout", 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, + 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, ], ) } - #[doc = " The minimum active bond to become and maintain the role of a validator."] - pub fn min_validator_bond( + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + _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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MinValidatorBond", - vec![], + "UnappliedSlashes", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[doc = " The minimum active nominator stake of the last successful election."] - pub fn minimum_active_stake( + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MinimumActiveStake", - vec![], + "UnappliedSlashes", + Vec::new(), [ - 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, + 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, ], ) } - #[doc = " The minimum amount of commission that validators can set."] + #[doc = " A mapping from still-bonded eras to the first session index of that era."] #[doc = ""] - #[doc = " If set to `0`, no limit exists."] - pub fn min_commission( + #[doc = " Must contains information for eras for the range:"] + #[doc = " `[active_era - bounding_duration; active_era]`"] + pub fn bonded_eras( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MinCommission", + "BondedEras", 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, + 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, ], ) } - #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger( + #[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, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::StakingLedger, + _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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "Ledger", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], + "ValidatorSlashInEra", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 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, + 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, ], ) } - #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] - pub fn ledger_root( + #[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< - runtime_types::pallet_staking::StakingLedger, + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "Ledger", + "ValidatorSlashInEra", 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, + 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, ], ) } - #[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 = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::RewardDestination< - ::subxt::utils::AccountId32, - >, - ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "Payee", - vec![::subxt::storage::address::StorageMapKey::new( - _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, + "NominatorSlashInEra", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 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, ], ) } - #[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 = " 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< - runtime_types::pallet_staking::RewardDestination< - ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "Payee", + "NominatorSlashInEra", 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, + 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, ], ) } - #[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( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::Yes, + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "Validators", - vec![::subxt::storage::address::StorageMapKey::new( + "SlashingSpans", + vec![::subxt::storage::address::StaticStorageMapKey::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, + 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, ], ) } - #[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( + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::ValidatorPrefs, + ) -> ::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( - "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 = "Counter for the related counted storage map"] - pub fn counter_for_validators( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CounterForValidators", - 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, - ], - ) - } - #[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< - ::core::primitive::u32, ::subxt::storage::address::Yes, - (), - (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MaxValidatorsCount", - vec![], + "SlashingSpans", + Vec::new(), [ - 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, + 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, ], ) } - #[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( + #[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< - runtime_types::pallet_staking::Nominations, + _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( + ::subxt::storage::address::Address::new_static( "Staking", - "Nominators", - vec![::subxt::storage::address::StorageMapKey::new( + "SpanSlash", + vec![::subxt::storage::address::StaticStorageMapKey::new(&( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + _1.borrow(), + ))], [ - 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, + 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, ], ) } - #[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_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< - runtime_types::pallet_staking::Nominations, - (), + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Staking", - "Nominators", + "SpanSlash", 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, + 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, ], ) } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_nominators( + #[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::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "CounterForNominators", + "CurrentPlannedSession", vec![], [ - 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, + 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, ], ) } - #[doc = " The maximum nominator count before we stop allowing new validators to join."] + #[doc = " Indices of validators that have offended in the active era and whether they are currently"] + #[doc = " disabled."] #[doc = ""] - #[doc = " When this value is not set, no limits are enforced."] - pub fn max_nominators_count( + #[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::storage::address::StaticStorageAddress< - ::core::primitive::u32, + ) -> ::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::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "MaxNominatorsCount", + "OffendingValidators", vec![], [ - 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, + 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, ], ) } - #[doc = " The current era index."] + #[doc = " True if network has been upgraded to this version."] + #[doc = " Storage version of the pallet."] #[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 is set to v7.0.0 for new networks."] + pub fn storage_version( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_staking::Releases, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "CurrentEra", + "StorageVersion", vec![], [ - 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, + 70u8, 24u8, 179u8, 189u8, 168u8, 164u8, 175u8, 150u8, 215u8, + 43u8, 18u8, 110u8, 180u8, 137u8, 237u8, 187u8, 185u8, 50u8, + 31u8, 57u8, 16u8, 110u8, 6u8, 170u8, 19u8, 7u8, 160u8, 134u8, + 232u8, 227u8, 151u8, 116u8, ], ) } - #[doc = " The active era information, it holds index and start."] - #[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 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::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::ActiveEraInfo, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_arithmetic::per_things::Percent, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Staking", - "ActiveEra", + "ChillThreshold", vec![], [ - 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, + 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, ], ) } - #[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( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of nominations per nominator."] + pub fn max_nominations( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( "Staking", - "ErasStartSessionIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + "MaxNominations", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 session index at which the era start for the last `HISTORY_DEPTH` eras."] + #[doc = " Number of eras to keep in history."] #[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 = " 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::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( "Staking", - "ErasStartSessionIndex", - Vec::new(), + "HistoryDepth", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " 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 = " Number of sessions per era."] + pub fn sessions_per_era( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::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, - ), - ], + "SessionsPerEra", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " 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 = " Number of eras that staked funds must remain bonded for."] + pub fn bonding_duration( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( "Staking", - "ErasStakers", - Vec::new(), + "BondingDuration", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " 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 = " Number of eras that slashes are deferred by, after computation."] #[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 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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::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, - ), - ], + "SlashDeferDuration", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " 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 = " The maximum number of nominators rewarded for each validator."] #[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 = " 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::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( "Staking", - "ErasStakersClipped", - Vec::new(), + "MaxNominatorRewardedPerValidator", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " 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 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 = " Is it removed after `HISTORY_DEPTH` eras."] - pub fn eras_validator_prefs( + #[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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::ValidatorPrefs, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::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, - ), - ], - [ - 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, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_staking::ValidatorPrefs, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( "Staking", - "ErasValidatorPrefs", - Vec::new(), + "MaxUnlockingChunks", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 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( + } + } + } + pub mod offences { + use super::root_mod; + use super::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, + Debug, + )] + #[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 PALLET: &'static str = "Offences"; + const EVENT: &'static str = "Offence"; + } + } + 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<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + _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, + ( + ::subxt::utils::AccountId32, + runtime_types::pallet_staking::Exposure< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ), + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ErasValidatorReward", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Offences", + "Reports", + vec![::subxt::storage::address::StaticStorageMapKey::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, + 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, ], ) } - #[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( + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + ) -> ::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::StaticStorageAddress::new( - "Staking", - "ErasValidatorReward", + ::subxt::storage::address::Address::new_static( + "Offences", + "Reports", Vec::new(), [ - 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, + 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, ], ) } - #[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 = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::utils::AccountId32, - >, + _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::StaticStorageAddress::new( - "Staking", - "ErasRewardPoints", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Offences", + "ConcurrentReportsIndex", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 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, + 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, ], ) } - #[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 = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::EraRewardPoints< - ::subxt::utils::AccountId32, - >, + ) -> ::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::StaticStorageAddress::new( - "Staking", - "ErasRewardPoints", + ::subxt::storage::address::Address::new_static( + "Offences", + "ConcurrentReportsIndex", 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, + 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, ], ) } - #[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 = " 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( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + _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::StaticStorageAddress::new( - "Staking", - "ErasTotalStake", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Offences", + "ReportsByKindIndex", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 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, + 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, ], ) } - #[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( + #[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( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + ) -> ::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( - "Staking", - "ErasTotalStake", + ::subxt::storage::address::Address::new_static( + "Offences", + "ReportsByKindIndex", Vec::new(), [ - 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, + 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, ], ) } - #[doc = " Mode of era forcing."] - pub fn force_era( + } + } + } + pub mod historical { + use super::root_mod; + use super::runtime_types; + } + pub mod session { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetKeys { + pub keys: runtime_types::polkadot_runtime::SessionKeys, + pub proof: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PurgeKeys; + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::Forcing, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ForceEra", - vec![], + keys: runtime_types::polkadot_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Session", + "set_keys", + SetKeys { keys, proof }, [ - 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, + 17u8, 127u8, 23u8, 71u8, 118u8, 133u8, 89u8, 105u8, 93u8, + 52u8, 46u8, 201u8, 151u8, 19u8, 124u8, 195u8, 228u8, 229u8, + 22u8, 216u8, 32u8, 54u8, 67u8, 222u8, 91u8, 175u8, 206u8, + 7u8, 238u8, 118u8, 81u8, 112u8, ], ) } - #[doc = " The percentage of the slash that is distributed to reporters."] + #[doc = "Removes any session key(s) of the function caller."] #[doc = ""] - #[doc = " The rest of the slashed value is handled by the `Slash`."] - pub fn slash_reward_fraction( + #[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", + 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "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 PALLET: &'static str = "Session"; + const EVENT: &'static str = "NewSession"; + } + } + 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< - runtime_types::sp_arithmetic::per_things::Perbill, + ) -> ::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::StaticStorageAddress::new( - "Staking", - "SlashRewardFraction", + ::subxt::storage::address::Address::new_static( + "Session", + "Validators", vec![], [ - 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, + 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 = " 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 = " Current index of the session."] + pub fn current_index( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + ) -> ::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", - "CanceledSlashPayout", + ::subxt::storage::address::Address::new_static( + "Session", + "CurrentIndex", vec![], [ - 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, + 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, ], ) } - #[doc = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes( + #[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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::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( - "Staking", - "UnappliedSlashes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Session", + "QueuedChanged", + vec![], [ - 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, + 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, ], ) } - #[doc = " All unapplied slashes that are queued for later."] - pub fn unapplied_slashes_root( + #[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< - ::std::vec::Vec< - runtime_types::pallet_staking::UnappliedSlash< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::SessionKeys, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "UnappliedSlashes", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Session", + "QueuedKeys", + vec![], [ - 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, + 197u8, 174u8, 245u8, 219u8, 36u8, 118u8, 73u8, 184u8, 156u8, + 93u8, 167u8, 107u8, 142u8, 7u8, 41u8, 51u8, 77u8, 191u8, + 68u8, 95u8, 71u8, 76u8, 253u8, 137u8, 73u8, 194u8, 169u8, + 234u8, 217u8, 76u8, 157u8, 223u8, ], ) } - #[doc = " A mapping from still-bonded eras to the first session index of that era."] + #[doc = " Indices of disabled validators."] #[doc = ""] - #[doc = " Must contains information for eras for the range:"] - #[doc = " `[active_era - bounding_duration; active_era]`"] - pub fn bonded_eras( + #[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< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u32>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "BondedEras", + ::subxt::storage::address::Address::new_static( + "Session", + "DisabledValidators", vec![], [ - 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, + 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, ], ) } - #[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 = " The next session keys for a validator."] + pub fn next_keys( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - ), + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::SessionKeys, ::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::storage::address::Address::new_static( + "Session", + "NextKeys", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, + 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, + 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, + 131u8, 29u8, 192u8, 248u8, 166u8, ], ) } - #[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 next session keys for a validator."] + pub fn next_keys_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_arithmetic::per_things::Perbill, - ::core::primitive::u128, - ), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::SessionKeys, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "ValidatorSlashInEra", + ::subxt::storage::address::Address::new_static( + "Session", + "NextKeys", Vec::new(), [ - 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, + 94u8, 197u8, 147u8, 245u8, 165u8, 97u8, 186u8, 57u8, 142u8, + 66u8, 132u8, 213u8, 126u8, 3u8, 77u8, 88u8, 191u8, 33u8, + 82u8, 153u8, 11u8, 109u8, 96u8, 252u8, 193u8, 171u8, 158u8, + 131u8, 29u8, 192u8, 248u8, 166u8, ], ) } - #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] - pub fn nominator_slash_in_era( + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + _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( - "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::storage::address::Address::new_static( + "Session", + "KeyOwner", + vec![::subxt::storage::address::StaticStorageMapKey::new(&( + _0.borrow(), + _1.borrow(), + ))], [ - 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, + 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, ], ) } - #[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 = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::AccountId32, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "NominatorSlashInEra", + ::subxt::storage::address::Address::new_static( + "Session", + "KeyOwner", Vec::new(), [ - 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, + 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, ], ) } - #[doc = " Slashing spans for stash accounts."] - pub fn slashing_spans( + } + } + } + pub mod grandpa { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::std::boxed::Box< + runtime_types::sp_finality_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + pub key_owner_proof: runtime_types::sp_session::MembershipProof, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NoteStalled { + pub delay: ::core::primitive::u32, + pub best_finalized_block_number: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[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, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::slashing::SlashingSpans, + equivocation_proof : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: utils :: H256 , :: core :: primitive :: u32 >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "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, + ], + ) + } + #[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::Payload { + ::subxt::tx::Payload::new_static( + "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, + ], + ) + } + #[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::Payload { + ::subxt::tx::Payload::new_static( + "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, + ], + ) + } + } + } + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "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 PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "NewAuthorities"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been paused."] + pub struct Paused; + impl ::subxt::events::StaticEvent for Paused { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Paused"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Current authority set has been resumed."] + pub struct Resumed; + impl ::subxt::events::StaticEvent for Resumed { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Resumed"; + } + } + 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::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( - "Staking", - "SlashingSpans", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Grandpa", + "State", + vec![], [ - 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, + 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 = " Slashing spans for stash accounts."] - pub fn slashing_spans_root( + #[doc = " Pending change: (signaled at, scheduled change)."] + pub fn pending_change( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::slashing::SlashingSpans, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_grandpa::StoredPendingChange< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "SlashingSpans", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Grandpa", + "PendingChange", + vec![], [ - 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, + 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 = " 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 = " next block number where we can force a change."] + pub fn next_forced( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - ::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( - "Staking", - "SpanSlash", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "Grandpa", + "NextForced", + vec![], [ - 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, + 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, ], ) } - #[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 = " `true` if we are currently stalled."] + pub fn stalled( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_staking::slashing::SpanRecord< - ::core::primitive::u128, - >, - (), - ::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( - "Staking", - "SpanSlash", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Grandpa", + "Stalled", + vec![], [ - 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, + 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, ], ) } - #[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( + #[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< - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Staking", - "CurrentPlannedSession", + ::subxt::storage::address::Address::new_static( + "Grandpa", + "CurrentSetId", vec![], [ - 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, + 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, ], ) } - #[doc = " Indices of validators that have offended in the active era and whether they are currently"] - #[doc = " disabled."] + #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] + #[doc = " members were responsible."] #[doc = ""] - #[doc = " This 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( + #[doc = " TWOX-NOTE: `SetId` is not under user control."] + pub fn set_id_session( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, - ::subxt::storage::address::Yes, + _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( - "Staking", - "OffendingValidators", - vec![], + ::subxt::storage::address::Address::new_static( + "Grandpa", + "SetIdSession", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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, ], ) } - #[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( + #[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< - runtime_types::sp_arithmetic::per_things::Percent, - ::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", - "ChillThreshold", - vec![], + ::subxt::storage::address::Address::new_static( + "Grandpa", + "SetIdSession", + Vec::new(), [ - 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, + 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, ], ) } @@ -7609,144 +8440,14 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Maximum number of nominations per nominator."] - pub fn max_nominations( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::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( + #[doc = " Max Authorities in use"] + pub fn max_authorities( &self, ) -> ::subxt::constants::StaticConstantAddress<::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<::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<::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<::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<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "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::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Staking", - "MaxUnlockingChunks", + "Grandpa", + "MaxAuthorities", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -7758,7 +8459,7 @@ pub mod api { } } } - pub mod session { + pub mod im_online { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -7775,90 +8476,52 @@ pub mod api { )] #[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::kitchensink_runtime::SessionKeys, - pub proof: ::std::vec::Vec<::core::primitive::u8>, + 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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PurgeKeys; pub struct TransactionApi; impl TransactionApi { - #[doc = "Sets the session key(s) of the function caller to `keys`."] - #[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 = "- 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 set_keys( + pub fn heartbeat( &self, - keys: runtime_types::kitchensink_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Session", - "set_keys", - SetKeys { keys, proof }, - [ - 19u8, 210u8, 111u8, 216u8, 235u8, 1u8, 119u8, 211u8, 79u8, - 9u8, 91u8, 245u8, 109u8, 116u8, 95u8, 223u8, 233u8, 189u8, - 185u8, 243u8, 46u8, 178u8, 10u8, 4u8, 231u8, 159u8, 217u8, - 59u8, 45u8, 167u8, 207u8, 137u8, - ], - ) - } - #[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 { + 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( - "Session", - "purge_keys", - PurgeKeys {}, + "ImOnline", + "heartbeat", + Heartbeat { + heartbeat, + signature, + }, [ - 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, + 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, ], ) } } } #[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 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, @@ -7867,230 +8530,260 @@ pub mod api { )] #[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, + #[doc = "A new heartbeat was received from `AuthorityId`."] + pub struct HeartbeatReceived { + pub authority_id: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, } - impl ::subxt::events::StaticEvent for NewSession { - const PALLET: &'static str = "Session"; - const EVENT: &'static str = "NewSession"; + impl ::subxt::events::StaticEvent for HeartbeatReceived { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "HeartbeatReceived"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "At the end of the session, no offence was committed."] + pub struct AllGood; + impl ::subxt::events::StaticEvent for AllGood { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "AllGood"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "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, + >, + )>, + } + impl ::subxt::events::StaticEvent for SomeOffline { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "SomeOffline"; } } 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< - ::std::vec::Vec<::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( + #[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( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "CurrentIndex", + ::subxt::storage::address::Address::new_static( + "ImOnline", + "HeartbeatAfter", 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, + 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, ], ) } - #[doc = " True if the underlying economic identities or weighting behind the validators"] - #[doc = " has changed in the queued validator set."] - pub fn queued_changed( + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::bool, + ) -> ::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::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Session", - "QueuedChanged", + ::subxt::storage::address::Address::new_static( + "ImOnline", + "Keys", 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, + 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, ], ) } - #[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( + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::kitchensink_runtime::SessionKeys, - )>, - ::subxt::storage::address::Yes, + _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::StaticStorageAddress::new( - "Session", - "QueuedKeys", - vec![], - [ - 57u8, 139u8, 66u8, 116u8, 133u8, 98u8, 66u8, 181u8, 96u8, - 190u8, 69u8, 124u8, 158u8, 124u8, 187u8, 164u8, 223u8, 89u8, - 209u8, 84u8, 106u8, 127u8, 85u8, 202u8, 130u8, 7u8, 250u8, - 163u8, 99u8, 209u8, 225u8, 25u8, - ], - ) - } - #[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< - ::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, + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), ], - ) - } - #[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< - runtime_types::kitchensink_runtime::SessionKeys, - ::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, - )], [ - 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8, - 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8, - 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8, - 116u8, 207u8, 46u8, 82u8, 64u8, + 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, ], ) } - #[doc = " The next session keys for a validator."] - pub fn next_keys_root( + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] + #[doc = " `WrapperOpaque`."] + pub fn received_heartbeats_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::SessionKeys, + ) -> ::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::StaticStorageAddress::new( - "Session", - "NextKeys", + ::subxt::storage::address::Address::new_static( + "ImOnline", + "ReceivedHeartbeats", Vec::new(), [ - 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8, - 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8, - 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8, - 116u8, 207u8, 46u8, 82u8, 64u8, + 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, ], ) } - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner( + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks( &self, - _0: impl ::std::borrow::Borrow, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, + _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::StaticStorageAddress::new( - "Session", - "KeyOwner", - vec![::subxt::storage::address::StorageMapKey::new( - &(_0.borrow(), _1.borrow()), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 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, + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, ], ) } - #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] - pub fn key_owner_root( + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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::StaticStorageAddress::new( - "Session", - "KeyOwner", + ::subxt::storage::address::Address::new_static( + "ImOnline", + "AuthoredBlocks", 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, + 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8, + 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8, + 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8, + 227u8, 228u8, 223u8, 103u8, 151u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A configuration for base priority of unsigned transactions."] + #[doc = ""] + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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; + use super::runtime_types; + } pub mod democracy { use super::root_mod; use super::runtime_types; @@ -8110,7 +8803,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Propose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, #[codec(compact)] pub value: ::core::primitive::u128, @@ -8168,7 +8861,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalPropose { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, } #[derive( @@ -8182,7 +8875,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeMajority { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, } #[derive( @@ -8196,7 +8889,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct ExternalProposeDefault { pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, } #[derive( @@ -8248,10 +8941,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Delegate { - pub to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } @@ -8285,10 +8975,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Unlock { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -8313,10 +9000,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub index: ::core::primitive::u32, } #[derive( @@ -8359,7 +9043,7 @@ pub mod api { pub fn propose( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, value: ::core::primitive::u128, ) -> ::subxt::tx::Payload { @@ -8456,7 +9140,7 @@ pub mod api { pub fn external_propose( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -8485,10 +9169,9 @@ pub mod api { pub fn external_propose_majority( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::tx::Payload - { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "external_propose_majority", @@ -8515,10 +9198,9 @@ pub mod api { pub fn external_propose_default( &self, proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, - ) -> ::subxt::tx::Payload - { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Democracy", "external_propose_default", @@ -8639,10 +9321,7 @@ pub mod api { #[doc = " voted on. Weight is charged as if maximum votes."] pub fn delegate( &self, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + to: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, ) -> ::subxt::tx::Payload { @@ -8655,10 +9334,10 @@ pub mod api { balance, }, [ - 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, + 22u8, 205u8, 202u8, 196u8, 63u8, 1u8, 196u8, 109u8, 4u8, + 190u8, 38u8, 142u8, 248u8, 200u8, 136u8, 12u8, 194u8, 170u8, + 237u8, 176u8, 70u8, 21u8, 112u8, 154u8, 93u8, 169u8, 211u8, + 120u8, 156u8, 68u8, 14u8, 231u8, ], ) } @@ -8716,20 +9395,17 @@ pub mod api { #[doc = "Weight: `O(R)` with R number of vote of target."] pub fn unlock( &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "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, + 126u8, 151u8, 230u8, 89u8, 49u8, 247u8, 242u8, 139u8, 190u8, + 15u8, 47u8, 2u8, 132u8, 165u8, 48u8, 205u8, 196u8, 66u8, + 230u8, 222u8, 164u8, 249u8, 152u8, 107u8, 0u8, 99u8, 238u8, + 167u8, 72u8, 77u8, 145u8, 236u8, ], ) } @@ -8793,10 +9469,7 @@ pub mod api { #[doc = " Weight is calculated for the maximum number of vote."] pub fn remove_other_vote( &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, index: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -8804,10 +9477,10 @@ pub mod api { "remove_other_vote", RemoveOtherVote { target, index }, [ - 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, + 151u8, 190u8, 115u8, 124u8, 185u8, 43u8, 70u8, 147u8, 98u8, + 167u8, 120u8, 25u8, 231u8, 143u8, 214u8, 25u8, 240u8, 74u8, + 35u8, 58u8, 206u8, 78u8, 121u8, 215u8, 190u8, 42u8, 2u8, + 206u8, 241u8, 44u8, 92u8, 23u8, ], ) } @@ -9135,13 +9808,14 @@ pub mod api { #[doc = " The number of (public) proposals that have been made so far."] pub fn public_prop_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "PublicPropCount", vec![], @@ -9156,11 +9830,12 @@ pub mod api { #[doc = " The public proposals. Unsorted. The second item is the proposal."] pub fn public_props( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, ::subxt::utils::AccountId32, )>, @@ -9168,7 +9843,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "PublicProps", vec![], @@ -9186,7 +9861,8 @@ pub mod api { pub fn deposit_of( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, @@ -9197,12 +9873,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "DepositOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8, @@ -9217,7 +9892,8 @@ pub mod api { #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] pub fn deposit_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, @@ -9228,7 +9904,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "DepositOf", Vec::new(), @@ -9243,13 +9919,14 @@ pub mod api { #[doc = " The next free referendum index, aka the number of referenda started so far."] pub fn referendum_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "ReferendumCount", vec![], @@ -9265,13 +9942,14 @@ pub mod api { #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] pub fn lowest_unbaked( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "LowestUnbaked", vec![], @@ -9289,11 +9967,12 @@ pub mod api { pub fn referendum_info_of( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, ::core::primitive::u128, >, @@ -9301,12 +9980,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "ReferendumInfoOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8, @@ -9321,11 +9999,12 @@ pub mod api { #[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::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::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, ::core::primitive::u128, >, @@ -9333,7 +10012,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "ReferendumInfoOf", Vec::new(), @@ -9352,7 +10031,8 @@ pub mod api { pub fn voting_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::utils::AccountId32, @@ -9362,12 +10042,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "VotingOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8, @@ -9383,7 +10062,8 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] pub fn voting_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::utils::AccountId32, @@ -9393,7 +10073,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "VotingOf", Vec::new(), @@ -9409,13 +10089,14 @@ pub mod api { #[doc = " proposal."] pub fn last_tabled_was_external( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::bool, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "LastTabledWasExternal", vec![], @@ -9433,10 +10114,11 @@ pub mod api { #[doc = " - `PublicProps` is empty."] pub fn next_external( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ), @@ -9444,7 +10126,7 @@ pub mod api { (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "NextExternal", vec![], @@ -9461,7 +10143,8 @@ pub mod api { pub fn blacklist( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -9472,12 +10155,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "Blacklist", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8, @@ -9491,7 +10173,8 @@ pub mod api { #[doc = " (until when it may not be resubmitted) and who vetoed it."] pub fn blacklist_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u32, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -9502,7 +10185,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "Blacklist", Vec::new(), @@ -9518,18 +10201,18 @@ pub mod api { pub fn cancellations( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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( + ::subxt::storage::address::Address::new_static( "Democracy", "Cancellations", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8, @@ -9542,13 +10225,14 @@ pub mod api { #[doc = " Record of all proposals that have been subject to emergency cancellation."] pub fn cancellations_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::bool, (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Democracy", "Cancellations", Vec::new(), @@ -9806,7 +10490,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -9823,7 +10507,7 @@ pub mod api { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -9958,7 +10642,7 @@ pub mod api { #[doc = "# "] pub fn execute( &self, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, + proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -9969,10 +10653,10 @@ pub mod api { length_bound, }, [ - 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, - 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, - 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, - 21u8, 24u8, 213u8, 28u8, 224u8, + 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, + 174u8, 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, + 255u8, 184u8, 36u8, 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, + 193u8, 132u8, 20u8, 244u8, 40u8, ], ) } @@ -10006,7 +10690,7 @@ pub mod api { pub fn propose( &self, threshold: ::core::primitive::u32, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, + proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -10018,10 +10702,10 @@ pub mod api { length_bound, }, [ - 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, - 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, - 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, - 94u8, 45u8, 11u8, 127u8, + 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, + 106u8, 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, + 70u8, 235u8, 43u8, 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, + 201u8, 201u8, 114u8, 236u8, 197u8, ], ) } @@ -10352,7 +11036,8 @@ pub mod api { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::H256, >, @@ -10360,7 +11045,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "Proposals", vec![], @@ -10376,45 +11061,46 @@ pub mod api { pub fn proposal_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::RuntimeCall, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "ProposalOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, + 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, + 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, + 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, + 253u8, 110u8, 183u8, 61u8, 225u8, ], ) } #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::RuntimeCall, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "ProposalOf", Vec::new(), [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, + 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, + 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, + 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, + 253u8, 110u8, 183u8, 61u8, 225u8, ], ) } @@ -10422,7 +11108,8 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_collective::Votes< ::subxt::utils::AccountId32, ::core::primitive::u32, @@ -10431,12 +11118,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "Voting", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, @@ -10449,7 +11135,8 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_collective::Votes< ::subxt::utils::AccountId32, ::core::primitive::u32, @@ -10458,7 +11145,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "Voting", Vec::new(), @@ -10473,13 +11160,14 @@ pub mod api { #[doc = " Proposals so far."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "ProposalCount", vec![], @@ -10494,13 +11182,14 @@ pub mod api { #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "Members", vec![], @@ -10515,13 +11204,14 @@ pub mod api { #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Council", "Prime", vec![], @@ -10569,7 +11259,7 @@ pub mod api { #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Execute { pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -10586,7 +11276,7 @@ pub mod api { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: - ::std::boxed::Box, + ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } @@ -10721,7 +11411,7 @@ pub mod api { #[doc = "# "] pub fn execute( &self, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, + proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -10732,10 +11422,10 @@ pub mod api { length_bound, }, [ - 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, - 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, - 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, - 21u8, 24u8, 213u8, 28u8, 224u8, + 207u8, 108u8, 143u8, 240u8, 75u8, 66u8, 184u8, 27u8, 120u8, + 174u8, 60u8, 30u8, 179u8, 210u8, 21u8, 55u8, 253u8, 128u8, + 255u8, 184u8, 36u8, 121u8, 162u8, 148u8, 200u8, 98u8, 165u8, + 193u8, 132u8, 20u8, 244u8, 40u8, ], ) } @@ -10769,7 +11459,7 @@ pub mod api { pub fn propose( &self, threshold: ::core::primitive::u32, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, + proposal: runtime_types::polkadot_runtime::RuntimeCall, length_bound: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -10781,10 +11471,10 @@ pub mod api { length_bound, }, [ - 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, - 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, - 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, - 94u8, 45u8, 11u8, 127u8, + 185u8, 29u8, 21u8, 240u8, 194u8, 157u8, 44u8, 223u8, 201u8, + 106u8, 168u8, 104u8, 111u8, 7u8, 168u8, 17u8, 73u8, 188u8, + 70u8, 235u8, 43u8, 82u8, 236u8, 70u8, 236u8, 94u8, 68u8, + 201u8, 201u8, 114u8, 236u8, 197u8, ], ) } @@ -11115,7 +11805,8 @@ pub mod api { #[doc = " The hashes of the active proposals."] pub fn proposals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::H256, >, @@ -11123,7 +11814,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "Proposals", vec![], @@ -11139,45 +11830,46 @@ pub mod api { pub fn proposal_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::RuntimeCall, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "ProposalOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, + 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, + 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, + 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, + 253u8, 110u8, 183u8, 61u8, 225u8, ], ) } #[doc = " Actual proposal for a given hash, if it's current."] pub fn proposal_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime::RuntimeCall, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "ProposalOf", Vec::new(), [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, + 99u8, 114u8, 104u8, 38u8, 106u8, 3u8, 76u8, 17u8, 152u8, + 13u8, 170u8, 109u8, 232u8, 209u8, 208u8, 60u8, 216u8, 48u8, + 170u8, 235u8, 241u8, 25u8, 78u8, 92u8, 141u8, 251u8, 247u8, + 253u8, 110u8, 183u8, 61u8, 225u8, ], ) } @@ -11185,7 +11877,8 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_collective::Votes< ::subxt::utils::AccountId32, ::core::primitive::u32, @@ -11194,12 +11887,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "Voting", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, @@ -11212,7 +11904,8 @@ pub mod api { #[doc = " Votes on a given proposal, if it is ongoing."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_collective::Votes< ::subxt::utils::AccountId32, ::core::primitive::u32, @@ -11221,7 +11914,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "Voting", Vec::new(), @@ -11236,13 +11929,14 @@ pub mod api { #[doc = " Proposals so far."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "ProposalCount", vec![], @@ -11257,13 +11951,14 @@ pub mod api { #[doc = " The current members of the collective. This is stored sorted (just by value)."] pub fn members( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::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::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "Members", vec![], @@ -11278,13 +11973,14 @@ pub mod api { #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] pub fn prime( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalCommittee", "Prime", vec![], @@ -11299,7 +11995,7 @@ pub mod api { } } } - pub mod elections { + pub mod phragmen_election { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -11366,10 +12062,7 @@ pub mod api { #[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 who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub slash_bond: ::core::primitive::bool, pub rerun_election: ::core::primitive::bool, } @@ -11417,7 +12110,7 @@ pub mod api { value: ::core::primitive::u128, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Elections", + "PhragmenElection", "vote", Vote { votes, value }, [ @@ -11435,7 +12128,7 @@ pub mod api { #[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", + "PhragmenElection", "remove_voter", RemoveVoter {}, [ @@ -11466,7 +12159,7 @@ pub mod api { candidate_count: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Elections", + "PhragmenElection", "submit_candidacy", SubmitCandidacy { candidate_count }, [ @@ -11500,7 +12193,7 @@ pub mod api { renouncing: runtime_types::pallet_elections_phragmen::Renouncing, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Elections", + "PhragmenElection", "renounce_candidacy", RenounceCandidacy { renouncing }, [ @@ -11531,15 +12224,12 @@ pub mod api { #[doc = "# "] pub fn remove_member( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, slash_bond: ::core::primitive::bool, rerun_election: ::core::primitive::bool, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Elections", + "PhragmenElection", "remove_member", RemoveMember { who, @@ -11547,10 +12237,10 @@ pub mod api { rerun_election, }, [ - 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, + 45u8, 106u8, 9u8, 19u8, 133u8, 38u8, 20u8, 233u8, 12u8, + 169u8, 216u8, 40u8, 23u8, 139u8, 184u8, 202u8, 2u8, 124u8, + 202u8, 48u8, 205u8, 176u8, 161u8, 43u8, 66u8, 24u8, 189u8, + 183u8, 233u8, 62u8, 102u8, 237u8, ], ) } @@ -11570,7 +12260,7 @@ pub mod api { num_defunct: ::core::primitive::u32, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Elections", + "PhragmenElection", "clean_defunct_voters", CleanDefunctVoters { num_voters, @@ -11611,7 +12301,7 @@ pub mod api { )>, } impl ::subxt::events::StaticEvent for NewTerm { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "NewTerm"; } #[derive( @@ -11627,7 +12317,7 @@ pub mod api { #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] pub struct EmptyTerm; impl ::subxt::events::StaticEvent for EmptyTerm { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "EmptyTerm"; } #[derive( @@ -11642,7 +12332,7 @@ pub mod api { #[doc = "Internal error happened while trying to perform election."] pub struct ElectionError; impl ::subxt::events::StaticEvent for ElectionError { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "ElectionError"; } #[derive( @@ -11660,7 +12350,7 @@ pub mod api { pub member: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for MemberKicked { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "MemberKicked"; } #[derive( @@ -11677,7 +12367,7 @@ pub mod api { pub candidate: ::subxt::utils::AccountId32, } impl ::subxt::events::StaticEvent for Renounced { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "Renounced"; } #[derive( @@ -11698,7 +12388,7 @@ pub mod api { pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for CandidateSlashed { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "CandidateSlashed"; } #[derive( @@ -11716,7 +12406,7 @@ pub mod api { pub amount: ::core::primitive::u128, } impl ::subxt::events::StaticEvent for SeatHolderSlashed { - const PALLET: &'static str = "Elections"; + const PALLET: &'static str = "PhragmenElection"; const EVENT: &'static str = "SeatHolderSlashed"; } } @@ -11729,7 +12419,8 @@ pub mod api { #[doc = " Invariant: Always sorted based on account id."] pub fn members( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::utils::AccountId32, @@ -11740,8 +12431,8 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "Members", vec![], [ @@ -11758,7 +12449,8 @@ pub mod api { #[doc = " last (i.e. _best_) runner-up will be replaced."] pub fn runners_up( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec< runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::utils::AccountId32, @@ -11769,8 +12461,8 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "RunnersUp", vec![], [ @@ -11789,7 +12481,8 @@ pub mod api { #[doc = " Invariant: Always sorted based on account id."] pub fn candidates( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::std::vec::Vec<( ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -11798,8 +12491,8 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "Candidates", vec![], [ @@ -11813,14 +12506,15 @@ pub mod api { #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] pub fn election_rounds( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "ElectionRounds", vec![], [ @@ -11837,7 +12531,8 @@ pub mod api { pub fn voting( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_elections_phragmen::Voter< ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -11846,12 +12541,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "Voting", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8, @@ -11866,7 +12560,8 @@ pub mod api { #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] pub fn voting_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_elections_phragmen::Voter< ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -11875,8 +12570,8 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Elections", + ::subxt::storage::address::Address::new_static( + "PhragmenElection", "Voting", Vec::new(), [ @@ -11900,7 +12595,7 @@ pub mod api { [::core::primitive::u8; 8usize], > { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "PalletId", [ 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8, @@ -11916,7 +12611,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "CandidacyBond", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -11935,7 +12630,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "VotingBondBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -11951,7 +12646,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "VotingBondFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, @@ -11967,7 +12662,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "DesiredMembers", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -11983,7 +12678,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "DesiredRunnersUp", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12001,7 +12696,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "TermDuration", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12021,7 +12716,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "MaxCandidates", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12040,7 +12735,7 @@ pub mod api { ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Elections", + "PhragmenElection", "MaxVoters", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, @@ -12071,10 +12766,7 @@ pub mod api { #[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, - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12086,10 +12778,7 @@ pub mod api { #[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 who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12101,14 +12790,8 @@ pub mod api { #[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, - >, + pub remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12132,10 +12815,7 @@ pub mod api { #[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, - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12147,10 +12827,7 @@ pub mod api { #[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, - >, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12169,20 +12846,17 @@ pub mod api { #[doc = "May only be called from `T::AddOrigin`."] pub fn add_member( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "add_member", AddMember { who }, [ - 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, + 165u8, 116u8, 123u8, 50u8, 236u8, 196u8, 108u8, 211u8, 112u8, + 214u8, 121u8, 105u8, 7u8, 88u8, 125u8, 99u8, 24u8, 0u8, + 168u8, 65u8, 158u8, 100u8, 42u8, 62u8, 101u8, 59u8, 30u8, + 174u8, 170u8, 119u8, 141u8, 121u8, ], ) } @@ -12191,20 +12865,17 @@ pub mod api { #[doc = "May only be called from `T::RemoveOrigin`."] pub fn remove_member( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "remove_member", RemoveMember { who }, [ - 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, + 177u8, 18u8, 217u8, 235u8, 254u8, 40u8, 137u8, 79u8, 146u8, + 5u8, 55u8, 187u8, 129u8, 28u8, 54u8, 132u8, 115u8, 220u8, + 132u8, 139u8, 91u8, 81u8, 0u8, 110u8, 188u8, 248u8, 1u8, + 135u8, 93u8, 153u8, 95u8, 193u8, ], ) } @@ -12215,24 +12886,18 @@ pub mod api { #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."] pub fn swap_member( &self, - remove: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - add: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + remove: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + add: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "swap_member", SwapMember { remove, add }, [ - 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, + 96u8, 248u8, 50u8, 206u8, 192u8, 242u8, 162u8, 62u8, 28u8, + 91u8, 11u8, 208u8, 15u8, 84u8, 188u8, 234u8, 219u8, 233u8, + 200u8, 215u8, 157u8, 155u8, 40u8, 220u8, 132u8, 182u8, 57u8, + 210u8, 94u8, 240u8, 95u8, 252u8, ], ) } @@ -12263,20 +12928,17 @@ pub mod api { #[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, - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "change_key", ChangeKey { new }, [ - 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, + 27u8, 236u8, 241u8, 168u8, 98u8, 39u8, 176u8, 220u8, 145u8, + 48u8, 173u8, 25u8, 179u8, 103u8, 170u8, 13u8, 166u8, 181u8, + 131u8, 160u8, 131u8, 219u8, 116u8, 34u8, 152u8, 152u8, 46u8, + 100u8, 46u8, 5u8, 156u8, 195u8, ], ) } @@ -12285,20 +12947,17 @@ pub mod api { #[doc = "May only be called from `T::PrimeOrigin`."] pub fn set_prime( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "TechnicalMembership", "set_prime", SetPrime { who }, [ - 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, + 0u8, 42u8, 111u8, 52u8, 151u8, 19u8, 239u8, 149u8, 183u8, + 252u8, 87u8, 194u8, 145u8, 21u8, 245u8, 112u8, 221u8, 181u8, + 87u8, 28u8, 48u8, 39u8, 210u8, 133u8, 241u8, 207u8, 255u8, + 209u8, 139u8, 232u8, 119u8, 64u8, ], ) } @@ -12422,7 +13081,8 @@ pub mod api { #[doc = " The current membership, stored as an ordered Vec."] pub fn members( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::subxt::utils::AccountId32, >, @@ -12430,7 +13090,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalMembership", "Members", vec![], @@ -12445,13 +13105,14 @@ pub mod api { #[doc = " The current prime member, if one exists."] pub fn prime( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::subxt::utils::AccountId32, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "TechnicalMembership", "Prime", vec![], @@ -12466,401 +13127,6 @@ pub mod api { } } } - pub mod grandpa { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReportEquivocationUnsigned { - pub equivocation_proof: ::std::boxed::Box< - runtime_types::sp_finality_grandpa::EquivocationProof< - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - pub key_owner_proof: runtime_types::sp_session::MembershipProof, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NoteStalled { - pub delay: ::core::primitive::u32, - pub best_finalized_block_number: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[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 >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "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, - ], - ) - } - #[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::Payload - { - ::subxt::tx::Payload::new_static( - "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, - ], - ) - } - #[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::Payload { - ::subxt::tx::Payload::new_static( - "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, - ], - ) - } - } - } - #[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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "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 PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "NewAuthorities"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current authority set has been paused."] - pub struct Paused; - impl ::subxt::events::StaticEvent for Paused { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Paused"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Current authority set has been resumed."] - pub struct Resumed; - impl ::subxt::events::StaticEvent for Resumed { - const PALLET: &'static str = "Grandpa"; - const EVENT: &'static str = "Resumed"; - } - } - 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< - runtime_types::pallet_grandpa::StoredState<::core::primitive::u32>, - ::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< - runtime_types::pallet_grandpa::StoredPendingChange< - ::core::primitive::u32, - >, - ::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< - ::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, - ], - ) - } - #[doc = " `true` if we are currently stalled."] - pub fn stalled( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - (::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, - ], - ) - } - #[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< - ::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, - ], - ) - } - #[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< - ::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, - ], - ) - } - #[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< - ::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, - ], - ) - } - } - } - 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<::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, - ], - ) - } - } - } - } pub mod treasury { use super::root_mod; use super::runtime_types; @@ -12881,10 +13147,8 @@ pub mod api { pub struct ProposeSpend { #[codec(compact)] pub value: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12924,10 +13188,8 @@ pub mod api { pub struct Spend { #[codec(compact)] pub amount: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -12958,7 +13220,7 @@ pub mod api { value: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -12966,10 +13228,10 @@ pub mod api { "propose_spend", ProposeSpend { value, beneficiary }, [ - 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, + 109u8, 46u8, 8u8, 159u8, 127u8, 79u8, 27u8, 100u8, 92u8, + 244u8, 78u8, 46u8, 105u8, 246u8, 169u8, 210u8, 149u8, 7u8, + 108u8, 153u8, 203u8, 223u8, 8u8, 117u8, 126u8, 250u8, 255u8, + 52u8, 245u8, 69u8, 45u8, 136u8, ], ) } @@ -13037,7 +13299,7 @@ pub mod api { amount: ::core::primitive::u128, beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -13048,10 +13310,10 @@ pub mod api { beneficiary, }, [ - 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, + 177u8, 178u8, 242u8, 136u8, 135u8, 237u8, 114u8, 71u8, 233u8, + 239u8, 7u8, 84u8, 14u8, 228u8, 58u8, 31u8, 158u8, 185u8, + 25u8, 91u8, 70u8, 33u8, 19u8, 92u8, 100u8, 162u8, 5u8, 48u8, + 20u8, 120u8, 9u8, 109u8, ], ) } @@ -13238,24 +13500,6 @@ pub mod api { const PALLET: &'static str = "Treasury"; const EVENT: &'static str = "SpendApproved"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The inactive funds of the pallet have been updated."] - pub struct UpdatedInactive { - pub reactivated: ::core::primitive::u128, - pub deactivated: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for UpdatedInactive { - const PALLET: &'static str = "Treasury"; - const EVENT: &'static str = "UpdatedInactive"; - } } pub mod storage { use super::runtime_types; @@ -13264,13 +13508,14 @@ pub mod api { #[doc = " Number of proposals that have been made."] pub fn proposal_count( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Treasury", "ProposalCount", vec![], @@ -13286,7 +13531,8 @@ pub mod api { pub fn proposals( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_treasury::Proposal< ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -13295,12 +13541,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Treasury", "Proposals", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8, @@ -13313,7 +13558,8 @@ pub mod api { #[doc = " Proposals that have been made."] pub fn proposals_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_treasury::Proposal< ::subxt::utils::AccountId32, ::core::primitive::u128, @@ -13322,7 +13568,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Treasury", "Proposals", Vec::new(), @@ -13334,31 +13580,11 @@ pub mod api { ], ) } - #[doc = " The amount which has been reported as inactive to Currency."] - pub fn deactivated( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Treasury", - "Deactivated", - vec![], - [ - 159u8, 57u8, 5u8, 85u8, 136u8, 128u8, 70u8, 43u8, 67u8, 76u8, - 123u8, 206u8, 48u8, 253u8, 51u8, 40u8, 14u8, 35u8, 162u8, - 173u8, 127u8, 79u8, 38u8, 235u8, 9u8, 141u8, 201u8, 37u8, - 211u8, 176u8, 119u8, 106u8, - ], - ) - } #[doc = " Proposal indices that have been approved but not yet awarded."] pub fn approvals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u32, >, @@ -13366,7 +13592,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Treasury", "Approvals", vec![], @@ -13506,7 +13732,7 @@ pub mod api { } } } - pub mod contracts { + pub mod claims { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -13523,40 +13749,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CallOldWeight { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - #[codec(compact)] - pub gas_limit: runtime_types::sp_weights::OldWeight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InstantiateWithCodeOldWeight { - #[codec(compact)] - pub value: ::core::primitive::u128, - #[codec(compact)] - pub gas_limit: runtime_types::sp_weights::OldWeight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub code: ::std::vec::Vec<::core::primitive::u8>, - pub data: ::std::vec::Vec<::core::primitive::u8>, - pub salt: ::std::vec::Vec<::core::primitive::u8>, + pub struct Claim { + pub dest: ::subxt::utils::AccountId32, + pub ethereum_signature: + runtime_types::polkadot_runtime_common::claims::EcdsaSignature, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13567,61 +13763,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InstantiateOldWeight { - #[codec(compact)] + pub struct MintClaim { + pub who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, pub value: ::core::primitive::u128, - #[codec(compact)] - pub gas_limit: runtime_types::sp_weights::OldWeight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub code_hash: ::subxt::utils::H256, - pub data: ::std::vec::Vec<::core::primitive::u8>, - pub salt: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UploadCode { - pub code: ::std::vec::Vec<::core::primitive::u8>, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub determinism: runtime_types::pallet_contracts::wasm::Determinism, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveCode { - pub code_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCode { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + pub vesting_schedule: ::core::option::Option<( + ::core::primitive::u128, + ::core::primitive::u128, ::core::primitive::u32, + )>, + pub statement: ::core::option::Option< + runtime_types::polkadot_runtime_common::claims::StatementKind, >, - pub code_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13632,18 +13784,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Call { - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub data: ::std::vec::Vec<::core::primitive::u8>, + pub struct ClaimAttest { + pub dest: ::subxt::utils::AccountId32, + pub ethereum_signature: + runtime_types::polkadot_runtime_common::claims::EcdsaSignature, + pub statement: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13654,16 +13799,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InstantiateWithCode { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub code: ::std::vec::Vec<::core::primitive::u8>, - pub data: ::std::vec::Vec<::core::primitive::u8>, - pub salt: ::std::vec::Vec<::core::primitive::u8>, + pub struct Attest { + pub statement: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -13674,350 +13811,209 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Instantiate { - #[codec(compact)] - pub value: ::core::primitive::u128, - pub gas_limit: runtime_types::sp_weights::weight_v2::Weight, - pub storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - pub code_hash: ::subxt::utils::H256, - pub data: ::std::vec::Vec<::core::primitive::u8>, - pub salt: ::std::vec::Vec<::core::primitive::u8>, + pub struct MoveClaim { + pub old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Deprecated version if [`Self::call`] for use in an in-storage `Call`."] - pub fn call_old_weight( - &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Contracts", - "call_old_weight", - CallOldWeight { - dest, - value, - gas_limit, - storage_deposit_limit, - data, - }, - [ - 110u8, 227u8, 98u8, 194u8, 241u8, 14u8, 112u8, 34u8, 18u8, - 0u8, 102u8, 76u8, 145u8, 224u8, 186u8, 143u8, 89u8, 61u8, - 182u8, 157u8, 35u8, 128u8, 148u8, 255u8, 192u8, 223u8, 12u8, - 178u8, 69u8, 1u8, 168u8, 149u8, - ], - ) - } - #[doc = "Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`."] - pub fn instantiate_with_code_old_weight( - &self, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code: ::std::vec::Vec<::core::primitive::u8>, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Contracts", - "instantiate_with_code_old_weight", - InstantiateWithCodeOldWeight { - value, - gas_limit, - storage_deposit_limit, - code, - data, - salt, - }, - [ - 93u8, 124u8, 100u8, 101u8, 7u8, 110u8, 92u8, 199u8, 162u8, - 126u8, 35u8, 47u8, 190u8, 42u8, 237u8, 152u8, 169u8, 130u8, - 21u8, 33u8, 136u8, 220u8, 110u8, 106u8, 57u8, 211u8, 158u8, - 130u8, 112u8, 37u8, 41u8, 39u8, - ], - ) - } - #[doc = "Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`."] - pub fn instantiate_old_weight( - &self, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code_hash: ::subxt::utils::H256, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Contracts", - "instantiate_old_weight", - InstantiateOldWeight { - value, - gas_limit, - storage_deposit_limit, - code_hash, - data, - salt, - }, - [ - 243u8, 56u8, 93u8, 198u8, 169u8, 134u8, 6u8, 135u8, 19u8, - 1u8, 20u8, 138u8, 202u8, 59u8, 59u8, 99u8, 58u8, 22u8, 33u8, - 94u8, 253u8, 215u8, 203u8, 159u8, 58u8, 21u8, 24u8, 235u8, - 30u8, 215u8, 173u8, 23u8, - ], - ) - } - #[doc = "Upload new `code` without instantiating a contract from it."] + #[doc = "Make a claim to collect your DOTs."] #[doc = ""] - #[doc = "If the code does not already exist a deposit is reserved from the caller"] - #[doc = "and unreserved only when [`Self::remove_code`] is called. The size of the reserve"] - #[doc = "depends on the instrumented size of the the supplied `code`."] + #[doc = "The dispatch origin for this call must be _None_."] #[doc = ""] - #[doc = "If the code already exists in storage it will still return `Ok` and upgrades"] - #[doc = "the in storage version to the current"] - #[doc = "[`InstructionWeights::version`](InstructionWeights)."] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] #[doc = ""] - #[doc = "- `determinism`: If this is set to any other value but [`Determinism::Deterministic`]"] - #[doc = " then the only way to use this code is to delegate call into it from an offchain"] - #[doc = " execution. Set to [`Determinism::Deterministic`] if in doubt."] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] #[doc = ""] - #[doc = "# Note"] + #[doc = "and `address` matches the `dest` account."] #[doc = ""] - #[doc = "Anyone can instantiate a contract from any uploaded code and thus prevent its removal."] - #[doc = "To avoid this situation a constructor could employ access control so that it can"] - #[doc = "only be instantiated by permissioned entities. The same is true when uploading"] - #[doc = "through [`Self::instantiate_with_code`]."] - pub fn upload_code( - &self, - code: ::std::vec::Vec<::core::primitive::u8>, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - determinism: runtime_types::pallet_contracts::wasm::Determinism, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Contracts", - "upload_code", - UploadCode { - code, - storage_deposit_limit, - determinism, - }, - [ - 233u8, 137u8, 54u8, 111u8, 132u8, 124u8, 80u8, 213u8, 182u8, - 224u8, 144u8, 240u8, 6u8, 235u8, 148u8, 26u8, 65u8, 39u8, - 91u8, 151u8, 131u8, 10u8, 216u8, 101u8, 89u8, 115u8, 160u8, - 154u8, 44u8, 239u8, 142u8, 116u8, - ], - ) - } - #[doc = "Remove the code stored under `code_hash` and refund the deposit to its owner."] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] + #[doc = " matching the format described above."] #[doc = ""] - #[doc = "A code can only be removed by its original uploader (its owner) and only if it is"] - #[doc = "not used by any contract."] - pub fn remove_code( + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim( &self, - code_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + dest: ::subxt::utils::AccountId32, + ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Contracts", - "remove_code", - RemoveCode { code_hash }, + "Claims", + "claim", + Claim { + dest, + ethereum_signature, + }, [ - 43u8, 192u8, 198u8, 182u8, 108u8, 76u8, 21u8, 42u8, 169u8, - 41u8, 195u8, 73u8, 31u8, 179u8, 162u8, 56u8, 91u8, 5u8, 64u8, - 7u8, 252u8, 194u8, 255u8, 170u8, 67u8, 137u8, 143u8, 192u8, - 2u8, 149u8, 38u8, 180u8, + 33u8, 63u8, 71u8, 104u8, 200u8, 179u8, 248u8, 38u8, 193u8, + 198u8, 250u8, 49u8, 106u8, 26u8, 109u8, 183u8, 33u8, 50u8, + 217u8, 28u8, 50u8, 107u8, 249u8, 80u8, 199u8, 10u8, 192u8, + 1u8, 54u8, 41u8, 146u8, 11u8, ], ) } - #[doc = "Privileged function that changes the code of an existing contract."] + #[doc = "Mint a new claim to collect DOTs."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] - #[doc = "This takes care of updating refcounts and all other necessary operations. Returns"] - #[doc = "an error if either the `code_hash` or `dest` do not exist."] + #[doc = "Parameters:"] + #[doc = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of DOTs that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] #[doc = ""] - #[doc = "# Note"] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] #[doc = ""] - #[doc = "This does **not** change the address of the contract in question. This means"] - #[doc = "that the contract address is no longer derived from its code hash after calling"] - #[doc = "this dispatchable."] - pub fn set_code( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn mint_claim( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + who: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + value: ::core::primitive::u128, + vesting_schedule: ::core::option::Option<( + ::core::primitive::u128, + ::core::primitive::u128, ::core::primitive::u32, + )>, + statement: ::core::option::Option< + runtime_types::polkadot_runtime_common::claims::StatementKind, >, - code_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Contracts", - "set_code", - SetCode { dest, code_hash }, + "Claims", + "mint_claim", + MintClaim { + who, + value, + vesting_schedule, + statement, + }, [ - 87u8, 240u8, 9u8, 107u8, 114u8, 69u8, 236u8, 184u8, 154u8, - 179u8, 251u8, 25u8, 177u8, 13u8, 199u8, 181u8, 166u8, 219u8, - 217u8, 11u8, 98u8, 167u8, 45u8, 214u8, 212u8, 208u8, 110u8, - 91u8, 8u8, 65u8, 232u8, 11u8, + 213u8, 79u8, 204u8, 40u8, 104u8, 84u8, 82u8, 62u8, 193u8, + 93u8, 246u8, 21u8, 37u8, 244u8, 166u8, 132u8, 208u8, 18u8, + 86u8, 195u8, 156u8, 9u8, 220u8, 120u8, 40u8, 183u8, 28u8, + 103u8, 84u8, 163u8, 153u8, 110u8, ], ) } - #[doc = "Makes a call to an account, optionally transferring some balance."] + #[doc = "Make a claim to collect your DOTs by signing a statement."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] #[doc = ""] - #[doc = "# Parameters"] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] #[doc = ""] - #[doc = "* `dest`: Address of the contract to call."] - #[doc = "* `value`: The balance to transfer from the `origin` to `dest`."] - #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] - #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the"] - #[doc = " caller to pay for the storage consumed."] - #[doc = "* `data`: The input data to pass to the contract."] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] #[doc = ""] - #[doc = "* If the account is a smart-contract account, the associated code will be"] - #[doc = "executed and any value will be transferred."] - #[doc = "* If the account is a regular account, any value will be transferred."] - #[doc = "* If no account exists and the call value is not less than `existential_deposit`,"] - #[doc = "a regular account will be created and any value will be transferred."] - pub fn call( + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message"] + #[doc = " matching the format described above."] + #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim_attest( &self, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + dest: ::subxt::utils::AccountId32, + ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature, + statement: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Contracts", - "call", - Call { + "Claims", + "claim_attest", + ClaimAttest { dest, - value, - gas_limit, - storage_deposit_limit, - data, + ethereum_signature, + statement, }, [ - 196u8, 11u8, 91u8, 234u8, 7u8, 74u8, 48u8, 20u8, 202u8, 48u8, - 234u8, 203u8, 148u8, 60u8, 217u8, 84u8, 219u8, 41u8, 230u8, - 150u8, 158u8, 153u8, 160u8, 81u8, 59u8, 2u8, 170u8, 20u8, - 252u8, 97u8, 6u8, 173u8, + 255u8, 10u8, 87u8, 106u8, 101u8, 195u8, 249u8, 25u8, 109u8, + 82u8, 213u8, 95u8, 203u8, 145u8, 224u8, 113u8, 92u8, 141u8, + 31u8, 54u8, 218u8, 47u8, 218u8, 239u8, 211u8, 206u8, 77u8, + 176u8, 19u8, 176u8, 175u8, 135u8, ], ) } - #[doc = "Instantiates a new contract from the supplied `code` optionally transferring"] - #[doc = "some balance."] + #[doc = "Attest to a statement, needed to finalize the claims process."] #[doc = ""] - #[doc = "This dispatchable has the same effect as calling [`Self::upload_code`] +"] - #[doc = "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please"] - #[doc = "also check the documentation of [`Self::upload_code`]."] + #[doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] #[doc = ""] - #[doc = "# Parameters"] + #[doc = "Unsigned Validation:"] + #[doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] + #[doc = "and provides a `statement` which is expected for the account."] #[doc = ""] - #[doc = "* `value`: The balance to transfer from the `origin` to the newly created contract."] - #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] - #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved"] - #[doc = " from the caller to pay for the storage consumed."] - #[doc = "* `code`: The contract code to deploy in raw bytes."] - #[doc = "* `data`: The input data to pass to the contract constructor."] - #[doc = "* `salt`: Used for the address derivation. See [`Pallet::contract_address`]."] + #[doc = "Parameters:"] + #[doc = "- `statement`: The identity of the statement which is being attested to in the signature."] #[doc = ""] - #[doc = "Instantiation is executed as follows:"] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to do pre-validation on `attest` call."] #[doc = ""] - #[doc = "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that"] - #[doc = " code."] - #[doc = "- If the `code_hash` already exists on the chain the underlying `code` will be shared."] - #[doc = "- The destination address is computed based on the sender, code_hash and the salt."] - #[doc = "- The smart-contract account is created at the computed address."] - #[doc = "- The `value` is transferred to the new account."] - #[doc = "- The `deploy` function is executed in the context of the newly-created account."] - pub fn instantiate_with_code( + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn attest( &self, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code: ::std::vec::Vec<::core::primitive::u8>, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + statement: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Contracts", - "instantiate_with_code", - InstantiateWithCode { - value, - gas_limit, - storage_deposit_limit, - code, - data, - salt, - }, + "Claims", + "attest", + Attest { statement }, [ - 94u8, 238u8, 175u8, 86u8, 230u8, 186u8, 94u8, 60u8, 201u8, - 35u8, 117u8, 236u8, 221u8, 10u8, 180u8, 191u8, 140u8, 79u8, - 203u8, 134u8, 240u8, 21u8, 31u8, 63u8, 9u8, 17u8, 134u8, - 30u8, 244u8, 95u8, 171u8, 164u8, + 8u8, 218u8, 97u8, 237u8, 185u8, 61u8, 55u8, 4u8, 134u8, 18u8, + 244u8, 226u8, 40u8, 97u8, 222u8, 246u8, 221u8, 74u8, 253u8, + 22u8, 52u8, 223u8, 224u8, 83u8, 21u8, 218u8, 248u8, 100u8, + 107u8, 58u8, 247u8, 10u8, ], ) } - #[doc = "Instantiates a contract from a previously deployed wasm binary."] - #[doc = ""] - #[doc = "This function is identical to [`Self::instantiate_with_code`] but without the"] - #[doc = "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary"] - #[doc = "must be supplied."] - pub fn instantiate( + pub fn move_claim( &self, - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code_hash: ::subxt::utils::H256, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Contracts", - "instantiate", - Instantiate { - value, - gas_limit, - storage_deposit_limit, - code_hash, - data, - salt, + old: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + new: runtime_types::polkadot_runtime_common::claims::EthereumAddress, + maybe_preclaim: ::core::option::Option<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Claims", + "move_claim", + MoveClaim { + old, + new, + maybe_preclaim, }, [ - 251u8, 49u8, 158u8, 1u8, 138u8, 29u8, 106u8, 187u8, 68u8, - 135u8, 44u8, 196u8, 230u8, 237u8, 88u8, 244u8, 170u8, 168u8, - 11u8, 91u8, 185u8, 11u8, 45u8, 86u8, 113u8, 79u8, 92u8, - 248u8, 113u8, 47u8, 141u8, 10u8, + 63u8, 48u8, 217u8, 16u8, 161u8, 102u8, 165u8, 241u8, 57u8, + 185u8, 230u8, 161u8, 202u8, 11u8, 223u8, 15u8, 57u8, 181u8, + 34u8, 131u8, 235u8, 168u8, 227u8, 152u8, 157u8, 4u8, 192u8, + 243u8, 194u8, 120u8, 130u8, 202u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_contracts::pallet::Event; + pub type Event = runtime_types::polkadot_runtime_common::claims::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -14029,419 +14025,246 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contract deployed by address at the specified address."] - pub struct Instantiated { - pub deployer: ::subxt::utils::AccountId32, - pub contract: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Instantiated { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "Instantiated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contract has been removed."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "The only way for a contract to be removed and emitting this event is by calling"] - #[doc = "`seal_terminate`."] - pub struct Terminated { - pub contract: ::subxt::utils::AccountId32, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Terminated { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "Terminated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Code with the specified hash has been stored."] - pub struct CodeStored { - pub code_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for CodeStored { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "CodeStored"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A custom event emitted by the contract."] - pub struct ContractEmitted { - pub contract: ::subxt::utils::AccountId32, - pub data: ::std::vec::Vec<::core::primitive::u8>, - } - impl ::subxt::events::StaticEvent for ContractEmitted { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "ContractEmitted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A code with the specified hash was removed."] - pub struct CodeRemoved { - pub code_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for CodeRemoved { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "CodeRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A contract's code was updated."] - pub struct ContractCodeUpdated { - pub contract: ::subxt::utils::AccountId32, - pub new_code_hash: ::subxt::utils::H256, - pub old_code_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for ContractCodeUpdated { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "ContractCodeUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A contract was called either by a plain account or another contract."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "Please keep in mind that like all events this is only emitted for successful"] - #[doc = "calls. This is because on failure all storage changes including events are"] - #[doc = "rolled back."] - pub struct Called { - pub caller: ::subxt::utils::AccountId32, - pub contract: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Called { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "Called"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A contract delegate called a code hash."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "Please keep in mind that like all events this is only emitted for successful"] - #[doc = "calls. This is because on failure all storage changes including events are"] - #[doc = "rolled back."] - pub struct DelegateCalled { - pub contract: ::subxt::utils::AccountId32, - pub code_hash: ::subxt::utils::H256, + #[doc = "Someone claimed some DOTs."] + pub struct Claimed { + pub who: ::subxt::utils::AccountId32, + pub ethereum_address: + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for DelegateCalled { - const PALLET: &'static str = "Contracts"; - const EVENT: &'static str = "DelegateCalled"; + impl ::subxt::events::StaticEvent for Claimed { + const PALLET: &'static str = "Claims"; + const EVENT: &'static str = "Claimed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."] - pub fn pristine_code( + pub fn claims( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "PristineCode", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Claims", + "Claims", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8, - 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8, - 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8, - 78u8, 62u8, 170u8, 27u8, 105u8, + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, + 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, + 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, + 253u8, 91u8, 60u8, 88u8, 182u8, ], ) } - #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."] - pub fn pristine_code_root( + pub fn claims_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Claims", + "Claims", + Vec::new(), + [ + 36u8, 247u8, 169u8, 171u8, 103u8, 176u8, 70u8, 213u8, 255u8, + 175u8, 97u8, 142u8, 231u8, 70u8, 90u8, 213u8, 128u8, 67u8, + 50u8, 37u8, 51u8, 184u8, 72u8, 27u8, 193u8, 254u8, 12u8, + 253u8, 91u8, 60u8, 88u8, 182u8, + ], + ) + } + pub fn total( + &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( + "Claims", + "Total", + vec![], + [ + 162u8, 59u8, 237u8, 63u8, 23u8, 44u8, 74u8, 169u8, 131u8, + 166u8, 174u8, 61u8, 127u8, 165u8, 32u8, 115u8, 73u8, 171u8, + 36u8, 10u8, 6u8, 23u8, 19u8, 202u8, 3u8, 189u8, 29u8, 169u8, + 144u8, 187u8, 235u8, 77u8, + ], + ) + } + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Claims", + "Vesting", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, + 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, + 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, + 208u8, 80u8, 53u8, 25u8, 205u8, + ], + ) + } + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u32, + ), (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "PristineCode", + ::subxt::storage::address::Address::new_static( + "Claims", + "Vesting", Vec::new(), [ - 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8, - 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8, - 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8, - 78u8, 62u8, 170u8, 27u8, 105u8, + 112u8, 174u8, 151u8, 185u8, 225u8, 170u8, 63u8, 147u8, 100u8, + 23u8, 102u8, 148u8, 244u8, 47u8, 87u8, 99u8, 28u8, 59u8, + 48u8, 205u8, 43u8, 41u8, 87u8, 225u8, 191u8, 164u8, 31u8, + 208u8, 80u8, 53u8, 25u8, 205u8, ], ) } - #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."] - pub fn code_storage( + #[doc = " The statement kind that must be signed, if any."] + pub fn signing( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::wasm::PrefabWasmModule, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::claims::StatementKind, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "CodeStorage", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Claims", + "Signing", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, )], [ - 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8, - 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8, - 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8, - 80u8, 121u8, 46u8, 149u8, 48u8, + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, + 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, + 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, + 17u8, 30u8, 125u8, 85u8, 107u8, ], ) } - #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."] - pub fn code_storage_root( + #[doc = " The statement kind that must be signed, if any."] + pub fn signing_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::wasm::PrefabWasmModule, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::claims::StatementKind, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "CodeStorage", + ::subxt::storage::address::Address::new_static( + "Claims", + "Signing", Vec::new(), [ - 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8, - 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8, - 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8, - 80u8, 121u8, 46u8, 149u8, 48u8, + 51u8, 184u8, 211u8, 207u8, 13u8, 194u8, 181u8, 153u8, 25u8, + 212u8, 106u8, 189u8, 149u8, 14u8, 19u8, 61u8, 210u8, 109u8, + 23u8, 168u8, 191u8, 74u8, 112u8, 190u8, 242u8, 112u8, 183u8, + 17u8, 30u8, 125u8, 85u8, 107u8, ], ) } - #[doc = " A mapping between an original code hash and its owner information."] - pub fn owner_info_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::wasm::OwnerInfo, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "OwnerInfoOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8, - 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8, - 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8, - 64u8, 71u8, 250u8, 202u8, 186u8, - ], - ) - } - #[doc = " A mapping between an original code hash and its owner information."] - pub fn owner_info_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::wasm::OwnerInfo, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "OwnerInfoOf", - Vec::new(), - [ - 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8, - 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8, - 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8, - 64u8, 71u8, 250u8, 202u8, 186u8, - ], - ) - } - #[doc = " This is a **monotonic** counter incremented on contract instantiation."] - #[doc = ""] - #[doc = " This is used in order to generate unique trie ids for contracts."] - #[doc = " The trie id of a new contract is calculated from hash(account_id, nonce)."] - #[doc = " The nonce is required because otherwise the following sequence would lead to"] - #[doc = " a possible collision of storage:"] - #[doc = ""] - #[doc = " 1. Create a new contract."] - #[doc = " 2. Terminate the contract."] - #[doc = " 3. Immediately recreate the contract with the same account_id."] - #[doc = ""] - #[doc = " This is bad because the contents of a trie are deleted lazily and there might be"] - #[doc = " storage of the old instantiation still in it when the new contract is created. Please"] - #[doc = " note that we can't replace the counter by the block number because the sequence above"] - #[doc = " can happen in the same block. We also can't keep the account counter in memory only"] - #[doc = " because storage is the only way to communicate across different extrinsics in the"] - #[doc = " same block."] - #[doc = ""] - #[doc = " # Note"] - #[doc = ""] - #[doc = " Do not use it to determine the number of contracts. It won't be decremented if"] - #[doc = " a contract is destroyed."] - pub fn nonce( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u64, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "Nonce", - vec![], - [ - 122u8, 169u8, 95u8, 131u8, 85u8, 32u8, 154u8, 114u8, 143u8, - 56u8, 12u8, 182u8, 64u8, 150u8, 241u8, 249u8, 254u8, 251u8, - 160u8, 235u8, 192u8, 41u8, 101u8, 232u8, 186u8, 108u8, 187u8, - 149u8, 210u8, 91u8, 179u8, 98u8, - ], - ) - } - #[doc = " The code associated with a given account."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn contract_info_of( + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::storage::ContractInfo, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "ContractInfoOf", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Claims", + "Preclaims", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8, - 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8, - 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8, - 225u8, 242u8, 0u8, 171u8, 184u8, + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, + 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, + 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, + 184u8, 133u8, 214u8, 67u8, 95u8, ], ) } - #[doc = " The code associated with a given account."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn contract_info_of_root( + #[doc = " Pre-claimed Ethereum accounts, by the Account ID that they are claimed to."] + pub fn preclaims_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_contracts::storage::ContractInfo, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::claims::EthereumAddress, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "ContractInfoOf", + ::subxt::storage::address::Address::new_static( + "Claims", + "Preclaims", Vec::new(), [ - 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8, - 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8, - 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8, - 225u8, 242u8, 0u8, 171u8, 184u8, - ], - ) - } - #[doc = " Evicted contracts that await child trie deletion."] - #[doc = ""] - #[doc = " Child trie deletion is a heavy operation depending on the amount of storage items"] - #[doc = " stored in said trie. Therefore this operation is performed lazily in `on_initialize`."] - pub fn deletion_queue( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_contracts::storage::DeletedContract, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Contracts", - "DeletionQueue", - vec![], - [ - 119u8, 169u8, 146u8, 210u8, 21u8, 216u8, 51u8, 225u8, 107u8, - 61u8, 42u8, 155u8, 169u8, 127u8, 140u8, 106u8, 255u8, 137u8, - 163u8, 199u8, 91u8, 137u8, 73u8, 61u8, 9u8, 167u8, 16u8, - 157u8, 183u8, 212u8, 35u8, 88u8, + 149u8, 61u8, 170u8, 170u8, 60u8, 212u8, 29u8, 214u8, 141u8, + 136u8, 207u8, 248u8, 51u8, 135u8, 242u8, 105u8, 121u8, 91u8, + 186u8, 30u8, 0u8, 173u8, 154u8, 133u8, 20u8, 244u8, 58u8, + 184u8, 133u8, 214u8, 67u8, 95u8, ], ) } @@ -14451,193 +14274,26 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " Cost schedule and limits."] - pub fn schedule( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::pallet_contracts::schedule::Schedule, - > { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "Schedule", - [ - 203u8, 98u8, 182u8, 130u8, 165u8, 6u8, 149u8, 28u8, 44u8, - 67u8, 79u8, 25u8, 47u8, 191u8, 183u8, 41u8, 65u8, 129u8, - 135u8, 29u8, 178u8, 224u8, 196u8, 247u8, 58u8, 215u8, 101u8, - 35u8, 77u8, 233u8, 60u8, 155u8, - ], - ) - } - #[doc = " The maximum number of contracts that can be pending for deletion."] - #[doc = ""] - #[doc = " When a contract is deleted by calling `seal_terminate` it becomes inaccessible"] - #[doc = " immediately, but the deletion of the storage items it has accumulated is performed"] - #[doc = " later. The contract is put into the deletion queue. This defines how many"] - #[doc = " contracts can be queued up at the same time. If that limit is reached `seal_terminate`"] - #[doc = " will fail. The action must be retried in a later block in that case."] - #[doc = ""] - #[doc = " The reasons for limiting the queue depth are:"] - #[doc = ""] - #[doc = " 1. The queue is in storage in order to be persistent between blocks. We want to limit"] - #[doc = " \tthe amount of storage that can be consumed."] - #[doc = " 2. The queue is stored in a vector and needs to be decoded as a whole when reading"] - #[doc = "\t\tit at the end of each block. Longer queues take more weight to decode and hence"] - #[doc = "\t\tlimit the amount of items that can be deleted per block."] - pub fn deletion_queue_depth( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "DeletionQueueDepth", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 weight that can be consumed per block for lazy trie removal."] - #[doc = ""] - #[doc = " The amount of weight that is dedicated per block to work on the deletion queue. Larger"] - #[doc = " values allow more trie keys to be deleted in each block but reduce the amount of"] - #[doc = " weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more"] - #[doc = " information about the deletion queue."] - pub fn deletion_weight_limit( + pub fn prefix( &self, ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_weights::weight_v2::Weight, + ::std::vec::Vec<::core::primitive::u8>, > { ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "DeletionWeightLimit", - [ - 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, - 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, - 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, - 165u8, 147u8, 134u8, 106u8, 76u8, - ], - ) - } - #[doc = " The amount of balance a caller has to pay for each byte of storage."] - #[doc = ""] - #[doc = " # Note"] - #[doc = ""] - #[doc = " Changing this value for an existing chain might need a storage migration."] - pub fn deposit_per_byte( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "DepositPerByte", - [ - 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 balance a caller has to pay for each storage item."] - #[doc = ""] - #[doc = " # Note"] - #[doc = ""] - #[doc = " Changing this value for an existing chain might need a storage migration."] - pub fn deposit_per_item( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "DepositPerItem", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum length of a contract code in bytes. This limit applies to the instrumented"] - #[doc = " version of the code. Therefore `instantiate_with_code` can fail even when supplying"] - #[doc = " a wasm binary below this maximum size."] - pub fn max_code_len( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "MaxCodeLen", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 allowable length in bytes for storage keys."] - pub fn max_storage_key_len( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "MaxStorageKeyLen", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Make contract callable functions marked as `#[unstable]` available."] - #[doc = ""] - #[doc = " Contracts that use `#[unstable]` functions won't be able to be uploaded unless"] - #[doc = " this is set to `true`. This is only meant for testnets and dev nodes in order to"] - #[doc = " experiment with new features."] - #[doc = ""] - #[doc = " # Warning"] - #[doc = ""] - #[doc = " Do **not** set to `true` on productions chains."] - pub fn unsafe_unstable_interface( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::bool> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "UnsafeUnstableInterface", - [ - 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 = " The maximum length of the debug buffer in bytes."] - pub fn max_debug_buffer_len( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Contracts", - "MaxDebugBufferLen", + "Claims", + "Prefix", [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 106u8, 50u8, 57u8, 116u8, 43u8, 202u8, 37u8, 248u8, 102u8, + 22u8, 62u8, 22u8, 242u8, 54u8, 152u8, 168u8, 107u8, 64u8, + 72u8, 172u8, 124u8, 40u8, 42u8, 110u8, 104u8, 145u8, 31u8, + 144u8, 242u8, 189u8, 145u8, 208u8, ], ) } } } } - pub mod sudo { + pub mod vesting { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -14654,10 +14310,7 @@ pub mod api { )] #[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, - } + pub struct Vest; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14667,10 +14320,8 @@ pub mod api { )] #[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, + pub struct VestOther { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14681,9 +14332,10 @@ pub mod api { )] #[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, + pub struct VestedTransfer { + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, ::core::primitive::u32, >, } @@ -14696,141 +14348,211 @@ pub mod api { )] #[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, + pub struct ForceVestedTransfer { + pub source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, ::core::primitive::u32, >, - pub call: - ::std::boxed::Box, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MergeSchedules { + pub schedule1_index: ::core::primitive::u32, + pub schedule2_index: ::core::primitive::u32, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "Unlock any vested funds of the sender account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 2 Reads, 2 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] #[doc = "# "] - pub fn sudo( - &self, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + pub fn vest(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Sudo", - "sudo", - Sudo { - call: ::std::boxed::Box::new(call), - }, + "Vesting", + "vest", + Vest {}, [ - 39u8, 81u8, 239u8, 54u8, 9u8, 239u8, 228u8, 35u8, 29u8, - 162u8, 137u8, 26u8, 33u8, 209u8, 203u8, 217u8, 55u8, 198u8, - 146u8, 12u8, 90u8, 202u8, 8u8, 44u8, 59u8, 233u8, 248u8, - 65u8, 187u8, 25u8, 112u8, 104u8, + 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, + 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, + 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8, + 34u8, 21u8, 167u8, 172u8, 54u8, ], ) } - #[doc = "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 = "Unlock any vested funds of a `target` account."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- The weight of this call is defined by the caller."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] #[doc = "# "] - pub fn sudo_unchecked_weight( + pub fn vest_other( &self, - call: runtime_types::kitchensink_runtime::RuntimeCall, - weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Sudo", - "sudo_unchecked_weight", - SudoUncheckedWeight { - call: ::std::boxed::Box::new(call), - weight, - }, + "Vesting", + "vest_other", + VestOther { target }, [ - 110u8, 148u8, 238u8, 215u8, 33u8, 6u8, 33u8, 114u8, 136u8, - 252u8, 6u8, 249u8, 188u8, 144u8, 15u8, 91u8, 1u8, 2u8, 215u8, - 122u8, 91u8, 170u8, 165u8, 115u8, 151u8, 124u8, 114u8, 21u8, - 205u8, 219u8, 93u8, 166u8, + 164u8, 19u8, 93u8, 81u8, 235u8, 101u8, 18u8, 52u8, 187u8, + 81u8, 243u8, 216u8, 116u8, 84u8, 188u8, 135u8, 1u8, 241u8, + 128u8, 90u8, 117u8, 164u8, 111u8, 0u8, 251u8, 148u8, 250u8, + 248u8, 102u8, 79u8, 165u8, 175u8, ], ) } - #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] - #[doc = "key."] + #[doc = "Create a vested transfer."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB change."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] #[doc = "# "] - pub fn set_key( + pub fn vested_transfer( &self, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Sudo", - "set_key", - SetKey { new }, + "Vesting", + "vested_transfer", + VestedTransfer { target, schedule }, [ - 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, + 135u8, 172u8, 56u8, 97u8, 45u8, 141u8, 93u8, 173u8, 111u8, + 252u8, 75u8, 246u8, 92u8, 181u8, 138u8, 87u8, 145u8, 174u8, + 71u8, 108u8, 126u8, 118u8, 49u8, 122u8, 249u8, 132u8, 19u8, + 2u8, 132u8, 160u8, 247u8, 195u8, ], ) } - #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] - #[doc = "a given account."] + #[doc = "Force a vested transfer."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] #[doc = ""] #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "- Limited storage reads."] - #[doc = "- One DB write (event)."] - #[doc = "- Weight of derivative `call` execution + 10,000."] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 4 Reads, 4 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] #[doc = "# "] - pub fn sudo_as( + pub fn force_vested_transfer( &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + source: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, ::core::primitive::u32, >, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Sudo", - "sudo_as", - SudoAs { - who, - call: ::std::boxed::Box::new(call), + "Vesting", + "force_vested_transfer", + ForceVestedTransfer { + source, + target, + schedule, + }, + [ + 110u8, 142u8, 63u8, 148u8, 90u8, 229u8, 237u8, 183u8, 240u8, + 237u8, 242u8, 32u8, 88u8, 48u8, 220u8, 101u8, 210u8, 212u8, + 27u8, 7u8, 186u8, 98u8, 28u8, 197u8, 148u8, 140u8, 77u8, + 59u8, 202u8, 166u8, 63u8, 97u8, + ], + ) + } + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub fn merge_schedules( + &self, + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Vesting", + "merge_schedules", + MergeSchedules { + schedule1_index, + schedule2_index, }, [ - 203u8, 61u8, 12u8, 31u8, 150u8, 94u8, 184u8, 82u8, 65u8, - 219u8, 24u8, 150u8, 243u8, 104u8, 254u8, 115u8, 108u8, 154u8, - 200u8, 64u8, 89u8, 10u8, 4u8, 210u8, 230u8, 102u8, 135u8, - 27u8, 55u8, 49u8, 86u8, 237u8, + 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, + 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, + 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8, + 157u8, 75u8, 4u8, 110u8, 125u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_sudo::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -14842,31 +14564,15 @@ pub mod api { )] #[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 Sudid { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "Sudid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] - pub struct KeyChanged { - pub old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>, + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + pub struct VestingUpdated { + pub account: ::subxt::utils::AccountId32, + pub unvested: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for KeyChanged { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "KeyChanged"; + impl ::subxt::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -14877,45 +14583,141 @@ pub mod api { )] #[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>, + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for SudoAsDone { - const PALLET: &'static str = "Sudo"; - const EVENT: &'static str = "SudoAsDone"; + impl ::subxt::events::StaticEvent for VestingCompleted { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCompleted"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The `AccountId` of the sudo key."] - pub fn key( + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + >, ::subxt::storage::address::Yes, (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Vesting", + "Vesting", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, + ], + ) + } + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Vesting", + "Vesting", + Vec::new(), + [ + 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, + 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, + 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, + 168u8, 239u8, 212u8, 36u8, + ], + ) + } + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " New networks start with latest version, as determined by the genesis build."] + pub fn storage_version( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_vesting::Releases, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Sudo", - "Key", + ::subxt::storage::address::Address::new_static( + "Vesting", + "StorageVersion", 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, + 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, + 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, + 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8, + 94u8, 189u8, 23u8, 45u8, 191u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount transferred to call `vested_transfer`."] + pub fn min_vested_transfer( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Vesting", + "MinVestedTransfer", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + pub fn max_vesting_schedules( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Vesting", + "MaxVestingSchedules", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, ], ) } } } } - pub mod im_online { + pub mod utility { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -14932,51 +14734,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Heartbeat { - pub heartbeat: - runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, - pub signature: - runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "# "] - #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"] - #[doc = " length of `heartbeat.network_state.external_address`"] - #[doc = " - `O(K)`: decoding of length `K`"] - #[doc = " - `O(E)`: decoding/encoding of length `E`"] - #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"] - #[doc = " `ReceivedHeartbeats`"] - #[doc = "- DbWrites: `ReceivedHeartbeats`"] - #[doc = "# "] - pub fn heartbeat( - &self, - heartbeat: runtime_types::pallet_im_online::Heartbeat< - ::core::primitive::u32, - >, - signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "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, - ], - ) - } + pub struct Batch { + pub calls: ::std::vec::Vec, } - } - #[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 :: Decode, :: subxt :: ext :: codec :: Encode, @@ -14986,14 +14746,9 @@ pub mod api { )] #[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, - } - impl ::subxt::events::StaticEvent for HeartbeatReceived { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "HeartbeatReceived"; + pub struct AsDerivative { + pub index: ::core::primitive::u16, + pub call: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15004,11 +14759,8 @@ pub mod api { )] #[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 PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "AllGood"; + pub struct BatchAll { + pub calls: ::std::vec::Vec, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15019,284 +14771,333 @@ pub mod api { )] #[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, - runtime_types::pallet_staking::Exposure< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - )>, + pub struct DispatchAs { + pub as_origin: + ::std::boxed::Box, + pub call: ::std::boxed::Box, } - impl ::subxt::events::StaticEvent for SomeOffline { - const PALLET: &'static str = "ImOnline"; - const EVENT: &'static str = "SomeOffline"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - } - 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."] + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Send a batch of dispatch calls."] #[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 = "May be called from any origin except `None`."] #[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( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "HeartbeatAfter", - 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, - ], - ) - } - #[doc = " The current set of keys that may issue a heartbeat."] - pub fn keys( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "Keys", - vec![], + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "batch", + Batch { calls }, [ - 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, + 243u8, 245u8, 145u8, 160u8, 31u8, 99u8, 157u8, 224u8, 164u8, + 104u8, 116u8, 163u8, 209u8, 121u8, 149u8, 251u8, 122u8, 66u8, + 50u8, 7u8, 190u8, 93u8, 155u8, 159u8, 70u8, 132u8, 23u8, + 55u8, 47u8, 202u8, 146u8, 168u8, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats( + #[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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, - >, - ::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, - ), - ], + index: ::core::primitive::u16, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "as_derivative", + AsDerivative { + index, + call: ::std::boxed::Box::new(call), + }, [ - 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, + 93u8, 108u8, 41u8, 206u8, 109u8, 149u8, 77u8, 161u8, 27u8, + 247u8, 177u8, 201u8, 245u8, 248u8, 46u8, 53u8, 207u8, 62u8, + 10u8, 174u8, 240u8, 59u8, 186u8, 0u8, 197u8, 135u8, 181u8, + 94u8, 1u8, 132u8, 60u8, 233u8, ], ) } - #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"] - #[doc = " `WrapperOpaque`."] - pub fn received_heartbeats_root( + #[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, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::frame_support::traits::misc::WrapperOpaque< - runtime_types::pallet_im_online::BoundedOpaqueNetworkState, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "ReceivedHeartbeats", - Vec::new(), + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "batch_all", + BatchAll { calls }, [ - 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, + 234u8, 106u8, 151u8, 10u8, 11u8, 227u8, 168u8, 197u8, 187u8, + 69u8, 202u8, 14u8, 120u8, 94u8, 156u8, 128u8, 103u8, 185u8, + 26u8, 181u8, 146u8, 249u8, 108u8, 67u8, 142u8, 209u8, 140u8, + 208u8, 2u8, 185u8, 175u8, 223u8, ], ) } - #[doc = " 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 = "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, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::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, - ), - ], + as_origin: runtime_types::polkadot_runtime::OriginCaller, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "dispatch_as", + DispatchAs { + as_origin: ::std::boxed::Box::new(as_origin), + call: ::std::boxed::Box::new(call), + }, [ - 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, + 148u8, 0u8, 144u8, 26u8, 218u8, 140u8, 68u8, 101u8, 15u8, + 56u8, 160u8, 237u8, 202u8, 222u8, 125u8, 100u8, 209u8, 101u8, + 159u8, 117u8, 218u8, 192u8, 55u8, 235u8, 171u8, 54u8, 86u8, + 206u8, 126u8, 188u8, 143u8, 253u8, ], ) } - #[doc = " 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 = "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, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ImOnline", - "AuthoredBlocks", - Vec::new(), + calls: ::std::vec::Vec, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Utility", + "force_batch", + ForceBatch { calls }, [ - 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, + 221u8, 22u8, 196u8, 62u8, 193u8, 137u8, 221u8, 234u8, 195u8, + 7u8, 133u8, 191u8, 243u8, 204u8, 109u8, 46u8, 94u8, 254u8, + 31u8, 16u8, 188u8, 65u8, 160u8, 80u8, 58u8, 202u8, 215u8, + 11u8, 99u8, 31u8, 12u8, 66u8, ], ) } } } + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + pub struct BatchInterrupted { + pub index: ::core::primitive::u32, + pub error: runtime_types::sp_runtime::DispatchError, + } + impl ::subxt::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt::events::StaticEvent for BatchCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompleted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt::events::StaticEvent for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt::events::StaticEvent for ItemCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemCompleted"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A 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 PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::events::StaticEvent for DispatchedAs { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "DispatchedAs"; + } + } pub mod constants { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " A configuration for base priority of unsigned transactions."] - #[doc = ""] - #[doc = " This is exposed so that it can be tuned for particular runtime, when"] - #[doc = " multiple pallets send unsigned transactions."] - pub fn unsigned_priority( + #[doc = " The limit on the number of batched calls."] + pub fn batched_calls_limit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "ImOnline", - "UnsignedPriority", + "Utility", + "batched_calls_limit", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 authority_discovery { + pub mod identity { use super::root_mod; use super::runtime_types; - pub mod storage { + #[doc = "Identity pallet declaration."] + pub mod calls { + use super::root_mod; use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Keys of the current authority set."] - pub fn keys( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_authority_discovery::app::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AuthorityDiscovery", - "Keys", - 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, - ], - ) - } - #[doc = " Keys of the next authority set."] - pub fn next_keys( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - runtime_types::sp_authority_discovery::app::Public, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AuthorityDiscovery", - "NextKeys", - vec![], - [ - 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, - ], - ) - } + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddRegistrar { + pub account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } - } - } - pub mod offences { - use super::root_mod; - use super::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, @@ -15306,288 +15107,25 @@ pub mod api { )] #[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>, + pub struct SetIdentity { + pub info: ::std::boxed::Box< + runtime_types::pallet_identity::types::IdentityInfo, + >, } - impl ::subxt::events::StaticEvent for Offence { - const PALLET: &'static str = "Offences"; - const EVENT: &'static str = "Offence"; - } - } - 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::StaticStorageAddress< - 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::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "Reports", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[doc = " The primary structure that holds all offence records keyed by report identifiers."] - pub fn reports_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::StaticStorageAddress::new( - "Offences", - "Reports", - 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, - ], - ) - } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::subxt::utils::H256>, - ::subxt::storage::address::Yes, - ::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, - ), - ], - [ - 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, - ], - ) - } - #[doc = " A vector of reports of the same kind that happened at the same time slot."] - pub fn concurrent_reports_index_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::subxt::utils::H256>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ConcurrentReportsIndex", - Vec::new(), - [ - 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, - ], - ) - } - #[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( - &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[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( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::core::primitive::u8>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Offences", - "ReportsByKindIndex", - Vec::new(), - [ - 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8, - 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8, - 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8, - 136u8, 98u8, 215u8, 180u8, 145u8, - ], - ) - } - } - } - } - pub mod historical { - use super::root_mod; - use super::runtime_types; - } - pub mod randomness_collective_flip { - use super::root_mod; - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Series of block headers from the last 81 blocks that acts as random seed material. This"] - #[doc = " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of"] - #[doc = " the oldest hash."] - pub fn random_material( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RandomnessCollectiveFlip", - "RandomMaterial", - vec![], - [ - 152u8, 126u8, 73u8, 88u8, 54u8, 147u8, 6u8, 19u8, 214u8, - 40u8, 159u8, 30u8, 236u8, 61u8, 240u8, 65u8, 178u8, 94u8, - 146u8, 152u8, 135u8, 252u8, 160u8, 86u8, 123u8, 114u8, 251u8, - 140u8, 98u8, 143u8, 217u8, 242u8, - ], - ) - } - } - } - } - pub mod identity { - use super::root_mod; - use super::runtime_types; - #[doc = "Identity pallet declaration."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddRegistrar { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetIdentity { - pub info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSubs { - pub subs: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetSubs { + pub subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15654,10 +15192,7 @@ pub mod api { pub struct SetAccountId { #[codec(compact)] pub index: ::core::primitive::u32, - pub new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15687,10 +15222,7 @@ pub mod api { pub struct ProvideJudgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -15706,10 +15238,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct KillIdentity { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15721,10 +15250,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct AddSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } #[derive( @@ -15737,10 +15263,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RenameSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } #[derive( @@ -15753,10 +15276,7 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct RemoveSub { - pub sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -15787,7 +15307,7 @@ pub mod api { &self, account: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -15795,10 +15315,10 @@ pub mod api { "add_registrar", AddRegistrar { account }, [ - 96u8, 200u8, 92u8, 23u8, 3u8, 144u8, 56u8, 53u8, 245u8, - 210u8, 33u8, 36u8, 183u8, 233u8, 41u8, 1u8, 127u8, 2u8, 25u8, - 5u8, 15u8, 133u8, 4u8, 107u8, 206u8, 155u8, 114u8, 39u8, - 14u8, 235u8, 115u8, 172u8, + 157u8, 232u8, 252u8, 190u8, 203u8, 233u8, 127u8, 63u8, 111u8, + 16u8, 118u8, 200u8, 31u8, 234u8, 144u8, 111u8, 161u8, 224u8, + 217u8, 86u8, 179u8, 254u8, 162u8, 212u8, 248u8, 8u8, 125u8, + 89u8, 23u8, 195u8, 4u8, 231u8, ], ) } @@ -15897,9 +15417,7 @@ pub mod api { #[doc = "- `2` storage reads and `S + 2` storage deletions."] #[doc = "- One event."] #[doc = "# "] - pub fn clear_identity( - &self, - ) -> ::subxt::tx::Payload { + pub fn clear_identity(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "clear_identity", @@ -16031,20 +15549,17 @@ pub mod api { pub fn set_account_id( &self, index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + new: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "set_account_id", SetAccountId { index, new }, [ - 14u8, 154u8, 84u8, 48u8, 59u8, 133u8, 45u8, 204u8, 255u8, - 85u8, 157u8, 88u8, 56u8, 207u8, 113u8, 184u8, 233u8, 139u8, - 129u8, 118u8, 59u8, 9u8, 211u8, 184u8, 32u8, 141u8, 126u8, - 208u8, 179u8, 4u8, 2u8, 95u8, + 13u8, 91u8, 36u8, 7u8, 88u8, 64u8, 151u8, 104u8, 94u8, 174u8, + 195u8, 99u8, 97u8, 181u8, 236u8, 251u8, 26u8, 236u8, 234u8, + 40u8, 183u8, 38u8, 220u8, 216u8, 48u8, 115u8, 7u8, 230u8, + 216u8, 28u8, 123u8, 11u8, ], ) } @@ -16103,10 +15618,7 @@ pub mod api { pub fn provide_judgement( &self, reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, @@ -16122,10 +15634,10 @@ pub mod api { identity, }, [ - 83u8, 253u8, 77u8, 208u8, 198u8, 25u8, 202u8, 213u8, 223u8, - 184u8, 231u8, 185u8, 186u8, 216u8, 54u8, 62u8, 3u8, 7u8, - 107u8, 152u8, 126u8, 195u8, 175u8, 221u8, 134u8, 169u8, - 199u8, 124u8, 232u8, 157u8, 67u8, 75u8, + 147u8, 66u8, 29u8, 90u8, 149u8, 65u8, 161u8, 115u8, 12u8, + 254u8, 188u8, 248u8, 165u8, 115u8, 191u8, 2u8, 167u8, 223u8, + 199u8, 169u8, 203u8, 64u8, 101u8, 217u8, 73u8, 185u8, 93u8, + 109u8, 22u8, 184u8, 146u8, 73u8, ], ) } @@ -16150,20 +15662,17 @@ pub mod api { #[doc = "# "] pub fn kill_identity( &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + target: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "kill_identity", KillIdentity { target }, [ - 65u8, 106u8, 116u8, 209u8, 219u8, 181u8, 185u8, 75u8, 146u8, - 194u8, 187u8, 170u8, 7u8, 34u8, 140u8, 87u8, 107u8, 112u8, - 229u8, 34u8, 65u8, 71u8, 58u8, 152u8, 74u8, 253u8, 137u8, - 69u8, 149u8, 214u8, 158u8, 19u8, + 76u8, 13u8, 158u8, 219u8, 221u8, 0u8, 151u8, 241u8, 137u8, + 136u8, 179u8, 194u8, 188u8, 230u8, 56u8, 16u8, 254u8, 28u8, + 127u8, 216u8, 205u8, 117u8, 224u8, 121u8, 240u8, 231u8, + 126u8, 181u8, 230u8, 68u8, 13u8, 174u8, ], ) } @@ -16176,10 +15685,7 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn add_sub( &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -16187,10 +15693,10 @@ pub mod api { "add_sub", AddSub { sub, data }, [ - 206u8, 112u8, 143u8, 96u8, 152u8, 12u8, 174u8, 226u8, 23u8, - 27u8, 154u8, 188u8, 195u8, 233u8, 185u8, 180u8, 246u8, 218u8, - 154u8, 129u8, 138u8, 52u8, 212u8, 109u8, 54u8, 211u8, 219u8, - 255u8, 39u8, 79u8, 154u8, 123u8, + 122u8, 218u8, 25u8, 93u8, 33u8, 176u8, 191u8, 254u8, 223u8, + 147u8, 100u8, 135u8, 86u8, 71u8, 47u8, 163u8, 105u8, 222u8, + 162u8, 173u8, 207u8, 182u8, 130u8, 128u8, 214u8, 242u8, + 101u8, 250u8, 242u8, 24u8, 17u8, 84u8, ], ) } @@ -16200,10 +15706,7 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn rename_sub( &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, data: runtime_types::pallet_identity::types::Data, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( @@ -16211,10 +15714,10 @@ pub mod api { "rename_sub", RenameSub { sub, data }, [ - 110u8, 28u8, 134u8, 225u8, 44u8, 242u8, 20u8, 22u8, 197u8, - 49u8, 173u8, 178u8, 106u8, 181u8, 103u8, 90u8, 27u8, 73u8, - 102u8, 130u8, 2u8, 216u8, 172u8, 186u8, 124u8, 244u8, 128u8, - 6u8, 112u8, 128u8, 25u8, 245u8, + 166u8, 167u8, 49u8, 114u8, 199u8, 168u8, 187u8, 221u8, 100u8, + 85u8, 147u8, 211u8, 157u8, 31u8, 109u8, 135u8, 194u8, 135u8, + 15u8, 89u8, 59u8, 57u8, 252u8, 163u8, 9u8, 138u8, 216u8, + 189u8, 177u8, 42u8, 96u8, 34u8, ], ) } @@ -16227,20 +15730,17 @@ pub mod api { #[doc = "sub identity of `sub`."] pub fn remove_sub( &self, - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + sub: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( "Identity", "remove_sub", RemoveSub { sub }, [ - 92u8, 201u8, 70u8, 170u8, 248u8, 110u8, 179u8, 186u8, 213u8, - 197u8, 150u8, 156u8, 156u8, 50u8, 19u8, 158u8, 186u8, 61u8, - 106u8, 64u8, 84u8, 38u8, 73u8, 134u8, 132u8, 233u8, 50u8, - 152u8, 40u8, 18u8, 212u8, 121u8, + 106u8, 223u8, 210u8, 67u8, 54u8, 11u8, 144u8, 222u8, 42u8, + 46u8, 157u8, 33u8, 13u8, 245u8, 166u8, 195u8, 227u8, 81u8, + 224u8, 149u8, 154u8, 158u8, 187u8, 203u8, 215u8, 91u8, 43u8, + 105u8, 69u8, 213u8, 141u8, 124u8, ], ) } @@ -16467,7 +15967,8 @@ pub mod api { pub fn identity_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_identity::types::Registration< ::core::primitive::u128, >, @@ -16475,12 +15976,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "IdentityOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8, @@ -16495,7 +15995,8 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn identity_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::pallet_identity::types::Registration< ::core::primitive::u128, >, @@ -16503,7 +16004,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "IdentityOf", Vec::new(), @@ -16520,7 +16021,8 @@ pub mod api { pub fn super_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, @@ -16529,12 +16031,11 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "SuperOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8, @@ -16548,7 +16049,8 @@ pub mod api { #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] pub fn super_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::subxt::utils::AccountId32, runtime_types::pallet_identity::types::Data, @@ -16557,7 +16059,7 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "SuperOf", Vec::new(), @@ -16577,7 +16079,8 @@ pub mod api { pub fn subs_of( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -16588,12 +16091,11 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "SubsOf", - vec![::subxt::storage::address::StorageMapKey::new( + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8, @@ -16610,7 +16112,8 @@ pub mod api { #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] pub fn subs_of_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( ::core::primitive::u128, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< @@ -16621,7 +16124,7 @@ pub mod api { ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "SubsOf", Vec::new(), @@ -16639,7 +16142,8 @@ pub mod api { #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] pub fn registrars( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::option::Option< runtime_types::pallet_identity::types::RegistrarInfo< @@ -16652,7 +16156,7 @@ pub mod api { ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( + ::subxt::storage::address::Address::new_static( "Identity", "Registrars", vec![], @@ -16773,7 +16277,7 @@ pub mod api { } } } - pub mod society { + pub mod proxy { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -16782,7 +16286,6 @@ pub mod api { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16791,11 +16294,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid { - pub value: ::core::primitive::u128, + pub struct Proxy { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub force_proxy_type: + ::core::option::Option, + pub call: ::std::boxed::Box, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16804,8 +16309,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unbid { - pub pos: ::core::primitive::u32, + pub struct AddProxy { + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16816,16 +16324,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vouch { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub value: ::core::primitive::u128, - pub tip: ::core::primitive::u128, + pub struct RemoveProxy { + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16834,9 +16339,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unvouch { - pub pos: ::core::primitive::u32, - } + pub struct RemoveProxies; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -16846,12 +16349,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub candidate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub approve: ::core::primitive::bool, + pub struct CreatePure { + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + pub index: ::core::primitive::u16, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16862,8 +16363,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DefenderVote { - pub approve: ::core::primitive::bool, + pub struct KillPure { + pub spawner: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub index: ::core::primitive::u16, + #[codec(compact)] + pub height: ::core::primitive::u32, + #[codec(compact)] + pub ext_index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16874,23 +16382,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Payout; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Found { - pub founder: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub max_members: ::core::primitive::u32, - pub rules: ::std::vec::Vec<::core::primitive::u8>, + pub struct Announce { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16901,22 +16395,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unfound; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JudgeSuspendedMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub forgive: ::core::primitive::bool, + pub struct RemoveAnnouncement { + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -16927,15 +16408,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JudgeSuspendedCandidate { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub judgement: runtime_types::pallet_society::Judgement, + pub struct RejectAnnouncement { + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub call_hash: ::subxt::utils::H256, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -16944,513 +16422,357 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMaxMembers { - pub max: ::core::primitive::u32, + pub struct ProxyAnnounced { + pub delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub force_proxy_type: + ::core::option::Option, + pub call: ::std::boxed::Box, } pub struct TransactionApi; impl TransactionApi { - #[doc = "A user outside of the society can make a bid for entry."] + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] #[doc = ""] - #[doc = "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned"] - #[doc = "when the bid becomes a member, or if the bid calls `unbid`."] + #[doc = "Removes any corresponding announcement(s)."] #[doc = ""] #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `value`: A one time payment the bid would like to receive when joining the society."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)"] - #[doc = "- Storage Reads:"] - #[doc = "\t- One storage read to check for suspended candidate. O(1)"] - #[doc = "\t- One storage read to check for suspended member. O(1)"] - #[doc = "\t- One storage read to retrieve all current bids. O(B)"] - #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] - #[doc = "\t- One storage read to retrieve all members. O(M)"] - #[doc = "- Storage Writes:"] - #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] - #[doc = " w/ read)"] - #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] - #[doc = "- Notable Computation:"] - #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] - #[doc = "\t- O(log B) search to insert the new bid sorted."] - #[doc = "- External Pallet Operations:"] - #[doc = "\t- One balance reserve operation. O(X)"] - #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] - #[doc = "- Events:"] - #[doc = "\t- One event for new bid."] - #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] - #[doc = ""] - #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] - #[doc = "# "] - pub fn bid( + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy( &self, - value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "bid", - Bid { value }, + "Proxy", + "proxy", + Proxy { + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, [ - 101u8, 242u8, 48u8, 240u8, 74u8, 51u8, 49u8, 61u8, 6u8, 7u8, - 47u8, 200u8, 185u8, 217u8, 176u8, 139u8, 44u8, 167u8, 131u8, - 23u8, 219u8, 69u8, 216u8, 213u8, 177u8, 50u8, 8u8, 213u8, - 130u8, 90u8, 81u8, 4u8, + 2u8, 110u8, 54u8, 249u8, 204u8, 49u8, 0u8, 174u8, 55u8, 97u8, + 168u8, 240u8, 133u8, 33u8, 119u8, 57u8, 207u8, 107u8, 9u8, + 58u8, 91u8, 16u8, 97u8, 49u8, 136u8, 119u8, 180u8, 187u8, + 105u8, 150u8, 228u8, 140u8, ], ) } - #[doc = "A bidder can remove their bid for entry into society."] - #[doc = "By doing so, they will have their candidate deposit returned or"] - #[doc = "they will unvouch their voucher."] - #[doc = ""] - #[doc = "Payment: The bid deposit is unreserved if the user made a bid."] + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a bidder."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `pos`: Position in the `Bids` vector of the bid who wants to unbid."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), X (balance unreserve)"] - #[doc = "- One storage read and write to retrieve and update the bids. O(B)"] - #[doc = "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(B + X)"] - #[doc = "# "] - pub fn unbid( + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + pub fn add_proxy( &self, - pos: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + delegate: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "unbid", - Unbid { pos }, + "Proxy", + "add_proxy", + AddProxy { + delegate, + proxy_type, + delay, + }, [ - 255u8, 165u8, 200u8, 241u8, 93u8, 213u8, 155u8, 12u8, 178u8, - 108u8, 222u8, 14u8, 26u8, 226u8, 107u8, 129u8, 162u8, 151u8, - 81u8, 83u8, 39u8, 106u8, 151u8, 149u8, 19u8, 85u8, 28u8, - 222u8, 227u8, 9u8, 189u8, 39u8, + 4u8, 227u8, 81u8, 178u8, 130u8, 182u8, 247u8, 112u8, 127u8, + 90u8, 105u8, 143u8, 65u8, 137u8, 181u8, 63u8, 204u8, 92u8, + 140u8, 38u8, 153u8, 233u8, 186u8, 226u8, 8u8, 76u8, 228u8, + 206u8, 174u8, 54u8, 23u8, 238u8, ], ) } - #[doc = "As a member, vouch for someone to join society by placing a bid on their behalf."] - #[doc = ""] - #[doc = "There is no deposit required to vouch for a new bid, but a member can only vouch for"] - #[doc = "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by"] - #[doc = "the suspension judgement origin, the member will be banned from vouching again."] - #[doc = ""] - #[doc = "As a vouching member, you can claim a tip if the candidate is accepted. This tip will"] - #[doc = "be paid as a portion of the reward the member will receive for joining the society."] + #[doc = "Unregister a proxy account for the sender."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `who`: The user who you would like to vouch for."] - #[doc = "- `value`: The total reward to be paid between you and the candidate if they become"] - #[doc = "a member in the society."] - #[doc = "- `tip`: Your cut of the total `value` payout when the candidate is inducted into"] - #[doc = "the society. Tips larger than `value` will be saturated upon payout."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), C (len of candidates), M (len of members)"] - #[doc = "- Storage Reads:"] - #[doc = "\t- One storage read to retrieve all members. O(M)"] - #[doc = "\t- One storage read to check member is not already vouching. O(1)"] - #[doc = "\t- One storage read to check for suspended candidate. O(1)"] - #[doc = "\t- One storage read to check for suspended member. O(1)"] - #[doc = "\t- One storage read to retrieve all current bids. O(B)"] - #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] - #[doc = "- Storage Writes:"] - #[doc = "\t- One storage write to insert vouching status to the member. O(1)"] - #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] - #[doc = " w/ read)"] - #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] - #[doc = "- Notable Computation:"] - #[doc = "\t- O(log M) search to check sender is a member."] - #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] - #[doc = "\t- O(log B) search to insert the new bid sorted."] - #[doc = "- External Pallet Operations:"] - #[doc = "\t- One balance reserve operation. O(X)"] - #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] - #[doc = "- Events:"] - #[doc = "\t- One event for vouch."] - #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] - #[doc = ""] - #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] - #[doc = "# "] - pub fn vouch( + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + pub fn remove_proxy( &self, - who: ::subxt::utils::MultiAddress< + delegate: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, - value: ::core::primitive::u128, - tip: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Proxy", + "remove_proxy", + RemoveProxy { + delegate, + proxy_type, + delay, + }, + [ + 227u8, 7u8, 240u8, 130u8, 4u8, 168u8, 145u8, 107u8, 6u8, + 146u8, 138u8, 235u8, 245u8, 178u8, 168u8, 85u8, 104u8, 133u8, + 28u8, 93u8, 232u8, 99u8, 163u8, 75u8, 100u8, 113u8, 40u8, + 16u8, 238u8, 123u8, 169u8, 218u8, + ], + ) + } + #[doc = "Unregister all proxy accounts for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + pub fn remove_proxies(&self) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "vouch", - Vouch { who, value, tip }, + "Proxy", + "remove_proxies", + RemoveProxies {}, [ - 237u8, 190u8, 123u8, 221u8, 175u8, 83u8, 96u8, 83u8, 152u8, - 207u8, 134u8, 176u8, 124u8, 32u8, 23u8, 249u8, 153u8, 220u8, - 79u8, 164u8, 214u8, 231u8, 82u8, 204u8, 185u8, 245u8, 164u8, - 163u8, 59u8, 254u8, 184u8, 105u8, + 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, + 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, + 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, + 19u8, 23u8, 121u8, 129u8, ], ) } - #[doc = "As a vouching member, unvouch a bid. This only works while vouched user is"] - #[doc = "only a bidder (and not a candidate)."] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a vouching member."] + #[doc = "Requires a `Signed` origin."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `pos`: Position in the `Bids` vector of the bid who should be unvouched."] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids)"] - #[doc = "- One storage read O(1) to check the signer is a vouching member."] - #[doc = "- One storage mutate to retrieve and update the bids. O(B)"] - #[doc = "- One vouching storage removal. O(1)"] - #[doc = "- One event."] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] #[doc = ""] - #[doc = "Total Complexity: O(B)"] - #[doc = "# "] - pub fn unvouch( + #[doc = "Fails if there are insufficient funds to pay for deposit."] + pub fn create_pure( &self, - pos: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "unvouch", - Unvouch { pos }, + "Proxy", + "create_pure", + CreatePure { + proxy_type, + delay, + index, + }, [ - 242u8, 181u8, 109u8, 170u8, 197u8, 53u8, 8u8, 241u8, 47u8, - 28u8, 1u8, 209u8, 142u8, 106u8, 136u8, 163u8, 42u8, 169u8, - 7u8, 1u8, 202u8, 38u8, 199u8, 232u8, 13u8, 111u8, 92u8, 69u8, - 237u8, 90u8, 134u8, 84u8, + 65u8, 120u8, 166u8, 57u8, 89u8, 119u8, 161u8, 93u8, 184u8, + 203u8, 190u8, 29u8, 64u8, 238u8, 70u8, 17u8, 151u8, 227u8, + 170u8, 84u8, 21u8, 161u8, 171u8, 180u8, 193u8, 175u8, 211u8, + 228u8, 246u8, 216u8, 152u8, 91u8, ], ) } - #[doc = "As a member, vote on a candidate."] + #[doc = "Removes a previously spawned pure proxy."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `candidate`: The candidate that the member would like to bid on."] - #[doc = "- `approve`: A boolean which says if the candidate should be approved (`true`) or"] - #[doc = " rejected (`false`)."] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] #[doc = ""] - #[doc = "# "] - #[doc = "Key: C (len of candidates), M (len of members)"] - #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] - #[doc = "- One account lookup."] - #[doc = "- One storage read O(C) and O(C) search to check that user is a candidate."] - #[doc = "- One storage write to add vote to votes. O(1)"] - #[doc = "- One event."] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] #[doc = ""] - #[doc = "Total Complexity: O(M + logM + C)"] - #[doc = "# "] - pub fn vote( + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + pub fn kill_pure( &self, - candidate: ::subxt::utils::MultiAddress< + spawner: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + proxy_type: runtime_types::polkadot_runtime::ProxyType, + index: ::core::primitive::u16, + height: ::core::primitive::u32, + ext_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "vote", - Vote { candidate, approve }, + "Proxy", + "kill_pure", + KillPure { + spawner, + proxy_type, + index, + height, + ext_index, + }, [ - 92u8, 101u8, 248u8, 64u8, 78u8, 158u8, 63u8, 91u8, 0u8, 8u8, - 182u8, 117u8, 209u8, 190u8, 92u8, 35u8, 131u8, 121u8, 123u8, - 129u8, 36u8, 188u8, 65u8, 104u8, 229u8, 77u8, 159u8, 24u8, - 216u8, 77u8, 117u8, 29u8, + 67u8, 233u8, 31u8, 138u8, 222u8, 70u8, 182u8, 77u8, 103u8, + 39u8, 195u8, 35u8, 39u8, 89u8, 50u8, 248u8, 187u8, 101u8, + 170u8, 188u8, 87u8, 143u8, 6u8, 180u8, 178u8, 181u8, 158u8, + 111u8, 19u8, 139u8, 222u8, 208u8, ], ) } - #[doc = "As a member, vote on the defender."] + #[doc = "Publish the hash of a proxy-call that will be made in the future."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `approve`: A boolean which says if the candidate should be"] - #[doc = "approved (`true`) or rejected (`false`)."] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] #[doc = ""] - #[doc = "# "] - #[doc = "- Key: M (len of members)"] - #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] - #[doc = "- One storage write to add vote to votes. O(1)"] - #[doc = "- One event."] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] #[doc = ""] - #[doc = "Total Complexity: O(M + logM)"] - #[doc = "# "] - pub fn defender_vote( + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn announce( &self, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "defender_vote", - DefenderVote { approve }, + "Proxy", + "announce", + Announce { real, call_hash }, [ - 248u8, 232u8, 243u8, 44u8, 252u8, 68u8, 118u8, 143u8, 57u8, - 34u8, 196u8, 4u8, 71u8, 14u8, 28u8, 164u8, 139u8, 184u8, - 20u8, 71u8, 86u8, 227u8, 172u8, 84u8, 213u8, 221u8, 155u8, - 198u8, 56u8, 93u8, 209u8, 211u8, + 235u8, 116u8, 208u8, 53u8, 128u8, 91u8, 100u8, 68u8, 255u8, + 254u8, 119u8, 253u8, 108u8, 130u8, 88u8, 56u8, 113u8, 99u8, + 105u8, 179u8, 16u8, 143u8, 131u8, 203u8, 234u8, 76u8, 199u8, + 191u8, 35u8, 158u8, 130u8, 209u8, ], ) } - #[doc = "Transfer the first matured payout for the sender and remove it from the records."] - #[doc = ""] - #[doc = "NOTE: This extrinsic needs to be called multiple times to claim multiple matured"] - #[doc = "payouts."] + #[doc = "Remove a given announcement."] #[doc = ""] - #[doc = "Payment: The member will receive a payment equal to their first matured"] - #[doc = "payout to their free balance."] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member with"] - #[doc = "payouts remaining."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "# "] - #[doc = "Key: M (len of members), P (number of payouts for a particular member)"] - #[doc = "- One storage read O(M) and O(log M) search to check signer is a member."] - #[doc = "- One storage read O(P) to get all payouts for a member."] - #[doc = "- One storage read O(1) to get the current block number."] - #[doc = "- One currency transfer call. O(X)"] - #[doc = "- One storage write or removal to update the member's payouts. O(P)"] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + P + X)"] - #[doc = "# "] - pub fn payout(&self) -> ::subxt::tx::Payload { + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn remove_announcement( + &self, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "payout", - Payout {}, + "Proxy", + "remove_announcement", + RemoveAnnouncement { real, call_hash }, [ - 255u8, 171u8, 227u8, 58u8, 244u8, 95u8, 239u8, 127u8, 129u8, - 211u8, 131u8, 191u8, 154u8, 234u8, 85u8, 69u8, 173u8, 135u8, - 179u8, 83u8, 17u8, 41u8, 34u8, 137u8, 174u8, 251u8, 127u8, - 62u8, 74u8, 255u8, 19u8, 234u8, + 140u8, 186u8, 140u8, 129u8, 40u8, 124u8, 57u8, 61u8, 84u8, + 247u8, 123u8, 241u8, 148u8, 15u8, 94u8, 146u8, 121u8, 78u8, + 190u8, 68u8, 185u8, 125u8, 62u8, 49u8, 108u8, 131u8, 229u8, + 82u8, 68u8, 37u8, 184u8, 223u8, ], ) } - #[doc = "Found the society."] + #[doc = "Remove the given announcement of a delegate."] #[doc = ""] - #[doc = "This is done as a discrete action in order to allow for the"] - #[doc = "pallet to be included into a running chain and can only be done once."] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _FounderSetOrigin_."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `founder` - The first member and head of the newly founded society."] - #[doc = "- `max_members` - The initial max number of members for the society."] - #[doc = "- `rules` - The rules of this society concerning membership."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Two storage mutates to set `Head` and `Founder`. O(1)"] - #[doc = "- One storage write to add the first member to society. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = "# "] - pub fn found( + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + pub fn reject_announcement( &self, - founder: ::subxt::utils::MultiAddress< + delegate: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, - max_members: ::core::primitive::u32, - rules: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Society", - "found", - Found { - founder, - max_members, - rules, - }, - [ - 68u8, 18u8, 181u8, 102u8, 113u8, 16u8, 129u8, 67u8, 101u8, - 164u8, 35u8, 3u8, 182u8, 214u8, 181u8, 73u8, 42u8, 163u8, - 224u8, 110u8, 132u8, 185u8, 233u8, 239u8, 247u8, 143u8, 67u8, - 112u8, 116u8, 201u8, 236u8, 6u8, - ], - ) - } - #[doc = "Annul the founding of the society."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be Signed, and the signing account must be both"] - #[doc = "the `Founder` and the `Head`. This implies that it may only be done when there is one"] - #[doc = "member."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Two storage reads O(1)."] - #[doc = "- Four storage removals O(1)."] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = "# "] - pub fn unfound(&self) -> ::subxt::tx::Payload { + call_hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "unfound", - Unfound {}, + "Proxy", + "reject_announcement", + RejectAnnouncement { + delegate, + call_hash, + }, [ - 30u8, 120u8, 137u8, 175u8, 237u8, 121u8, 90u8, 9u8, 111u8, - 75u8, 51u8, 85u8, 86u8, 182u8, 6u8, 249u8, 62u8, 246u8, 21u8, - 150u8, 70u8, 148u8, 39u8, 14u8, 168u8, 250u8, 164u8, 235u8, - 23u8, 18u8, 164u8, 97u8, + 225u8, 198u8, 31u8, 173u8, 157u8, 141u8, 121u8, 51u8, 226u8, + 170u8, 219u8, 86u8, 14u8, 131u8, 122u8, 157u8, 161u8, 200u8, + 157u8, 37u8, 43u8, 97u8, 143u8, 97u8, 46u8, 206u8, 204u8, + 42u8, 78u8, 33u8, 85u8, 127u8, ], ) } - #[doc = "Allow suspension judgement origin to make judgement on a suspended member."] - #[doc = ""] - #[doc = "If a suspended member is forgiven, we simply add them back as a member, not affecting"] - #[doc = "any of the existing storage items for that member."] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] #[doc = ""] - #[doc = "If a suspended member is rejected, remove all associated storage items, including"] - #[doc = "their payouts, and remove any vouched bids they currently have."] + #[doc = "Removes any corresponding announcement(s)."] #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] #[doc = "Parameters:"] - #[doc = "- `who` - The suspended member to be judged."] - #[doc = "- `forgive` - A boolean representing whether the suspension judgement origin forgives"] - #[doc = " (`true`) or rejects (`false`) a suspended member."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), M (len of members)"] - #[doc = "- One storage read to check `who` is a suspended member. O(1)"] - #[doc = "- Up to one storage write O(M) with O(log M) binary search to add a member back to"] - #[doc = " society."] - #[doc = "- Up to 3 storage removals O(1) to clean up a removed member."] - #[doc = "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids."] - #[doc = "- Up to one additional event if unvouch takes place."] - #[doc = "- One storage removal. O(1)"] - #[doc = "- One event for the judgement."] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + B)"] - #[doc = "# "] - pub fn judge_suspended_member( + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy_announced( &self, - who: ::subxt::utils::MultiAddress< + delegate: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, - forgive: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Society", - "judge_suspended_member", - JudgeSuspendedMember { who, forgive }, - [ - 230u8, 85u8, 37u8, 61u8, 138u8, 230u8, 105u8, 230u8, 248u8, - 209u8, 167u8, 1u8, 176u8, 226u8, 83u8, 166u8, 141u8, 232u8, - 186u8, 86u8, 222u8, 227u8, 229u8, 84u8, 113u8, 58u8, 13u8, - 45u8, 246u8, 132u8, 60u8, 82u8, - ], - ) - } - #[doc = "Allow suspended judgement origin to make judgement on a suspended candidate."] - #[doc = ""] - #[doc = "If the judgement is `Approve`, we add them to society as a member with the appropriate"] - #[doc = "payment for joining society."] - #[doc = ""] - #[doc = "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back"] - #[doc = "to the society treasury, or we ban the voucher from vouching again."] - #[doc = ""] - #[doc = "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go"] - #[doc = "through the induction process again."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who` - The suspended candidate to be judged."] - #[doc = "- `judgement` - `Approve`, `Reject`, or `Rebid`."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), M (len of members), X (balance action)"] - #[doc = "- One storage read to check `who` is a suspended candidate."] - #[doc = "- One storage removal of the suspended candidate."] - #[doc = "- Approve Logic"] - #[doc = "\t- One storage read to get the available pot to pay users with. O(1)"] - #[doc = "\t- One storage write to update the available pot. O(1)"] - #[doc = "\t- One storage read to get the current block number. O(1)"] - #[doc = "\t- One storage read to get all members. O(M)"] - #[doc = "\t- Up to one unreserve currency action."] - #[doc = "\t- Up to two new storage writes to payouts."] - #[doc = "\t- Up to one storage write with O(log M) binary search to add a member to society."] - #[doc = "- Reject Logic"] - #[doc = "\t- Up to one repatriate reserved currency action. O(X)"] - #[doc = "\t- Up to one storage write to ban the vouching member from vouching again."] - #[doc = "- Rebid Logic"] - #[doc = "\t- Storage mutate with O(log B) binary search to place the user back into bids."] - #[doc = "- Up to one additional event if unvouch takes place."] - #[doc = "- One storage removal."] - #[doc = "- One event for the judgement."] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + B + X)"] - #[doc = "# "] - pub fn judge_suspended_candidate( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + real: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, >, - judgement: runtime_types::pallet_society::Judgement, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Society", - "judge_suspended_candidate", - JudgeSuspendedCandidate { who, judgement }, - [ - 233u8, 241u8, 151u8, 219u8, 217u8, 131u8, 112u8, 172u8, - 227u8, 93u8, 244u8, 214u8, 14u8, 183u8, 133u8, 74u8, 174u8, - 141u8, 235u8, 189u8, 52u8, 146u8, 62u8, 254u8, 248u8, 60u8, - 129u8, 109u8, 164u8, 54u8, 37u8, 237u8, - ], - ) - } - #[doc = "Allows root origin to change the maximum number of members in society."] - #[doc = "Max membership count must be greater than 1."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be from _ROOT_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `max` - The maximum number of members for the society."] - #[doc = ""] - #[doc = "# "] - #[doc = "- One storage write to update the max. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = "# "] - pub fn set_max_members( - &self, - max: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Society", - "set_max_members", - SetMaxMembers { max }, + "Proxy", + "proxy_announced", + ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::std::boxed::Box::new(call), + }, [ - 4u8, 120u8, 194u8, 207u8, 5u8, 93u8, 40u8, 12u8, 1u8, 151u8, - 127u8, 162u8, 218u8, 228u8, 1u8, 249u8, 148u8, 139u8, 124u8, - 171u8, 94u8, 151u8, 40u8, 164u8, 171u8, 122u8, 65u8, 233u8, - 27u8, 82u8, 74u8, 67u8, + 201u8, 208u8, 101u8, 152u8, 52u8, 146u8, 71u8, 255u8, 2u8, + 250u8, 225u8, 24u8, 117u8, 32u8, 113u8, 251u8, 230u8, 233u8, + 30u8, 187u8, 194u8, 116u8, 65u8, 51u8, 142u8, 106u8, 91u8, + 178u8, 193u8, 170u8, 150u8, 118u8, ], ) } } } #[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_society::pallet::Event; + pub type Event = runtime_types::pallet_proxy::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -17462,122 +16784,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The society is founded by the given identity."] - pub struct Founded { - pub founder: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Founded { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Founded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A membership bid just happened. The given account is the candidate's ID and their offer"] - #[doc = "is the second."] - pub struct Bid { - pub candidate_id: ::subxt::utils::AccountId32, - pub offer: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Bid { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Bid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A membership bid just happened by vouching. The given account is the candidate's ID and"] - #[doc = "their offer is the second. The vouching party is the third."] - pub struct Vouch { - pub candidate_id: ::subxt::utils::AccountId32, - pub offer: ::core::primitive::u128, - pub vouching: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Vouch { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Vouch"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was dropped (due to an excess of bids in the system)."] - pub struct AutoUnbid { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for AutoUnbid { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "AutoUnbid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was dropped (by their request)."] - pub struct Unbid { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Unbid { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Unbid"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate was dropped (by request of who vouched for them)."] - pub struct Unvouch { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Unvouch { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Unvouch"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A group of candidates have been inducted. The batch's primary is the first value, the"] - #[doc = "batch in full is the second."] - pub struct Inducted { - pub primary: ::subxt::utils::AccountId32, - pub candidates: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[doc = "A proxy was executed correctly, with the given."] + pub struct ProxyExecuted { + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for Inducted { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Inducted"; + impl ::subxt::events::StaticEvent for ProxyExecuted { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyExecuted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17588,105 +16802,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A suspended member has been judged."] - pub struct SuspendedMemberJudgement { + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + pub struct PureCreated { + pub pure: ::subxt::utils::AccountId32, pub who: ::subxt::utils::AccountId32, - pub judged: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for SuspendedMemberJudgement { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "SuspendedMemberJudgement"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A candidate has been suspended"] - pub struct CandidateSuspended { - pub candidate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for CandidateSuspended { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "CandidateSuspended"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has been suspended"] - pub struct MemberSuspended { - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberSuspended { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "MemberSuspended"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has been challenged"] - pub struct Challenged { - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Challenged { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Challenged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A vote has been placed"] - pub struct Vote { - pub candidate: ::subxt::utils::AccountId32, - pub voter: ::subxt::utils::AccountId32, - pub vote: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Vote { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Vote"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A vote has been placed for a defending member"] - pub struct DefenderVote { - pub voter: ::subxt::utils::AccountId32, - pub vote: ::core::primitive::bool, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub disambiguation_index: ::core::primitive::u16, } - impl ::subxt::events::StaticEvent for DefenderVote { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "DefenderVote"; + impl ::subxt::events::StaticEvent for PureCreated { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "PureCreated"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -17695,13 +16823,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new \\[max\\] member count has been set"] - pub struct NewMaxMembers { - pub max: ::core::primitive::u32, + #[doc = "An announcement was placed to make a call in the future."] + pub struct Announced { + pub real: ::subxt::utils::AccountId32, + pub proxy: ::subxt::utils::AccountId32, + pub call_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for NewMaxMembers { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "NewMaxMembers"; + impl ::subxt::events::StaticEvent for Announced { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "Announced"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -17712,16 +16842,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Society is unfounded."] - pub struct Unfounded { - pub founder: ::subxt::utils::AccountId32, + #[doc = "A proxy was added."] + pub struct ProxyAdded { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Unfounded { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Unfounded"; + impl ::subxt::events::StaticEvent for ProxyAdded { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyAdded"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -17730,717 +16862,273 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some funds were deposited into the society account."] - pub struct Deposit { - pub value: ::core::primitive::u128, + #[doc = "A proxy was removed."] + pub struct ProxyRemoved { + pub delegator: ::subxt::utils::AccountId32, + pub delegatee: ::subxt::utils::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Deposit { - const PALLET: &'static str = "Society"; - const EVENT: &'static str = "Deposit"; + impl ::subxt::events::StaticEvent for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The first member."] - pub fn founder( + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, + >, + ::core::primitive::u128, + ), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Founder", - vec![], - [ - 50u8, 222u8, 149u8, 14u8, 31u8, 163u8, 129u8, 123u8, 150u8, - 220u8, 16u8, 136u8, 150u8, 245u8, 171u8, 231u8, 75u8, 203u8, - 249u8, 123u8, 86u8, 43u8, 208u8, 65u8, 41u8, 111u8, 114u8, - 254u8, 131u8, 13u8, 26u8, 43u8, - ], - ) - } - #[doc = " A hash of the rules of this society concerning membership. Can only be set once and"] - #[doc = " only by the founder."] - pub fn rules( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::H256, ::subxt::storage::address::Yes, - (), - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Rules", - vec![], + ::subxt::storage::address::Address::new_static( + "Proxy", + "Proxies", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 10u8, 206u8, 100u8, 24u8, 227u8, 138u8, 82u8, 125u8, 247u8, - 160u8, 124u8, 121u8, 148u8, 98u8, 252u8, 214u8, 215u8, 232u8, - 160u8, 204u8, 23u8, 95u8, 240u8, 16u8, 201u8, 245u8, 13u8, - 178u8, 99u8, 61u8, 247u8, 137u8, + 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, + 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, + 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, + 67u8, 161u8, 103u8, 248u8, 14u8, ], ) } - #[doc = " The current set of candidates; bidders that are attempting to become members."] - pub fn candidates( + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec< - runtime_types::pallet_society::Bid< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt::utils::AccountId32, + runtime_types::polkadot_runtime::ProxyType, + ::core::primitive::u32, + >, >, - >, + ::core::primitive::u128, + ), + (), ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Candidates", - vec![], + ::subxt::storage::address::Address::new_static( + "Proxy", + "Proxies", + Vec::new(), [ - 88u8, 231u8, 247u8, 115u8, 122u8, 18u8, 106u8, 195u8, 238u8, - 219u8, 174u8, 23u8, 179u8, 228u8, 82u8, 26u8, 141u8, 190u8, - 206u8, 46u8, 177u8, 218u8, 123u8, 152u8, 208u8, 79u8, 57u8, - 68u8, 3u8, 208u8, 174u8, 193u8, + 106u8, 101u8, 77u8, 184u8, 193u8, 162u8, 132u8, 209u8, 130u8, + 70u8, 249u8, 183u8, 78u8, 52u8, 153u8, 120u8, 84u8, 224u8, + 233u8, 37u8, 171u8, 192u8, 99u8, 31u8, 49u8, 43u8, 126u8, + 67u8, 161u8, 103u8, 248u8, 14u8, ], ) } - #[doc = " The set of suspended candidates."] - pub fn suspended_candidates( + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( - ::core::primitive::u128, - runtime_types::pallet_society::BidKind< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, >, + ::core::primitive::u128, ), ::subxt::storage::address::Yes, - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "SuspendedCandidates", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Proxy", + "Announcements", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8, - 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8, - 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8, - 168u8, 148u8, 154u8, 57u8, 70u8, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, ], ) } - #[doc = " The set of suspended candidates."] - pub fn suspended_candidates_root( + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( - ::core::primitive::u128, - runtime_types::pallet_society::BidKind< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt::utils::AccountId32, + ::subxt::utils::H256, + ::core::primitive::u32, + >, >, + ::core::primitive::u128, ), (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "SuspendedCandidates", - Vec::new(), - [ - 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8, - 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8, - 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8, - 168u8, 148u8, 154u8, 57u8, 70u8, - ], - ) - } - #[doc = " Amount of our account balance that is specifically for the next round's bid(s)."] - pub fn pot( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Pot", - vec![], + ::subxt::storage::address::Address::new_static( + "Proxy", + "Announcements", + Vec::new(), [ - 242u8, 124u8, 22u8, 252u8, 4u8, 178u8, 161u8, 120u8, 8u8, - 185u8, 182u8, 177u8, 205u8, 205u8, 192u8, 248u8, 42u8, 8u8, - 216u8, 92u8, 194u8, 219u8, 74u8, 248u8, 135u8, 105u8, 210u8, - 207u8, 159u8, 24u8, 149u8, 190u8, + 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, + 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, + 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, + 237u8, 103u8, 217u8, 53u8, ], ) } - #[doc = " The most primary from the most recently approved members."] - pub fn head( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a proxy."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] + pub fn proxy_deposit_base( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Head", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "ProxyDepositBase", [ - 162u8, 185u8, 82u8, 237u8, 221u8, 60u8, 77u8, 96u8, 89u8, - 41u8, 162u8, 7u8, 174u8, 251u8, 121u8, 247u8, 196u8, 118u8, - 57u8, 24u8, 142u8, 129u8, 142u8, 106u8, 166u8, 7u8, 86u8, - 54u8, 108u8, 110u8, 118u8, 75u8, + 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 current set of members, ordered."] - pub fn members( + #[doc = " The amount of currency needed per proxy added."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] + #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] + #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] + pub fn proxy_deposit_factor( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Members", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "ProxyDepositFactor", [ - 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, + 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 set of suspended members."] - pub fn suspended_members( + #[doc = " The maximum amount of proxies allowed for a single account."] + pub fn max_proxies( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "SuspendedMembers", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "MaxProxies", [ - 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8, - 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8, - 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8, - 53u8, 79u8, 163u8, 65u8, 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 = " The set of suspended members."] - pub fn suspended_members_root( + #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] + pub fn max_pending( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::bool, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "SuspendedMembers", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "MaxPending", [ - 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8, - 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8, - 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8, - 53u8, 79u8, 163u8, 65u8, 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 = " The current bids, stored ordered by the value of the bid."] - pub fn bids( + #[doc = " The base amount of currency needed to reserve for creating an announcement."] + #[doc = ""] + #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] + #[doc = " bytes)."] + pub fn announcement_deposit_base( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec< - runtime_types::pallet_society::Bid< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Bids", - vec![], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "AnnouncementDepositBase", [ - 8u8, 152u8, 107u8, 47u8, 7u8, 45u8, 86u8, 149u8, 230u8, 81u8, - 253u8, 110u8, 255u8, 83u8, 16u8, 168u8, 169u8, 70u8, 196u8, - 167u8, 168u8, 98u8, 36u8, 122u8, 124u8, 77u8, 61u8, 245u8, - 248u8, 48u8, 224u8, 125u8, + 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 = " Members currently vouching or banned from vouching again"] - pub fn vouching( + #[doc = " The amount of currency needed per announcement made."] + #[doc = ""] + #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] + #[doc = " into a pre-existing storage value."] + pub fn announcement_deposit_factor( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::VouchingStatus, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Vouching", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Proxy", + "AnnouncementDepositFactor", [ - 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8, - 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8, - 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8, - 223u8, 15u8, 56u8, 223u8, 96u8, - ], - ) - } - #[doc = " Members currently vouching or banned from vouching again"] - pub fn vouching_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::VouchingStatus, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Vouching", - Vec::new(), - [ - 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8, - 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8, - 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8, - 223u8, 15u8, 56u8, 223u8, 96u8, - ], - ) - } - #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."] - pub fn payouts( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Payouts", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8, - 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8, - 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8, - 229u8, 69u8, 181u8, 196u8, 202u8, - ], - ) - } - #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."] - pub fn payouts_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Payouts", - Vec::new(), - [ - 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8, - 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8, - 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8, - 229u8, 69u8, 181u8, 196u8, 202u8, - ], - ) - } - #[doc = " The ongoing number of losing votes cast by the member."] - pub fn strikes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Strikes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8, - 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8, - 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8, - 238u8, 109u8, 255u8, 64u8, 135u8, - ], - ) - } - #[doc = " The ongoing number of losing votes cast by the member."] - pub fn strikes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Strikes", - Vec::new(), - [ - 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8, - 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8, - 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8, - 238u8, 109u8, 255u8, 64u8, 135u8, - ], - ) - } - #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."] - pub fn votes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::Vote, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Votes", - 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, - ), - ], - [ - 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8, - 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8, - 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8, - 136u8, 245u8, 150u8, 102u8, 77u8, - ], - ) - } - #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."] - pub fn votes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::Vote, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Votes", - Vec::new(), - [ - 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8, - 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8, - 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8, - 136u8, 245u8, 150u8, 102u8, 77u8, - ], - ) - } - #[doc = " The defending member currently being challenged."] - pub fn defender( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "Defender", - vec![], - [ - 116u8, 251u8, 243u8, 93u8, 242u8, 69u8, 62u8, 163u8, 154u8, - 55u8, 243u8, 204u8, 205u8, 210u8, 205u8, 5u8, 202u8, 177u8, - 153u8, 199u8, 126u8, 142u8, 248u8, 65u8, 88u8, 226u8, 101u8, - 116u8, 74u8, 170u8, 93u8, 146u8, - ], - ) - } - #[doc = " Votes for the defender."] - pub fn defender_votes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::Vote, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "DefenderVotes", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8, - 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8, - 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8, - 218u8, 47u8, 145u8, 163u8, 245u8, - ], - ) - } - #[doc = " Votes for the defender."] - pub fn defender_votes_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_society::Vote, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "DefenderVotes", - Vec::new(), - [ - 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8, - 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8, - 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8, - 218u8, 47u8, 145u8, 163u8, 245u8, - ], - ) - } - #[doc = " The max number of members for the society at one time."] - pub fn max_members( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Society", - "MaxMembers", - vec![], - [ - 54u8, 113u8, 4u8, 248u8, 5u8, 42u8, 67u8, 237u8, 91u8, 159u8, - 63u8, 239u8, 3u8, 196u8, 202u8, 135u8, 182u8, 137u8, 204u8, - 58u8, 39u8, 11u8, 42u8, 79u8, 129u8, 85u8, 37u8, 154u8, - 178u8, 189u8, 123u8, 184u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The societies's pallet id"] - pub fn pallet_id( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "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, - ], - ) - } - #[doc = " The minimum amount of a deposit required for a bid to be made."] - pub fn candidate_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "CandidateDeposit", - [ - 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 the unpaid reward that gets deducted in the case that either a skeptic"] - #[doc = " doesn't vote or someone votes in the wrong way."] - pub fn wrong_side_deduction( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "WrongSideDeduction", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The number of times a member may vote the wrong way (or not at all, when they are a"] - #[doc = " skeptic) before they become suspended."] - pub fn max_strikes( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "MaxStrikes", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 of incentive paid within each period. Doesn't include VoterTip."] - pub fn period_spend( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "PeriodSpend", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The number of blocks between candidate/membership rotation periods."] - pub fn rotation_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "RotationPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 duration of the payout lock."] - pub fn max_lock_duration( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "MaxLockDuration", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The number of blocks between membership challenges."] - pub fn challenge_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "ChallengePeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 that we accept per round."] - pub fn max_candidate_intake( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Society", - "MaxCandidateIntake", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, ], ) } } } } - pub mod recovery { + pub mod multisig { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -18457,32 +17145,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsRecovered { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub call: - ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetRecovered { - pub lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct AsMultiThreshold1 { + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub call: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18493,59 +17158,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreateRecovery { - pub friends: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub struct AsMulti { pub threshold: ::core::primitive::u16, - pub delay_period: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InitiateRecovery { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VouchRecovery { - pub lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimRecovery { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, + pub call: ::std::boxed::Box, + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18556,11 +17176,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseRecovery { - pub rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + pub struct ApproveAsMulti { + pub threshold: ::core::primitive::u16, + pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + pub maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, + pub call_hash: [::core::primitive::u8; 32usize], + pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18571,303 +17194,243 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveRecovery; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelRecovered { - pub account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + 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 = "Send a call through a recovered account."] + #[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_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] - #[doc = "- `call`: The call you want to make with the recovered account."] - pub fn as_recovered( + #[doc = "- `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, - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + call: runtime_types::polkadot_runtime::RuntimeCall, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Recovery", - "as_recovered", - AsRecovered { - account, + "Multisig", + "as_multi_threshold_1", + AsMultiThreshold1 { + other_signatories, call: ::std::boxed::Box::new(call), }, [ - 199u8, 66u8, 182u8, 13u8, 27u8, 192u8, 252u8, 154u8, 31u8, - 100u8, 135u8, 160u8, 11u8, 125u8, 251u8, 47u8, 211u8, 6u8, - 200u8, 81u8, 22u8, 111u8, 129u8, 161u8, 167u8, 62u8, 47u8, - 202u8, 99u8, 9u8, 23u8, 237u8, + 147u8, 128u8, 190u8, 162u8, 129u8, 151u8, 240u8, 184u8, 12u8, + 100u8, 188u8, 81u8, 25u8, 140u8, 46u8, 215u8, 52u8, 135u8, + 134u8, 207u8, 40u8, 221u8, 114u8, 48u8, 102u8, 107u8, 173u8, + 90u8, 74u8, 56u8, 147u8, 238u8, ], ) } - #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] - #[doc = "for a lost account directly."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _ROOT_."] + #[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 = "Parameters:"] - #[doc = "- `lost`: The \"lost account\" to be recovered."] - #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] - pub fn set_recovered( - &self, - lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Recovery", - "set_recovered", - SetRecovered { lost, rescuer }, - [ - 149u8, 123u8, 98u8, 179u8, 7u8, 149u8, 38u8, 221u8, 25u8, - 244u8, 176u8, 243u8, 202u8, 6u8, 228u8, 39u8, 248u8, 32u8, - 146u8, 140u8, 235u8, 21u8, 181u8, 18u8, 105u8, 44u8, 15u8, - 221u8, 82u8, 233u8, 133u8, 51u8, - ], - ) - } - #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] + #[doc = "If there are enough, then dispatch the call."] #[doc = ""] - #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] - #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] - #[doc = "in full when the user calls `remove_recovery`."] + #[doc = "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 = "Parameters:"] - #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] - #[doc = " ordered and contain no duplicate values."] - #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] - #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] - #[doc = " friends."] - #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] - #[doc = " needs to pass before the account can be recovered."] - pub fn create_recovery( - &self, - friends: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[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, - delay_period: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call: runtime_types::polkadot_runtime::RuntimeCall, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Recovery", - "create_recovery", - CreateRecovery { - friends, + "Multisig", + "as_multi", + AsMulti { threshold, - delay_period, + other_signatories, + maybe_timepoint, + call: ::std::boxed::Box::new(call), + max_weight, }, [ - 80u8, 233u8, 68u8, 224u8, 181u8, 127u8, 8u8, 35u8, 135u8, - 121u8, 73u8, 25u8, 255u8, 192u8, 177u8, 140u8, 67u8, 113u8, - 112u8, 35u8, 63u8, 96u8, 1u8, 138u8, 93u8, 27u8, 219u8, 52u8, - 74u8, 251u8, 65u8, 96u8, + 223u8, 45u8, 132u8, 89u8, 48u8, 61u8, 93u8, 46u8, 76u8, 28u8, + 217u8, 194u8, 89u8, 170u8, 245u8, 6u8, 76u8, 50u8, 12u8, + 133u8, 230u8, 10u8, 56u8, 231u8, 29u8, 202u8, 60u8, 50u8, + 181u8, 144u8, 238u8, 151u8, ], ) } - #[doc = "Initiate the process for recovering a recoverable account."] + #[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: `RecoveryDeposit` balance will be reserved for initiating the"] - #[doc = "recovery process. This deposit will always be repatriated to the account"] - #[doc = "trying to be recovered. See `close_recovery`."] + #[doc = "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 = "Parameters:"] - #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] - #[doc = " recoverable (i.e. have a recovery configuration)."] - pub fn initiate_recovery( - &self, - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Recovery", - "initiate_recovery", - InitiateRecovery { account }, - [ - 140u8, 244u8, 135u8, 122u8, 61u8, 107u8, 212u8, 100u8, 212u8, - 11u8, 216u8, 47u8, 113u8, 155u8, 121u8, 232u8, 158u8, 26u8, - 229u8, 82u8, 231u8, 193u8, 225u8, 2u8, 112u8, 220u8, 40u8, - 104u8, 36u8, 17u8, 164u8, 124u8, - ], - ) - } - #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] - #[doc = "process for that account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] - #[doc = "for the recoverable account."] + #[doc = "- `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 = "Parameters:"] - #[doc = "- `lost`: The lost account that you want to recover."] - #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] #[doc = ""] - #[doc = "The combination of these two parameters must point to an active recovery"] - #[doc = "process."] - pub fn vouch_recovery( + #[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, - lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, >, - ) -> ::subxt::tx::Payload { + call_hash: [::core::primitive::u8; 32usize], + max_weight: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Recovery", - "vouch_recovery", - VouchRecovery { lost, rescuer }, + "Multisig", + "approve_as_multi", + ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, + }, [ - 188u8, 113u8, 2u8, 31u8, 149u8, 123u8, 248u8, 46u8, 211u8, - 88u8, 121u8, 207u8, 227u8, 92u8, 198u8, 199u8, 29u8, 216u8, - 84u8, 140u8, 169u8, 154u8, 240u8, 183u8, 140u8, 203u8, 223u8, - 82u8, 222u8, 187u8, 20u8, 21u8, + 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 = "Allow a successful rescuer to claim their recovered account."] + #[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_ and must be a \"rescuer\""] - #[doc = "who has successfully completed the account recovery process: collected"] - #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] - #[doc = " you."] - pub fn claim_recovery( - &self, - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Recovery", - "claim_recovery", - ClaimRecovery { account }, - [ - 60u8, 49u8, 116u8, 129u8, 138u8, 95u8, 243u8, 120u8, 231u8, - 20u8, 149u8, 37u8, 56u8, 209u8, 196u8, 177u8, 186u8, 175u8, - 58u8, 203u8, 226u8, 89u8, 80u8, 212u8, 12u8, 17u8, 119u8, - 163u8, 74u8, 164u8, 180u8, 187u8, - ], - ) - } - #[doc = "As the controller of a recoverable account, close an active recovery"] - #[doc = "process for your account."] - #[doc = ""] - #[doc = "Payment: By calling this function, the recoverable account will receive"] - #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account with an active recovery process for it."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] - pub fn close_recovery( - &self, - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Recovery", - "close_recovery", - CloseRecovery { rescuer }, - [ - 61u8, 242u8, 216u8, 157u8, 103u8, 149u8, 121u8, 151u8, 132u8, - 247u8, 95u8, 157u8, 178u8, 27u8, 100u8, 222u8, 72u8, 188u8, - 168u8, 64u8, 63u8, 135u8, 248u8, 133u8, 177u8, 15u8, 205u8, - 146u8, 98u8, 79u8, 135u8, 157u8, - ], - ) - } - #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] - #[doc = ""] - #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] - #[doc = "recovery attempts before calling this function else it will fail."] - #[doc = ""] - #[doc = "Payment: By calling this function the recoverable account will unreserve"] - #[doc = "their recovery configuration deposit."] - #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account (i.e. has a recovery configuration)."] - pub fn remove_recovery( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Recovery", - "remove_recovery", - RemoveRecovery {}, - [ - 14u8, 1u8, 44u8, 24u8, 242u8, 16u8, 67u8, 192u8, 79u8, 206u8, - 104u8, 233u8, 91u8, 202u8, 253u8, 100u8, 48u8, 78u8, 233u8, - 24u8, 124u8, 176u8, 211u8, 87u8, 63u8, 110u8, 2u8, 7u8, - 231u8, 53u8, 177u8, 196u8, - ], - ) - } - #[doc = "Cancel the ability to use `as_recovered` for `account`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] + #[doc = "- `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 = "Parameters:"] - #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] - pub fn cancel_recovered( + #[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, - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, + timepoint: runtime_types::pallet_multisig::Timepoint< ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { + call_hash: [::core::primitive::u8; 32usize], + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Recovery", - "cancel_recovered", - CancelRecovered { account }, + "Multisig", + "cancel_as_multi", + CancelAsMulti { + threshold, + other_signatories, + timepoint, + call_hash, + }, [ - 153u8, 253u8, 13u8, 12u8, 200u8, 69u8, 113u8, 49u8, 75u8, - 61u8, 10u8, 209u8, 18u8, 192u8, 233u8, 158u8, 241u8, 24u8, - 243u8, 0u8, 136u8, 55u8, 43u8, 179u8, 43u8, 113u8, 130u8, - 99u8, 146u8, 132u8, 193u8, 251u8, + 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 = "Events type."] - pub type Event = runtime_types::pallet_recovery::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_multisig::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -18879,50 +17442,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A recovery process has been set up for an account."] - pub struct RecoveryCreated { - pub account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for RecoveryCreated { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryCreated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A recovery process has been initiated for lost account by rescuer account."] - pub struct RecoveryInitiated { - pub lost_account: ::subxt::utils::AccountId32, - pub rescuer_account: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for RecoveryInitiated { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryInitiated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] - pub struct RecoveryVouched { - pub lost_account: ::subxt::utils::AccountId32, - pub rescuer_account: ::subxt::utils::AccountId32, - pub sender: ::subxt::utils::AccountId32, + #[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 RecoveryVouched { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryVouched"; + impl ::subxt::events::StaticEvent for NewMultisig { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "NewMultisig"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18933,14 +17461,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A recovery process for lost account by rescuer account has been closed."] - pub struct RecoveryClosed { - pub lost_account: ::subxt::utils::AccountId32, - pub rescuer_account: ::subxt::utils::AccountId32, + #[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 RecoveryClosed { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryClosed"; + impl ::subxt::events::StaticEvent for MultisigApproval { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigApproval"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18951,14 +17482,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Lost account has been successfully recovered by rescuer account."] - pub struct AccountRecovered { - pub lost_account: ::subxt::utils::AccountId32, - pub rescuer_account: ::subxt::utils::AccountId32, + #[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 AccountRecovered { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "AccountRecovered"; + impl ::subxt::events::StaticEvent for MultisigExecuted { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigExecuted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -18969,195 +17505,81 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A recovery process has been removed for an account."] - pub struct RecoveryRemoved { - pub lost_account: ::subxt::utils::AccountId32, + #[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 RecoveryRemoved { - const PALLET: &'static str = "Recovery"; - const EVENT: &'static str = "RecoveryRemoved"; + impl ::subxt::events::StaticEvent for MultisigCancelled { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigCancelled"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of recoverable accounts and their recovery configuration."] - pub fn recoverable( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_recovery::RecoveryConfig< - ::core::primitive::u32, - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "Recoverable", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8, - 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8, - 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8, - 197u8, 212u8, 20u8, 167u8, 142u8, - ], - ) - } - #[doc = " The set of recoverable accounts and their recovery configuration."] - pub fn recoverable_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_recovery::RecoveryConfig< - ::core::primitive::u32, - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "Recoverable", - Vec::new(), - [ - 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8, - 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8, - 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8, - 197u8, 212u8, 20u8, 167u8, 142u8, - ], - ) - } - #[doc = " Active recovery attempts."] - #[doc = ""] - #[doc = " First account is the account to be recovered, and the second account"] - #[doc = " is the user trying to recover the account."] - pub fn active_recoveries( + #[doc = " The set of open multisig operations."] + pub fn multisigs( &self, _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_recovery::ActiveRecovery< + _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, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, + ::subxt::utils::AccountId32, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "ActiveRecoveries", + ::subxt::storage::address::Address::new_static( + "Multisig", + "Multisigs", vec![ - ::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, ), - ::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::StaticStorageMapKey::new( _1.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, ), ], [ - 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8, - 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8, - 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8, - 60u8, 228u8, 44u8, 103u8, 39u8, + 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, + 87u8, 8u8, 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, + 163u8, 96u8, 218u8, 3u8, 106u8, 44u8, 44u8, 187u8, 46u8, + 238u8, 80u8, 203u8, 175u8, 155u8, ], ) } - #[doc = " Active recovery attempts."] - #[doc = ""] - #[doc = " First account is the account to be recovered, and the second account"] - #[doc = " is the user trying to recover the account."] - pub fn active_recoveries_root( + #[doc = " The set of open multisig operations."] + pub fn multisigs_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_recovery::ActiveRecovery< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_multisig::Multisig< ::core::primitive::u32, ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, + ::subxt::utils::AccountId32, >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "ActiveRecoveries", - Vec::new(), - [ - 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8, - 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8, - 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8, - 60u8, 228u8, 44u8, 103u8, 39u8, - ], - ) - } - #[doc = " The list of allowed proxy accounts."] - #[doc = ""] - #[doc = " Map from the user who can access it to the recovered account."] - pub fn proxy( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "Proxy", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8, - 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8, - 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8, - 165u8, 108u8, 172u8, 70u8, 108u8, - ], - ) - } - #[doc = " The list of allowed proxy accounts."] - #[doc = ""] - #[doc = " Map from the user who can access it to the recovered account."] - pub fn proxy_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Recovery", - "Proxy", + ::subxt::storage::address::Address::new_static( + "Multisig", + "Multisigs", Vec::new(), [ - 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8, - 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8, - 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8, - 165u8, 108u8, 172u8, 70u8, 108u8, + 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, ], ) } @@ -19167,17 +17589,19 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a recovery configuration."] + #[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 = " `2 + sizeof(BlockNumber, Balance)` bytes."] - pub fn config_deposit_base( + #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] + #[doc = " `32 + sizeof(AccountId)` bytes."] + pub fn deposit_base( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Recovery", - "ConfigDepositBase", + "Multisig", + "DepositBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -19186,18 +17610,16 @@ pub mod api { ], ) } - #[doc = " The amount of currency needed per additional user when creating a recovery"] - #[doc = " configuration."] + #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] #[doc = ""] - #[doc = " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage"] - #[doc = " value."] - pub fn friend_deposit_factor( + #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] + pub fn deposit_factor( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Recovery", - "FriendDepositFactor", + "Multisig", + "DepositFactor", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -19206,19 +17628,14 @@ pub mod api { ], ) } - #[doc = " The maximum amount of friends allowed in a recovery configuration."] - #[doc = ""] - #[doc = " NOTE: The threshold programmed in this Pallet uses u16, so it does"] - #[doc = " not really make sense to have a limit here greater than u16::MAX."] - #[doc = " But also, that is a lot more than you should probably set this value"] - #[doc = " to anyway..."] - pub fn max_friends( + #[doc = " The maximum amount of signatories allowed in the multisig."] + pub fn max_signatories( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Recovery", - "MaxFriends", + "Multisig", + "MaxSignatories", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -19227,32 +17644,10 @@ pub mod api { ], ) } - #[doc = " The base amount of currency needed to reserve for starting a recovery."] - #[doc = ""] - #[doc = " This is primarily held for deterring malicious recovery attempts, and should"] - #[doc = " have a value large enough that a bad actor would choose not to place this"] - #[doc = " deposit. It also acts to fund additional storage item whose value size is"] - #[doc = " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable"] - #[doc = " threshold."] - pub fn recovery_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Recovery", - "RecoveryDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } } } } - pub mod vesting { + pub mod bounties { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -19269,7 +17664,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vest; + 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, @@ -19279,11 +17678,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestOther { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct ApproveBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19294,15 +17691,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestedTransfer { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + pub struct ProposeCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub fee: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19313,19 +17708,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceVestedTransfer { - pub source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + pub struct UnassignCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19336,209 +17721,330 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MergeSchedules { - pub schedule1_index: ::core::primitive::u32, - pub schedule2_index: ::core::primitive::u32, + pub struct AcceptCurator { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AwardBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ClaimBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseBounty { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ExtendBountyExpiry { + #[codec(compact)] + pub bounty_id: ::core::primitive::u32, + pub remark: ::std::vec::Vec<::core::primitive::u8>, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Unlock any vested funds of the sender account."] + #[doc = "Propose a new bounty."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[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 = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = "# "] - pub fn vest(&self) -> ::subxt::tx::Payload { + #[doc = "- `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( - "Vesting", - "vest", - Vest {}, + "Bounties", + "propose_bounty", + ProposeBounty { value, description }, [ - 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8, - 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8, - 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8, - 34u8, 21u8, 167u8, 172u8, 54u8, + 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8, + 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8, + 59u8, 114u8, 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8, + 201u8, 128u8, 102u8, 219u8, ], ) } - #[doc = "Unlock any vested funds of a `target` account."] + #[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 = "The dispatch origin for this call must be _Signed_."] + #[doc = "May only be called from `T::ApproveOrigin`."] #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn approve_bounty( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "approve_bounty", + ApproveBounty { bounty_id }, + [ + 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, + 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, + 68u8, 48u8, 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, + 198u8, 183u8, 173u8, + ], + ) + } + #[doc = "Assign a curator to a funded bounty."] #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = "May only be called from `T::ApproveOrigin`."] #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] + #[doc = "- O(1)."] #[doc = "# "] - pub fn vest_other( + pub fn propose_curator( &self, - target: ::subxt::utils::MultiAddress< + bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, + (), >, - ) -> ::subxt::tx::Payload { + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "vest_other", - VestOther { target }, + "Bounties", + "propose_curator", + ProposeCurator { + bounty_id, + curator, + fee, + }, [ - 243u8, 97u8, 222u8, 101u8, 143u8, 17u8, 184u8, 191u8, 208u8, - 162u8, 31u8, 121u8, 22u8, 88u8, 2u8, 36u8, 9u8, 22u8, 27u8, - 117u8, 236u8, 82u8, 83u8, 218u8, 166u8, 154u8, 49u8, 141u8, - 95u8, 127u8, 63u8, 13u8, + 123u8, 148u8, 21u8, 204u8, 216u8, 6u8, 47u8, 83u8, 182u8, + 30u8, 171u8, 48u8, 193u8, 200u8, 197u8, 147u8, 111u8, 88u8, + 14u8, 242u8, 66u8, 175u8, 241u8, 208u8, 95u8, 151u8, 41u8, + 46u8, 213u8, 188u8, 65u8, 196u8, ], ) } - #[doc = "Create a vested transfer."] + #[doc = "Unassign curator from a bounty."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[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 = "Emits `VestingCreated`."] + #[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 = "NOTE: This will unlock all schedules through the current block."] + #[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 = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = "- O(1)."] #[doc = "# "] - pub fn vested_transfer( + pub fn unassign_curator( &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "vested_transfer", - VestedTransfer { target, schedule }, + "Bounties", + "unassign_curator", + UnassignCurator { bounty_id }, [ - 157u8, 78u8, 209u8, 131u8, 29u8, 102u8, 180u8, 61u8, 212u8, - 154u8, 28u8, 3u8, 150u8, 236u8, 22u8, 116u8, 8u8, 142u8, - 174u8, 35u8, 37u8, 167u8, 5u8, 200u8, 189u8, 227u8, 122u8, - 55u8, 188u8, 213u8, 59u8, 206u8, + 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8, + 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8, + 63u8, 223u8, 28u8, 173u8, 244u8, 82u8, 113u8, 177u8, 99u8, + 27u8, 207u8, 247u8, 207u8, 213u8, ], ) } - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = "May only be called from the curator."] #[doc = ""] #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = "- O(1)."] #[doc = "# "] - pub fn force_vested_transfer( + pub fn accept_curator( &self, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - target: ::subxt::utils::MultiAddress< + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "accept_curator", + AcceptCurator { bounty_id }, + [ + 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8, + 253u8, 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8, + 144u8, 30u8, 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8, + 116u8, 112u8, 235u8, 34u8, 166u8, + ], + ) + } + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn award_bounty( + &self, + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, + (), >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "force_vested_transfer", - ForceVestedTransfer { - source, - target, - schedule, + "Bounties", + "award_bounty", + AwardBounty { + bounty_id, + beneficiary, }, [ - 181u8, 47u8, 44u8, 166u8, 243u8, 122u8, 51u8, 81u8, 136u8, - 192u8, 248u8, 150u8, 149u8, 49u8, 208u8, 203u8, 156u8, 100u8, - 56u8, 133u8, 22u8, 53u8, 241u8, 237u8, 145u8, 210u8, 25u8, - 48u8, 61u8, 184u8, 112u8, 253u8, + 203u8, 164u8, 214u8, 242u8, 1u8, 11u8, 217u8, 32u8, 189u8, + 136u8, 29u8, 230u8, 88u8, 17u8, 134u8, 189u8, 15u8, 204u8, + 223u8, 20u8, 168u8, 182u8, 129u8, 48u8, 83u8, 25u8, 125u8, + 25u8, 209u8, 155u8, 170u8, 68u8, ], ) } - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] + #[doc = "Claim the payout from an awarded bounty after payout delay."] #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = "- `bounty_id`: Bounty ID to claim."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + pub fn claim_bounty( + &self, + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Bounties", + "claim_bounty", + ClaimBounty { bounty_id }, + [ + 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8, + 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8, + 48u8, 64u8, 115u8, 177u8, 95u8, 242u8, 97u8, 181u8, 50u8, + 68u8, 37u8, 59u8, 85u8, + ], + ) + } + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - pub fn merge_schedules( + #[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, - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Vesting", - "merge_schedules", - MergeSchedules { - schedule1_index, - schedule2_index, - }, + "Bounties", + "close_bounty", + CloseBounty { bounty_id }, [ - 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8, - 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8, - 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8, - 157u8, 75u8, 4u8, 110u8, 125u8, + 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8, + 211u8, 119u8, 229u8, 137u8, 137u8, 183u8, 240u8, 241u8, + 146u8, 69u8, 169u8, 124u8, 220u8, 236u8, 111u8, 98u8, 188u8, + 100u8, 52u8, 127u8, 245u8, 244u8, 92u8, + ], + ) + } + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "# "] + #[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", + ExtendBountyExpiry { bounty_id, remark }, + [ + 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, + 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, + 63u8, 138u8, 100u8, 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, + 60u8, 87u8, 40u8, 80u8, 202u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_vesting::pallet::Event; + 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, @@ -19547,15 +18053,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - pub struct VestingUpdated { - pub account: ::subxt::utils::AccountId32, - pub unvested: ::core::primitive::u128, + #[doc = "New bounty proposal."] + pub struct BountyProposed { + pub index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for VestingUpdated { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingUpdated"; + impl ::subxt::events::StaticEvent for BountyProposed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyProposed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -19566,95 +18070,260 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An \\[account\\] has become fully vested."] - pub struct VestingCompleted { - pub account: ::subxt::utils::AccountId32, + #[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 VestingCompleted { - const PALLET: &'static str = "Vesting"; - const EVENT: &'static str = "VestingCompleted"; + impl ::subxt::events::StaticEvent for BountyRejected { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyRejected"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty proposal is funded and became active."] + pub struct BountyBecameActive { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyBecameActive { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyBecameActive"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is awarded to a beneficiary."] + pub struct BountyAwarded { + pub index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for BountyAwarded { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyAwarded"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is claimed by beneficiary."] + pub struct BountyClaimed { + pub index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for BountyClaimed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyClaimed"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty is cancelled."] + pub struct BountyCanceled { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyCanceled { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyCanceled"; + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A bounty expiry is extended."] + pub struct BountyExtended { + pub index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BountyExtended { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyExtended"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting( + #[doc = " Number of bounty proposals that have been made."] + pub fn bounty_count( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyCount", + vec![], + [ + 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8, + 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8, + 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, 138u8, 12u8, + 31u8, 31u8, 213u8, 23u8, 118u8, + ], + ) + } + #[doc = " Bounties that have been made."] + pub fn bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "Bounties", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, + ], + ) + } + #[doc = " Bounties that have been made."] + pub fn bounties_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_bounties::Bounty< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Bounties", + "Bounties", + Vec::new(), + [ + 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8, + 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8, + 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8, + 11u8, 99u8, 126u8, 225u8, 208u8, + ], + ) + } + #[doc = " The description of each bounty."] + pub fn bounty_descriptions( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + ::core::primitive::u8, >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Vesting", - "Vesting", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyDescriptions", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, - 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, - 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, - 168u8, 239u8, 212u8, 36u8, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - #[doc = " Information regarding the vesting of a given account."] - pub fn vesting_root( + #[doc = " The description of each bounty."] + pub fn bounty_descriptions_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, + ::core::primitive::u8, >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Vesting", - "Vesting", + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyDescriptions", Vec::new(), [ - 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8, - 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8, - 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8, - 168u8, 239u8, 212u8, 36u8, + 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8, + 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8, + 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8, + 239u8, 111u8, 22u8, 29u8, 13u8, ], ) } - #[doc = " Storage version of the pallet."] - #[doc = ""] - #[doc = " New networks start with latest version, as determined by the genesis build."] - pub fn storage_version( + #[doc = " Bounty indices that have been approved but not yet funded."] + pub fn bounty_approvals( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_vesting::Releases, + ) -> ::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::StaticStorageAddress::new( - "Vesting", - "StorageVersion", + ::subxt::storage::address::Address::new_static( + "Bounties", + "BountyApprovals", vec![], [ - 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8, - 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8, - 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8, - 94u8, 189u8, 23u8, 45u8, 191u8, + 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, ], ) } @@ -19664,14 +18333,14 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The minimum amount transferred to call `vested_transfer`."] - pub fn min_vested_transfer( + #[doc = " The amount held on deposit for placing a bounty proposal."] + pub fn bounty_deposit_base( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Vesting", - "MinVestedTransfer", + "Bounties", + "BountyDepositBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -19680,13 +18349,14 @@ pub mod api { ], ) } - pub fn max_vesting_schedules( + #[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<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Vesting", - "MaxVestingSchedules", + "Bounties", + "BountyDepositPayoutDelay", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -19695,287 +18365,137 @@ pub mod api { ], ) } - } - } - } - pub mod scheduler { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Schedule { - pub when: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - pub priority: ::core::primitive::u8, - pub call: - ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamed { - pub id: [::core::primitive::u8; 32usize], - pub when: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - pub priority: ::core::primitive::u8, - pub call: - ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelNamed { - pub id: [::core::primitive::u8; 32usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleAfter { - pub after: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - pub priority: ::core::primitive::u8, - pub call: - ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ScheduleNamedAfter { - pub id: [::core::primitive::u8; 32usize], - pub after: ::core::primitive::u32, - pub maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - pub priority: ::core::primitive::u8, - pub call: - ::std::boxed::Box, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Anonymously schedule a task."] - pub fn schedule( + #[doc = " Bounty duration in blocks."] + pub fn bounty_update_period( &self, - when: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule", - Schedule { - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "BountyUpdatePeriod", [ - 98u8, 125u8, 33u8, 230u8, 221u8, 22u8, 212u8, 99u8, 75u8, - 58u8, 1u8, 92u8, 167u8, 200u8, 124u8, 173u8, 182u8, 38u8, - 79u8, 16u8, 194u8, 99u8, 222u8, 180u8, 102u8, 74u8, 44u8, - 239u8, 80u8, 203u8, 50u8, 251u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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( + #[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, - when: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel", - Cancel { when, index }, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Permill, + > { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMultiplier", [ - 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, + 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 = "Schedule a named task."] - pub fn schedule_named( + #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_max( &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::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named", - ScheduleNamed { - id, - when, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::constants::StaticConstantAddress< + ::core::option::Option<::core::primitive::u128>, + > { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMax", [ - 232u8, 10u8, 38u8, 63u8, 203u8, 187u8, 176u8, 60u8, 49u8, - 124u8, 34u8, 1u8, 6u8, 56u8, 151u8, 12u8, 196u8, 23u8, 106u8, - 52u8, 85u8, 11u8, 60u8, 153u8, 47u8, 116u8, 126u8, 10u8, - 25u8, 43u8, 15u8, 196u8, + 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 = "Cancel a named scheduled task."] - pub fn cancel_named( + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( &self, - id: [::core::primitive::u8; 32usize], - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "cancel_named", - CancelNamed { id }, + ) -> ::subxt::constants::StaticConstantAddress< + ::core::option::Option<::core::primitive::u128>, + > { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "CuratorDepositMin", [ - 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, + 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 = "Anonymously schedule a task after a delay."] - #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule`]."] - #[doc = "# "] - pub fn schedule_after( + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( &self, - after: ::core::primitive::u32, - maybe_periodic: ::core::option::Option<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - priority: ::core::primitive::u8, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_after", - ScheduleAfter { - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } + #[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::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "DataDepositPerByte", [ - 182u8, 119u8, 100u8, 145u8, 141u8, 215u8, 50u8, 137u8, 147u8, - 154u8, 95u8, 21u8, 248u8, 202u8, 69u8, 10u8, 52u8, 203u8, - 142u8, 233u8, 24u8, 205u8, 197u8, 132u8, 253u8, 94u8, 189u8, - 139u8, 184u8, 129u8, 170u8, 244u8, + 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 = "Schedule a named task after a delay."] + #[doc = " Maximum acceptable reason length."] #[doc = ""] - #[doc = "# "] - #[doc = "Same as [`schedule_named`](Self::schedule_named)."] - #[doc = "# "] - pub fn schedule_named_after( + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( &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::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Scheduler", - "schedule_named_after", - ScheduleNamedAfter { - id, - after, - maybe_periodic, - priority, - call: ::std::boxed::Box::new(call), - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Bounties", + "MaximumReasonLength", [ - 94u8, 228u8, 144u8, 37u8, 248u8, 50u8, 217u8, 196u8, 84u8, - 132u8, 17u8, 101u8, 158u8, 11u8, 94u8, 220u8, 122u8, 42u8, - 234u8, 237u8, 33u8, 0u8, 93u8, 117u8, 135u8, 148u8, 95u8, - 229u8, 226u8, 86u8, 118u8, 11u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = "Events type."] - pub type Event = runtime_types::pallet_scheduler::pallet::Event; - pub mod events { + } + pub mod child_bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -19985,14 +18505,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Scheduled some task."] - pub struct Scheduled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Scheduled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Scheduled"; + pub struct AddChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub description: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20003,14 +18521,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Canceled some task."] - pub struct Canceled { - pub when: ::core::primitive::u32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Canceled"; + pub struct ProposeCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub fee: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20021,16 +18540,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Dispatched some task."] - pub struct Dispatched { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Dispatched { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "Dispatched"; + pub struct AcceptCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20041,14 +18555,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The call for the provided hash was not found so the task has been aborted."] - pub struct CallUnavailable { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for CallUnavailable { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "CallUnavailable"; + pub struct UnassignCurator { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20059,14 +18570,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The given task was unable to be renewed since the agenda is full at that block."] - pub struct PeriodicFailed { - pub task: (::core::primitive::u32, ::core::primitive::u32), - pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>, - } - impl ::subxt::events::StaticEvent for PeriodicFailed { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PeriodicFailed"; + pub struct AwardChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, + pub beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20077,347 +18587,329 @@ pub mod api { )] #[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]>, + pub struct ClaimChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for PermanentlyOverweight { - const PALLET: &'static str = "Scheduler"; - const EVENT: &'static str = "PermanentlyOverweight"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CloseChildBounty { + #[codec(compact)] + pub parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + pub child_bounty_id: ::core::primitive::u32, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn incomplete_since( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "IncompleteSince", - vec![], - [ - 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8, - 56u8, 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8, - 153u8, 31u8, 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8, - 73u8, 222u8, 168u8, 193u8, 227u8, - ], - ) - } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda( + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + pub fn add_child_bounty( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::kitchensink_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + parent_bounty_id: ::core::primitive::u32, + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ChildBounties", + "add_child_bounty", + AddChildBounty { + parent_bounty_id, + value, + description, + }, [ - 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8, - 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8, - 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8, - 158u8, 218u8, 90u8, 183u8, 109u8, + 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, + 45u8, 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, + 203u8, 122u8, 77u8, 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, + 176u8, 102u8, 68u8, 188u8, 8u8, ], ) } - #[doc = " Items to be executed, indexed by the block number that they should be executed on."] - pub fn agenda_root( + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + pub fn propose_curator( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u32, - runtime_types::kitchensink_runtime::OriginCaller, - ::subxt::utils::AccountId32, - >, - >, + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + curator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Agenda", - Vec::new(), + fee: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ChildBounties", + "propose_curator", + ProposeCurator { + parent_bounty_id, + child_bounty_id, + curator, + fee, + }, [ - 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8, - 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8, - 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8, - 158u8, 218u8, 90u8, 183u8, 109u8, + 37u8, 101u8, 96u8, 75u8, 254u8, 212u8, 42u8, 140u8, 72u8, + 107u8, 157u8, 110u8, 147u8, 236u8, 17u8, 138u8, 161u8, 153u8, + 119u8, 177u8, 225u8, 22u8, 83u8, 5u8, 123u8, 38u8, 30u8, + 240u8, 134u8, 208u8, 183u8, 247u8, ], ) } - #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = "Accept the curator role for the child-bounty."] #[doc = ""] - #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] - #[doc = " identities."] - pub fn lookup( + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn accept_curator( &self, - _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - (::core::primitive::u32, ::core::primitive::u32), - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ChildBounties", + "accept_curator", + AcceptCurator { + parent_bounty_id, + child_bounty_id, + }, [ - 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, + 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, + 228u8, 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, + 234u8, 142u8, 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, + 123u8, 125u8, 207u8, 10u8, 52u8, ], ) } - #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = "Unassign curator from a child-bounty."] #[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< - (::core::primitive::u32, ::core::primitive::u32), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Scheduler", - "Lookup", - Vec::new(), - [ - 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8, - 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8, - 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8, - 211u8, 158u8, 250u8, 103u8, 243u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] - pub fn maximum_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::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, - ], - ) - } - #[doc = " The maximum number of scheduled calls in the queue for a single block."] - pub fn max_scheduled_per_block( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::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, - ], - ) - } - } - } - } - pub mod preimage { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NotePreimage { - pub bytes: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnnotePreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RequestPreimage { - pub hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnrequestPreimage { - pub hash: ::subxt::utils::H256, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register a preimage on-chain."] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] #[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( + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn unassign_curator( &self, - bytes: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Preimage", - "note_preimage", - NotePreimage { bytes }, + "ChildBounties", + "unassign_curator", + UnassignCurator { + parent_bounty_id, + child_bounty_id, + }, [ - 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, + 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, + 86u8, 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, + 89u8, 72u8, 203u8, 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, + 169u8, 118u8, 128u8, 13u8, 211u8, ], ) } - #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = "Award child-bounty to a beneficiary."] #[doc = ""] - #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = "The beneficiary will be able to claim the funds after a delay."] #[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 = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + pub fn award_child_bounty( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Preimage", - "unnote_preimage", - UnnotePreimage { hash }, + "ChildBounties", + "award_child_bounty", + AwardChildBounty { + parent_bounty_id, + child_bounty_id, + beneficiary, + }, [ - 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, + 231u8, 185u8, 73u8, 232u8, 92u8, 116u8, 204u8, 165u8, 216u8, + 194u8, 151u8, 21u8, 127u8, 239u8, 78u8, 45u8, 27u8, 252u8, + 119u8, 23u8, 71u8, 140u8, 137u8, 209u8, 189u8, 128u8, 126u8, + 247u8, 13u8, 42u8, 68u8, 134u8, ], ) } - #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] #[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 = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn claim_child_bounty( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Preimage", - "request_preimage", - RequestPreimage { hash }, + "ChildBounties", + "claim_child_bounty", + ClaimChildBounty { + parent_bounty_id, + child_bounty_id, + }, [ - 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, + 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, + 124u8, 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, + 234u8, 171u8, 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, + 107u8, 65u8, 92u8, 41u8, 45u8, ], ) } - #[doc = "Clear a previously made request for a preimage."] + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] #[doc = ""] - #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] - pub fn unrequest_preimage( + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn close_child_bounty( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + parent_bounty_id: ::core::primitive::u32, + child_bounty_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Preimage", - "unrequest_preimage", - UnrequestPreimage { hash }, + "ChildBounties", + "close_child_bounty", + CloseChildBounty { + parent_bounty_id, + child_bounty_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, + 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, + 240u8, 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, + 96u8, 142u8, 68u8, 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, + 213u8, 249u8, 222u8, 22u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub type Event = runtime_types::pallet_child_bounties::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -20429,13 +18921,14 @@ pub mod api { )] #[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, + #[doc = "A child-bounty is added."] + pub struct Added { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Noted { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Noted"; + impl ::subxt::events::StaticEvent for Added { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Added"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20446,13 +18939,15 @@ pub mod api { )] #[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, + #[doc = "A child-bounty is awarded to a beneficiary."] + pub struct Awarded { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Requested { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Requested"; + impl ::subxt::events::StaticEvent for Awarded { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Awarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20463,76 +18958,178 @@ pub mod api { )] #[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, + #[doc = "A child-bounty is claimed by beneficiary."] + pub struct Claimed { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + pub payout: ::core::primitive::u128, + pub beneficiary: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Cleared { - const PALLET: &'static str = "Preimage"; - const EVENT: &'static str = "Cleared"; + impl ::subxt::events::StaticEvent for Claimed { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Claimed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A child-bounty is cancelled."] + pub struct Canceled { + pub index: ::core::primitive::u32, + pub child_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for Canceled { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Canceled"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The request status of a given hash."] - pub fn status_for( + #[doc = " Number of total child bounties."] + pub fn child_bounty_count( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_preimage::RequestStatus< + ) -> ::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( + "ChildBounties", + "ChildBountyCount", + vec![], + [ + 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, + 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, + 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, + 93u8, 89u8, 26u8, 30u8, 95u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ParentChildBounties", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ParentChildBounties", + Vec::new(), + [ + 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, + 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, + 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, + 250u8, 77u8, 49u8, 76u8, 188u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_child_bounties::ChildBounty< ::subxt::utils::AccountId32, ::core::primitive::u128, + ::core::primitive::u32, >, ::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, - )], + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildBounties", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8, - 80u8, 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8, - 37u8, 108u8, 88u8, 233u8, 18u8, 145u8, 9u8, 235u8, 5u8, - 132u8, 42u8, 17u8, 227u8, 56u8, + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, ], ) } - #[doc = " The request status of a given hash."] - pub fn status_for_root( + #[doc = " Child bounties that have been added."] + pub fn child_bounties_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_preimage::RequestStatus< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_child_bounties::ChildBounty< ::subxt::utils::AccountId32, ::core::primitive::u128, + ::core::primitive::u32, >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "StatusFor", + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildBounties", 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, + 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, + 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, + 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, + 116u8, 219u8, 186u8, 165u8, 91u8, ], ) } - pub fn preimage_for( + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + _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, >, @@ -20540,24 +19137,25 @@ pub mod api { (), ::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, + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildBountyDescriptions", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), )], [ - 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, - 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, - 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8, - 185u8, 234u8, 131u8, 124u8, + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, ], ) } - pub fn preimage_for_root( + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, runtime_types::sp_core::bounded::bounded_vec::BoundedVec< ::core::primitive::u8, >, @@ -20565,22 +19163,107 @@ pub mod api { (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Preimage", - "PreimageFor", + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildBountyDescriptions", 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, + 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, + 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, + 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, + 93u8, 207u8, 212u8, 141u8, 74u8, ], ) } - } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildrenCuratorFees", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) + } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ChildBounties", + "ChildrenCuratorFees", + Vec::new(), + [ + 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, + 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, + 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, + 211u8, 121u8, 168u8, 0u8, 216u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of child bounties that can be added to a parent bounty."] + pub fn max_active_child_bounty_count( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ChildBounties", + "MaxActiveChildBountyCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 value for a child-bounty."] + pub fn child_bounty_value_minimum( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "ChildBounties", + "ChildBountyValueMinimum", + [ + 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 proxy { + pub mod tips { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -20597,49 +19280,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proxy { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub force_proxy_type: - ::core::option::Option, - pub call: - ::std::boxed::Box, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddProxy { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub delay: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxy { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub delay: ::core::primitive::u32, + pub struct ReportAwesome { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20650,20 +19293,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveProxies; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreatePure { - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub delay: ::core::primitive::u32, - pub index: ::core::primitive::u16, + pub struct RetractTip { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20674,33 +19305,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KillPure { - pub spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub index: ::core::primitive::u16, - #[codec(compact)] - pub height: ::core::primitive::u32, + pub struct TipNew { + pub reason: ::std::vec::Vec<::core::primitive::u8>, + pub who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] - pub ext_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announce { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub call_hash: ::subxt::utils::H256, + pub tip_value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20711,12 +19320,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveAnnouncement { - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub call_hash: ::subxt::utils::H256, + pub struct Tip { + pub hash: ::subxt::utils::H256, + #[codec(compact)] + pub tip_value: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20727,12 +19334,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RejectAnnouncement { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub call_hash: ::subxt::utils::H256, + pub struct CloseTip { + pub hash: ::subxt::utils::H256, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -20743,377 +19346,231 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyAnnounced { - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub force_proxy_type: - ::core::option::Option, - pub call: - ::std::boxed::Box, + pub struct SlashTip { + pub hash: ::subxt::utils::H256, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] - #[doc = "`add_proxy`."] - #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] + #[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 = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy( - &self, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - force_proxy_type: ::core::option::Option< - runtime_types::kitchensink_runtime::ProxyType, - >, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "proxy", - Proxy { - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, - [ - 174u8, 224u8, 133u8, 111u8, 6u8, 94u8, 65u8, 3u8, 82u8, 61u8, - 181u8, 56u8, 24u8, 77u8, 159u8, 19u8, 206u8, 41u8, 143u8, - 41u8, 95u8, 42u8, 236u8, 60u8, 234u8, 176u8, 126u8, 246u8, - 61u8, 247u8, 72u8, 194u8, - ], - ) - } - #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[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 = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] - #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] - pub fn add_proxy( + #[doc = "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, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "add_proxy", - AddProxy { - delegate, - proxy_type, - delay, - }, + "Tips", + "report_awesome", + ReportAwesome { reason, who }, [ - 179u8, 225u8, 244u8, 52u8, 43u8, 253u8, 204u8, 37u8, 236u8, - 61u8, 140u8, 160u8, 140u8, 4u8, 198u8, 186u8, 91u8, 113u8, - 204u8, 15u8, 167u8, 9u8, 232u8, 208u8, 130u8, 202u8, 67u8, - 44u8, 30u8, 35u8, 113u8, 152u8, + 126u8, 68u8, 2u8, 54u8, 195u8, 15u8, 43u8, 27u8, 183u8, + 254u8, 157u8, 163u8, 252u8, 14u8, 207u8, 251u8, 215u8, 111u8, + 98u8, 209u8, 150u8, 11u8, 240u8, 177u8, 106u8, 93u8, 191u8, + 31u8, 62u8, 11u8, 223u8, 79u8, ], ) } - #[doc = "Unregister a proxy account for the sender."] + #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "If successful, the original deposit will be unreserved."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] - #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] - pub fn remove_proxy( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - delay: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxy", - RemoveProxy { - delegate, - proxy_type, - delay, - }, - [ - 207u8, 163u8, 188u8, 238u8, 61u8, 133u8, 145u8, 118u8, 223u8, - 169u8, 11u8, 101u8, 38u8, 135u8, 194u8, 141u8, 84u8, 194u8, - 65u8, 159u8, 215u8, 210u8, 109u8, 7u8, 46u8, 31u8, 92u8, - 233u8, 50u8, 224u8, 57u8, 8u8, - ], - ) - } - #[doc = "Unregister all proxy accounts for the sender."] + #[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 = "The dispatch origin for this call must be _Signed_."] + #[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 = "WARNING: This may be called on accounts created by `pure`, however if done, then"] - #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] - pub fn remove_proxies( + #[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, - ) -> ::subxt::tx::Payload { + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "remove_proxies", - RemoveProxies {}, + "Tips", + "retract_tip", + RetractTip { hash }, [ - 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8, - 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8, - 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8, - 19u8, 23u8, 121u8, 129u8, + 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8, + 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8, + 137u8, 227u8, 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8, + 184u8, 187u8, 65u8, 129u8, 131u8, ], ) } - #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] - #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = "Give a tip for something new; no finder's fee will be taken."] #[doc = ""] - #[doc = "Requires a `Signed` origin."] + #[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 = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] - #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] - #[doc = "allow for maximum flexibility."] - #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] - #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] - #[doc = "want to use `0`."] - #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] - #[doc = "zero."] + #[doc = "- `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 = "Fails with `Duplicate` if this has already been called in this transaction, from the"] - #[doc = "same sender, with the same parameters."] + #[doc = "Emits `NewTip` if successful."] #[doc = ""] - #[doc = "Fails if there are insufficient funds to pay for deposit."] - pub fn create_pure( + #[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, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - delay: ::core::primitive::u32, - index: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { + reason: ::std::vec::Vec<::core::primitive::u8>, + who: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "create_pure", - CreatePure { - proxy_type, - delay, - index, + "Tips", + "tip_new", + TipNew { + reason, + who, + tip_value, }, [ - 46u8, 194u8, 136u8, 133u8, 111u8, 12u8, 51u8, 219u8, 148u8, - 227u8, 22u8, 236u8, 91u8, 15u8, 73u8, 48u8, 222u8, 219u8, - 133u8, 157u8, 65u8, 136u8, 119u8, 76u8, 116u8, 13u8, 33u8, - 215u8, 138u8, 211u8, 195u8, 157u8, + 217u8, 15u8, 70u8, 80u8, 193u8, 110u8, 212u8, 110u8, 212u8, + 45u8, 197u8, 150u8, 43u8, 116u8, 115u8, 231u8, 148u8, 102u8, + 202u8, 28u8, 55u8, 88u8, 166u8, 238u8, 11u8, 238u8, 229u8, + 189u8, 89u8, 115u8, 196u8, 95u8, ], ) } - #[doc = "Removes a previously spawned pure proxy."] + #[doc = "Declare a tip value for an already-open tip."] #[doc = ""] - #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] - #[doc = "inaccessible."] + #[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 = "Requires a `Signed` origin, and the sender account must have been created by a call to"] - #[doc = "`pure` with corresponding parameters."] + #[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 = "- `spawner`: The account that originally called `pure` to create this account."] - #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] - #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] - #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] - #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"] + #[doc = "has started."] #[doc = ""] - #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] - #[doc = "account whose `pure` call has corresponding parameters."] - pub fn kill_pure( + #[doc = "# "] + #[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, - spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - index: ::core::primitive::u16, - height: ::core::primitive::u32, - ext_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + hash: ::subxt::utils::H256, + tip_value: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "kill_pure", - KillPure { - spawner, - proxy_type, - index, - height, - ext_index, - }, + "Tips", + "tip", + Tip { hash, tip_value }, [ - 76u8, 246u8, 203u8, 222u8, 54u8, 155u8, 53u8, 188u8, 243u8, - 178u8, 173u8, 59u8, 31u8, 188u8, 152u8, 209u8, 211u8, 139u8, - 65u8, 150u8, 18u8, 5u8, 75u8, 223u8, 112u8, 196u8, 45u8, - 157u8, 111u8, 92u8, 106u8, 255u8, + 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 = "Publish the hash of a proxy-call that will be made in the future."] - #[doc = ""] - #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] - #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = "Close and payout a tip."] #[doc = ""] - #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] - #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = "The tip identified by `hash` must have finished its countdown period."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[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 = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn announce( + #[doc = "# "] + #[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, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "announce", - Announce { real, call_hash }, + "Tips", + "close_tip", + CloseTip { hash }, [ - 226u8, 252u8, 69u8, 50u8, 248u8, 212u8, 209u8, 225u8, 201u8, - 236u8, 51u8, 136u8, 56u8, 85u8, 36u8, 130u8, 233u8, 84u8, - 44u8, 192u8, 174u8, 119u8, 245u8, 62u8, 150u8, 78u8, 217u8, - 90u8, 167u8, 154u8, 228u8, 141u8, + 32u8, 53u8, 0u8, 222u8, 45u8, 157u8, 107u8, 174u8, 203u8, + 50u8, 81u8, 230u8, 6u8, 111u8, 79u8, 55u8, 49u8, 151u8, + 107u8, 114u8, 81u8, 200u8, 144u8, 175u8, 29u8, 142u8, 115u8, + 184u8, 102u8, 116u8, 156u8, 173u8, ], ) } - #[doc = "Remove a given announcement."] + #[doc = "Remove and slash an already-open tip."] #[doc = ""] - #[doc = "May be called by a proxy account to remove a call they previously announced and return"] - #[doc = "the deposit."] + #[doc = "May only be called from `T::RejectOrigin`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "As a result, the finder is slashed and the deposits are lost."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] - pub fn remove_announcement( + #[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, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { + hash: ::subxt::utils::H256, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Proxy", - "remove_announcement", - RemoveAnnouncement { real, call_hash }, + "Tips", + "slash_tip", + SlashTip { hash }, [ - 251u8, 236u8, 113u8, 182u8, 125u8, 244u8, 31u8, 144u8, 66u8, - 28u8, 65u8, 97u8, 67u8, 94u8, 225u8, 210u8, 46u8, 143u8, - 242u8, 124u8, 120u8, 93u8, 23u8, 165u8, 83u8, 177u8, 250u8, - 171u8, 58u8, 66u8, 70u8, 64u8, - ], - ) - } - #[doc = "Remove the given announcement of a delegate."] - #[doc = ""] - #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] - #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `delegate`: The account that previously announced the call."] - #[doc = "- `call_hash`: The hash of the call to be made."] - pub fn reject_announcement( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "reject_announcement", - RejectAnnouncement { - delegate, - call_hash, - }, - [ - 122u8, 165u8, 114u8, 85u8, 209u8, 197u8, 11u8, 96u8, 211u8, - 93u8, 201u8, 42u8, 1u8, 131u8, 254u8, 177u8, 191u8, 212u8, - 229u8, 13u8, 28u8, 163u8, 133u8, 200u8, 113u8, 28u8, 132u8, - 45u8, 105u8, 177u8, 82u8, 206u8, - ], - ) - } - #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] - #[doc = "`add_proxy`."] - #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - pub fn proxy_announced( - &self, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - force_proxy_type: ::core::option::Option< - runtime_types::kitchensink_runtime::ProxyType, - >, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Proxy", - "proxy_announced", - ProxyAnnounced { - delegate, - real, - force_proxy_type, - call: ::std::boxed::Box::new(call), - }, - [ - 184u8, 169u8, 61u8, 234u8, 13u8, 72u8, 155u8, 252u8, 196u8, - 100u8, 250u8, 86u8, 49u8, 152u8, 151u8, 233u8, 58u8, 192u8, - 216u8, 178u8, 238u8, 92u8, 240u8, 142u8, 252u8, 32u8, 81u8, - 229u8, 116u8, 135u8, 131u8, 133u8, + 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, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_proxy::pallet::Event; + pub type Event = runtime_types::pallet_tips::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -21125,14 +19582,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was executed correctly, with the given."] - pub struct ProxyExecuted { - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + #[doc = "A new tip suggestion has been opened."] + pub struct NewTip { + pub tip_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for ProxyExecuted { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyExecuted"; + impl ::subxt::events::StaticEvent for NewTip { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "NewTip"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21143,17 +19599,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - pub struct PureCreated { - pub pure: ::subxt::utils::AccountId32, - pub who: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub disambiguation_index: ::core::primitive::u16, + #[doc = "A tip suggestion has reached threshold and is closing."] + pub struct TipClosing { + pub tip_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for PureCreated { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "PureCreated"; + impl ::subxt::events::StaticEvent for TipClosing { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosing"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21164,15 +19616,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An announcement was placed to make a call in the future."] - pub struct Announced { - pub real: ::subxt::utils::AccountId32, - pub proxy: ::subxt::utils::AccountId32, - pub call_hash: ::subxt::utils::H256, + #[doc = "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 Announced { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "Announced"; + impl ::subxt::events::StaticEvent for TipClosed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipClosed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21183,16 +19635,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was added."] - pub struct ProxyAdded { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub delay: ::core::primitive::u32, + #[doc = "A tip suggestion has been retracted."] + pub struct TipRetracted { + pub tip_hash: ::subxt::utils::H256, } - impl ::subxt::events::StaticEvent for ProxyAdded { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyAdded"; + impl ::subxt::events::StaticEvent for TipRetracted { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipRetracted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21203,149 +19652,128 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proxy was removed."] - pub struct ProxyRemoved { - pub delegator: ::subxt::utils::AccountId32, - pub delegatee: ::subxt::utils::AccountId32, - pub proxy_type: runtime_types::kitchensink_runtime::ProxyType, - pub delay: ::core::primitive::u32, + #[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 ProxyRemoved { - const PALLET: &'static str = "Proxy"; - const EVENT: &'static str = "ProxyRemoved"; + impl ::subxt::events::StaticEvent for TipSlashed { + const PALLET: &'static str = "Tips"; + const EVENT: &'static str = "TipSlashed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies( + #[doc = " 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::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::kitchensink_runtime::ProxyType, - ::core::primitive::u32, - >, - >, + _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, - ), - ::subxt::storage::address::Yes, + ::core::primitive::u32, + ::subxt::utils::H256, + >, ::subxt::storage::address::Yes, + (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Proxies", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Tips", + "Tips", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 35u8, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8, - 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8, - 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8, - 18u8, 89u8, 96u8, 108u8, 55u8, 47u8, + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, ], ) } - #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] - #[doc = " which are being delegated to, together with the amount held on deposit."] - pub fn proxies_root( + #[doc = " 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::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::ProxyDefinition< - ::subxt::utils::AccountId32, - runtime_types::kitchensink_runtime::ProxyType, - ::core::primitive::u32, - >, - >, + ) -> ::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::StaticStorageAddress::new( - "Proxy", - "Proxies", + ::subxt::storage::address::Address::new_static( + "Tips", + "Tips", Vec::new(), [ - 35u8, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8, - 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8, - 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8, - 18u8, 89u8, 96u8, 108u8, 55u8, 47u8, + 241u8, 196u8, 105u8, 248u8, 29u8, 66u8, 86u8, 98u8, 6u8, + 159u8, 191u8, 0u8, 227u8, 232u8, 147u8, 248u8, 173u8, 20u8, + 225u8, 12u8, 232u8, 5u8, 93u8, 78u8, 18u8, 154u8, 130u8, + 38u8, 142u8, 36u8, 66u8, 0u8, ], ) } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements( + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), - ::subxt::storage::address::Yes, + _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::StaticStorageAddress::new( - "Proxy", - "Announcements", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Tips", + "Reasons", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, )], [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, - 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, - 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, - 237u8, 103u8, 217u8, 53u8, + 202u8, 191u8, 36u8, 162u8, 156u8, 102u8, 115u8, 10u8, 203u8, + 35u8, 201u8, 70u8, 195u8, 151u8, 89u8, 82u8, 202u8, 35u8, + 210u8, 176u8, 82u8, 1u8, 77u8, 94u8, 31u8, 70u8, 252u8, + 194u8, 166u8, 91u8, 189u8, 134u8, ], ) } - #[doc = " The announcements made by the proxy (key)."] - pub fn announcements_root( + #[doc = " Simple preimage lookup from the reason's hash to the original data. Again, has an"] + #[doc = " insecure enumerable hash since the key is guaranteed to be the result of a secure hash."] + pub fn reasons_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_proxy::Announcement< - ::subxt::utils::AccountId32, - ::subxt::utils::H256, - ::core::primitive::u32, - >, - >, - ::core::primitive::u128, - ), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u8>, + (), (), - ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Proxy", - "Announcements", + ::subxt::storage::address::Address::new_static( + "Tips", + "Reasons", Vec::new(), [ - 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8, - 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8, - 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8, - 237u8, 103u8, 217u8, 53u8, + 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, ], ) } @@ -21355,37 +19783,32 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a proxy."] + #[doc = " Maximum acceptable reason length."] #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] - pub fn proxy_deposit_base( + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "ProxyDepositBase", + "Tips", + "MaximumReasonLength", [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, ], ) } - #[doc = " The amount of currency needed per proxy added."] - #[doc = ""] - #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] - #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] - #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] - pub fn proxy_deposit_factor( + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "ProxyDepositFactor", + "Tips", + "DataDepositPerByte", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -21394,30 +19817,14 @@ pub mod api { ], ) } - #[doc = " The maximum amount of proxies allowed for a single account."] - pub fn max_proxies( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "MaxProxies", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] - pub fn max_pending( + #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] + pub fn tip_countdown( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "MaxPending", + "Tips", + "TipCountdown", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -21426,36 +19833,31 @@ pub mod api { ], ) } - #[doc = " The base amount of currency needed to reserve for creating an announcement."] - #[doc = ""] - #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] - #[doc = " bytes)."] - pub fn announcement_deposit_base( + #[doc = " The percent of the final tip which goes to the original reporter of the tip."] + pub fn tip_finders_fee( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Percent, + > { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "AnnouncementDepositBase", + "Tips", + "TipFindersFee", [ - 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, + 99u8, 121u8, 176u8, 172u8, 235u8, 159u8, 116u8, 114u8, 179u8, + 91u8, 129u8, 117u8, 204u8, 135u8, 53u8, 7u8, 151u8, 26u8, + 124u8, 151u8, 202u8, 171u8, 171u8, 207u8, 183u8, 177u8, 24u8, + 53u8, 109u8, 185u8, 71u8, 183u8, ], ) } - #[doc = " The amount of currency needed per announcement made."] - #[doc = ""] - #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] - #[doc = " into a pre-existing storage value."] - pub fn announcement_deposit_factor( + #[doc = " The amount held on deposit for placing a tip report."] + pub fn tip_report_deposit_base( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Proxy", - "AnnouncementDepositFactor", + "Tips", + "TipReportDepositBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -21467,7 +19869,7 @@ pub mod api { } } } - pub mod multisig { + pub mod election_provider_multi_phase { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -21484,11 +19886,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMultiThreshold1 { - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub call: - ::std::boxed::Box, - } + pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -21498,15 +19896,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub struct SetMinimumUntrustedScore { + pub maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, >, - pub call: - ::std::boxed::Box, - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21517,14 +19910,29 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub maybe_timepoint: ::core::option::Option< - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + pub struct SetEmergencyElectionResult { + pub supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support< + ::subxt::utils::AccountId32, + >, + )>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Submit { + pub raw_solution: ::std::boxed::Box< + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::polkadot_runtime::NposCompactSolution16, + >, >, - pub call_hash: [::core::primitive::u8; 32usize], - pub max_weight: runtime_types::sp_weights::weight_v2::Weight, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21535,243 +19943,154 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAsMulti { - pub threshold: ::core::primitive::u16, - pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub call_hash: [::core::primitive::u8; 32usize], + pub struct GovernanceFallback { + pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>, + pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = "Submit a solution for the unsigned phase."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin fo this call must be __none__."] #[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 = "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 = "Result is equivalent to the dispatched result."] + #[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 = "# "] - #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] - #[doc = "-------------------------------"] - #[doc = "- DB Weight: None"] - #[doc = "- Plus Call Weight"] - #[doc = "# "] - pub fn as_multi_threshold_1( + #[doc = "No deposit or reward is associated with this submission."] + pub fn submit_unsigned( &self, - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { + raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, + witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi_threshold_1", - AsMultiThreshold1 { - other_signatories, - call: ::std::boxed::Box::new(call), + "ElectionProviderMultiPhase", + "submit_unsigned", + SubmitUnsigned { + raw_solution: ::std::boxed::Box::new(raw_solution), + witness, }, [ - 192u8, 229u8, 190u8, 143u8, 151u8, 56u8, 139u8, 214u8, 206u8, - 1u8, 35u8, 185u8, 226u8, 105u8, 103u8, 12u8, 86u8, 2u8, 84u8, - 220u8, 192u8, 3u8, 171u8, 237u8, 167u8, 49u8, 158u8, 95u8, - 244u8, 208u8, 99u8, 147u8, + 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8, + 197u8, 97u8, 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8, + 21u8, 8u8, 202u8, 61u8, 36u8, 25u8, 4u8, 148u8, 82u8, 56u8, + 242u8, 18u8, 27u8, 219u8, ], ) } - #[doc = "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 = "Set a new value for `MinimumUntrustedScore`."] #[doc = ""] - #[doc = "If there are enough, then dispatch the call."] + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] #[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 = "This check can be turned off by setting the value to `None`."] + pub fn set_minimum_untrusted_score( + &self, + maybe_next_score: ::core::option::Option< + runtime_types::sp_npos_elections::ElectionScore, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + SetMinimumUntrustedScore { maybe_next_score }, + [ + 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8, + 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8, + 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8, + 76u8, 4u8, 67u8, 81u8, + ], + ) + } + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] #[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 = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub fn set_emergency_election_result( + &self, + supports: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::sp_npos_elections::Support< + ::subxt::utils::AccountId32, + >, + )>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + SetEmergencyElectionResult { supports }, + [ + 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8, + 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8, + 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8, + 250u8, 151u8, 5u8, 44u8, 133u8, + ], + ) + } + #[doc = "Submit a solution for the signed phase."] #[doc = ""] - #[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 = "The dispatch origin fo this call must be __signed__."] #[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 = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] #[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::kitchensink_runtime::RuntimeCall, - max_weight: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Multisig", - "as_multi", - AsMulti { - threshold, - other_signatories, - maybe_timepoint, - call: ::std::boxed::Box::new(call), - max_weight, - }, - [ - 182u8, 136u8, 199u8, 91u8, 225u8, 217u8, 87u8, 151u8, 32u8, - 214u8, 96u8, 223u8, 109u8, 203u8, 57u8, 206u8, 196u8, 156u8, - 228u8, 22u8, 114u8, 166u8, 37u8, 129u8, 154u8, 241u8, 51u8, - 253u8, 172u8, 181u8, 179u8, 186u8, - ], - ) - } - #[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( + #[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, - 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 { + raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 >, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Multisig", - "approve_as_multi", - ApproveAsMulti { - threshold, - other_signatories, - maybe_timepoint, - call_hash, - max_weight, + "ElectionProviderMultiPhase", + "submit", + Submit { + raw_solution: ::std::boxed::Box::new(raw_solution), }, [ - 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, + 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8, + 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8, + 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8, + 225u8, 241u8, 58u8, 193u8, 134u8, ], ) } - #[doc = "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 = "Trigger the governance fallback."] #[doc = ""] - #[doc = "# "] - #[doc = "- `O(S)`."] - #[doc = "- Up to one balance-reserve or unreserve operation."] - #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] - #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] - #[doc = "- One encode & hash, both of complexity `O(S)`."] - #[doc = "- One event."] - #[doc = "- I/O: 1 read `O(S)`, one remove."] - #[doc = "- Storage: removes one item."] - #[doc = "----------------------------------"] - #[doc = "- DB Weight:"] - #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"] - #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"] - #[doc = "# "] - pub fn cancel_as_multi( + #[doc = "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, - 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 { + 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( - "Multisig", - "cancel_as_multi", - CancelAsMulti { - threshold, - other_signatories, - timepoint, - call_hash, + "ElectionProviderMultiPhase", + "governance_fallback", + GovernanceFallback { + maybe_max_voters, + maybe_max_targets, }, [ - 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, + 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8, + 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8, + 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8, + 190u8, 53u8, 226u8, 142u8, 182u8, ], ) } } } #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_multisig::pallet::Event; + pub type Event = + runtime_types::pallet_election_provider_multi_phase::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -21783,36 +20102,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new multisig operation has begun."] - pub struct NewMultisig { - pub approving: ::subxt::utils::AccountId32, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for NewMultisig { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "NewMultisig"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been approved by someone."] - pub struct MultisigApproval { - pub approving: ::subxt::utils::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "If the solution is signed, this means that it hasn't yet been processed. If the"] + #[doc = "solution is unsigned, this means that it has also been processed."] + #[doc = ""] + #[doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] + pub struct SolutionStored { + pub compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + pub prev_ejected: ::core::primitive::bool, } - impl ::subxt::events::StaticEvent for MultisigApproval { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigApproval"; + impl ::subxt::events::StaticEvent for SolutionStored { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "SolutionStored"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21823,19 +20126,15 @@ pub mod api { )] #[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>, + #[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 MultisigExecuted { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigExecuted"; + impl ::subxt::events::StaticEvent for ElectionFinalized { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFinalized"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -21846,137 +20145,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A multisig operation has been cancelled."] - pub struct MultisigCancelled { - pub cancelling: ::subxt::utils::AccountId32, - pub timepoint: - runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, - pub multisig: ::subxt::utils::AccountId32, - pub call_hash: [::core::primitive::u8; 32usize], - } - impl ::subxt::events::StaticEvent for MultisigCancelled { - const PALLET: &'static str = "Multisig"; - const EVENT: &'static str = "MultisigCancelled"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The set of open multisig operations."] - pub fn multisigs( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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 :: 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)] , [69u8 , 153u8 , 186u8 , 204u8 , 117u8 , 95u8 , 119u8 , 182u8 , 220u8 , 87u8 , 8u8 , 15u8 , 123u8 , 83u8 , 5u8 , 188u8 , 115u8 , 121u8 , 163u8 , 96u8 , 218u8 , 3u8 , 106u8 , 44u8 , 44u8 , 187u8 , 46u8 , 238u8 , 80u8 , 203u8 , 175u8 , 155u8 ,]) - } - #[doc = " The set of open multisig operations."] - pub fn multisigs_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_multisig::Multisig< - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Multisig", - "Multisigs", - Vec::new(), - [ - 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8, - 87u8, 8u8, 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8, - 163u8, 96u8, 218u8, 3u8, 106u8, 44u8, 44u8, 187u8, 46u8, - 238u8, 80u8, 203u8, 175u8, 155u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] - #[doc = " store a dispatch call for later."] - #[doc = ""] - #[doc = " This is held for an additional storage item whose value size is"] - #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] - #[doc = " `32 + sizeof(AccountId)` bytes."] - pub fn deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::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, - ], - ) - } - #[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::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "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::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "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, - ], - ) - } + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + pub struct ElectionFailed; + impl ::subxt::events::StaticEvent for ElectionFailed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFailed"; } - } - } - pub mod bounties { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -21986,42 +20162,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeBounty { - #[codec(compact)] + #[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, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub fee: ::core::primitive::u128, + impl ::subxt::events::StaticEvent for Rewarded { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Rewarded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22032,24 +20180,17 @@ pub mod api { )] #[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, + #[doc = "An account has been slashed for submitting an invalid signed submission."] + pub struct Slashed { + pub account: ::subxt::utils::AccountId32, + pub value: ::core::primitive::u128, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for Slashed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Slashed"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -22058,28 +20199,16 @@ pub mod api { )] #[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, - >, + #[doc = "The signed phase of the given round has started."] + pub struct SignedPhaseStarted { + pub round: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimBounty { - #[codec(compact)] - pub bounty_id: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for SignedPhaseStarted { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "SignedPhaseStarted"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -22088,597 +20217,366 @@ pub mod api { )] #[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, + #[doc = "The unsigned phase of the given round has started."] + pub struct UnsignedPhaseStarted { + pub round: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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::events::StaticEvent for UnsignedPhaseStarted { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "UnsignedPhaseStarted"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a new bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Internal counter for the number of rounds."] #[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 = " This is useful for de-duplication of transactions submitted to the pool, and general"] + #[doc = " diagnostics of the pallet."] #[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 = " This is merely incremented once per every time that an upstream `elect` is called."] + pub fn round( &self, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_bounty", - ProposeBounty { value, description }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Round", + vec![], [ - 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, + 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8, + 96u8, 35u8, 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8, + 166u8, 188u8, 199u8, 210u8, 21u8, 19u8, 70u8, 96u8, 139u8, + 8u8, 53u8, 82u8, 165u8, 239u8, ], ) } - #[doc = "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", - ApproveBounty { bounty_id }, - [ - 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8, - 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8, - 68u8, 48u8, 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8, - 198u8, 183u8, 173u8, - ], - ) - } - #[doc = "Assign a curator to a funded bounty."] - #[doc = ""] - #[doc = "May only be called from `T::SpendOrigin`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn propose_curator( + #[doc = " Current phase."] + pub fn current_phase( &self, - bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::Phase< ::core::primitive::u32, >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "propose_curator", - ProposeCurator { - bounty_id, - curator, - fee, - }, - [ - 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, - ], - ) - } - #[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", - UnassignCurator { bounty_id }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "CurrentPhase", + vec![], [ - 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, + 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8, + 53u8, 153u8, 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8, + 35u8, 28u8, 121u8, 44u8, 229u8, 45u8, 196u8, 87u8, 73u8, + 125u8, 216u8, 245u8, 255u8, 15u8, ], ) } - #[doc = "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( + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + pub fn queued_solution( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "accept_curator", - AcceptCurator { bounty_id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::ReadySolution, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "QueuedSolution", + vec![], [ - 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, + 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8, + 250u8, 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8, + 159u8, 251u8, 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8, + 71u8, 136u8, 173u8, 145u8, 236u8, ], ) } - #[doc = "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 = " Snapshot data of the round."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn award_bounty( + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + pub fn snapshot( &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", - AwardBounty { - bounty_id, - beneficiary, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "Snapshot", + vec![], [ - 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, + 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8, + 224u8, 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8, + 36u8, 206u8, 72u8, 27u8, 226u8, 87u8, 146u8, 220u8, 93u8, + 178u8, 26u8, 115u8, 232u8, 71u8, ], ) } - #[doc = "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 = " Desired number of targets to elect for this round."] #[doc = ""] - #[doc = "# "] - #[doc = "- O(1)."] - #[doc = "# "] - pub fn claim_bounty( + #[doc = " Only exists when [`Snapshot`] is present."] + pub fn desired_targets( &self, - bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Bounties", - "claim_bounty", - ClaimBounty { bounty_id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "DesiredTargets", + vec![], [ - 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, + 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8, + 167u8, 80u8, 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8, + 31u8, 210u8, 2u8, 116u8, 220u8, 231u8, 115u8, 112u8, 118u8, + 118u8, 68u8, 34u8, 151u8, 165u8, ], ) } - #[doc = "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 = " The metadata of the [`RoundSnapshot`]"] #[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", - CloseBounty { bounty_id }, + #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , :: subxt :: storage :: address :: Yes , () , () >{ + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + vec![], [ - 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, + 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8, + 203u8, 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8, + 94u8, 22u8, 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8, + 251u8, 117u8, 220u8, 205u8, 78u8, ], ) } - #[doc = "Extend the expiry time of an active bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = " The next index to be assigned to an incoming signed submission."] #[doc = ""] - #[doc = "- `bounty_id`: Bounty ID to extend."] - #[doc = "- `remark`: additional information."] + #[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 = "# "] - #[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", - ExtendBountyExpiry { bounty_id, remark }, - [ - 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8, - 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8, - 63u8, 138u8, 100u8, 112u8, 185u8, 81u8, 159u8, 247u8, 221u8, - 60u8, 87u8, 40u8, 80u8, 202u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New bounty proposal."] - pub struct BountyProposed { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyProposed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyProposed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal was rejected; funds were slashed."] - pub struct BountyRejected { - pub index: ::core::primitive::u32, - pub bond: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for BountyRejected { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyRejected"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty proposal is funded and became active."] - pub struct BountyBecameActive { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyBecameActive { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyBecameActive"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is awarded to a beneficiary."] - pub struct BountyAwarded { - pub index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyAwarded { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyAwarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is claimed by beneficiary."] - pub struct BountyClaimed { - pub index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for BountyClaimed { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyClaimed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty is cancelled."] - pub struct BountyCanceled { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyCanceled { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyCanceled"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bounty expiry is extended."] - pub struct BountyExtended { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BountyExtended { - const PALLET: &'static str = "Bounties"; - const EVENT: &'static str = "BountyExtended"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Number of bounty proposals that have been made."] - pub fn bounty_count( + #[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::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyCount", + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", 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, + 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8, + 141u8, 182u8, 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8, + 115u8, 8u8, 6u8, 137u8, 45u8, 2u8, 123u8, 187u8, 53u8, 215u8, + 19u8, 129u8, 54u8, 22u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties( + #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] + #[doc = " value in `SignedSubmissions`."] + #[doc = ""] + #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] + #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] + #[doc = " them one at a time instead of reading and decoding all of them at once."] + pub fn signed_submission_indices( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::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( - "Bounties", - "Bounties", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + 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, + ], + ) + } + #[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 :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + vec![::subxt::storage::address::StaticStorageMapKey::new( _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, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, ], ) } - #[doc = " Bounties that have been made."] - pub fn bounties_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_bounties::Bounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "Bounties", + #[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 :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: polkadot_runtime :: NposCompactSolution16 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", Vec::new(), [ - 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, + 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8, + 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8, + 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8, + 132u8, 118u8, 53u8, 2u8, 135u8, ], ) } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions( + #[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< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_npos_elections::ElectionScore, ::subxt::storage::address::Yes, (), - ::subxt::storage::address::Yes, + (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyDescriptions", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + ::subxt::storage::address::Address::new_static( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + vec![], [ - 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, + 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8, + 38u8, 74u8, 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8, + 217u8, 125u8, 17u8, 194u8, 95u8, 157u8, 73u8, 245u8, 75u8, + 130u8, 248u8, 7u8, 53u8, 226u8, ], ) } - #[doc = " The description of each bounty."] - pub fn bounty_descriptions_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< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyDescriptions", - Vec::new(), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "UnsignedPhase", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 indices that have been approved but not yet funded."] - pub fn bounty_approvals( + #[doc = " Duration of the signed phase."] + pub fn signed_phase( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::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, + ], + ) + } + #[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::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Perbill, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Bounties", - "BountyApprovals", - vec![], + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "BetterSignedThreshold", [ - 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, + 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8, + 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8, + 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8, + 104u8, 222u8, 75u8, 86u8, 227u8, ], ) } - } - } - pub 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( + #[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::constants::StaticConstantAddress<::core::primitive::u128> - { + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_arithmetic::per_things::Perbill, + > { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyDepositBase", + "ElectionProviderMultiPhase", + "BetterUnsignedThreshold", [ - 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, + 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 = " The delay period for which a bounty beneficiary need to wait before claim the payout."] - pub fn bounty_deposit_payout_delay( + #[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, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyDepositPayoutDelay", + "ElectionProviderMultiPhase", + "OffchainRepeat", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -22687,14 +20585,36 @@ pub mod api { ], ) } - #[doc = " Bounty duration in blocks."] - pub fn bounty_update_period( + #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] + pub fn miner_tx_priority( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } + #[doc = " Maximum number of signed submissions that can be queued."] + #[doc = ""] + #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] + #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] + #[doc = " update this value during an election, you _must_ ensure that"] + #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] + #[doc = " attempts to submit new solutions may cause a runtime panic."] + pub fn signed_max_submissions( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyUpdatePeriod", + "ElectionProviderMultiPhase", + "SignedMaxSubmissions", [ 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, @@ -22703,68 +20623,67 @@ pub mod api { ], ) } - #[doc = " The curator deposit is calculated as a percentage of the curator fee."] + #[doc = " Maximum weight of a signed solution."] #[doc = ""] - #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] - #[doc = " `CuratorDepositMin`."] - pub fn curator_deposit_multiplier( + #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] + #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] + #[doc = " this value."] + pub fn signed_max_weight( &self, ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_arithmetic::per_things::Permill, + runtime_types::sp_weights::weight_v2::Weight, > { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMultiplier", + "ElectionProviderMultiPhase", + "SignedMaxWeight", [ - 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, + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, ], ) } - #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_max( + #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] + pub fn signed_max_refunds( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::core::option::Option<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMax", + "ElectionProviderMultiPhase", + "SignedMaxRefunds", [ - 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, + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 amount of funds that should be placed in a deposit for making a proposal."] - pub fn curator_deposit_min( + #[doc = " Base reward for a signed solution"] + pub fn signed_reward_base( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::core::option::Option<::core::primitive::u128>, - > { + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "CuratorDepositMin", + "ElectionProviderMultiPhase", + "SignedRewardBase", [ - 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, + 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 = " Minimum value for a bounty."] - pub fn bounty_value_minimum( + #[doc = " Base deposit for a signed solution."] + pub fn signed_deposit_base( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "BountyValueMinimum", + "ElectionProviderMultiPhase", + "SignedDepositBase", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -22773,14 +20692,14 @@ pub mod api { ], ) } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[doc = " Per-byte deposit for a signed solution."] + pub fn signed_deposit_byte( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "DataDepositPerByte", + "ElectionProviderMultiPhase", + "SignedDepositByte", [ 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, @@ -22789,16 +20708,113 @@ pub mod api { ], ) } - #[doc = " Maximum acceptable reason length."] + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, + ], + ) + } + #[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<::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, + ], + ) + } + #[doc = " The maximum number of electable targets to put in the snapshot."] + pub fn max_electable_targets( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u16> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MaxElectableTargets", + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, + 227u8, 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, + 184u8, 72u8, 169u8, 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, + 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) + } + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] + pub fn max_winners( &self, ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> { ::subxt::constants::StaticConstantAddress::new( - "Bounties", - "MaximumReasonLength", + "ElectionProviderMultiPhase", + "MaxWinners", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + pub fn miner_max_length( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MinerMaxLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + pub fn miner_max_weight( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt::constants::StaticConstantAddress::new( + "ElectionProviderMultiPhase", + "MinerMaxWeight", + [ + 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8, + 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8, + 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8, + 165u8, 147u8, 134u8, 106u8, 76u8, + ], + ) + } + pub fn miner_max_votes_per_voter( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::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, @@ -22810,7 +20826,7 @@ pub mod api { } } } - pub mod tips { + pub mod voter_list { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -22827,12 +20843,9 @@ pub mod api { )] #[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 struct Rebag { + pub dislocated: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22843,27 +20856,74 @@ pub mod api { )] #[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, + pub struct PutInFrontOf { + pub lighter: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + pub fn rebag( + &self, + dislocated: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "VoterList", + "rebag", + Rebag { dislocated }, + [ + 35u8, 182u8, 31u8, 22u8, 190u8, 187u8, 31u8, 138u8, 60u8, + 48u8, 236u8, 16u8, 191u8, 143u8, 52u8, 110u8, 228u8, 43u8, + 116u8, 13u8, 171u8, 108u8, 112u8, 123u8, 252u8, 231u8, 132u8, + 97u8, 195u8, 148u8, 252u8, 241u8, + ], + ) + } + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`."] + #[doc = ""] + #[doc = "Only works if"] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + pub fn put_in_front_of( + &self, + lighter: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "VoterList", + "put_in_front_of", + PutInFrontOf { lighter }, + [ + 184u8, 194u8, 39u8, 91u8, 28u8, 220u8, 76u8, 199u8, 64u8, + 252u8, 233u8, 241u8, 74u8, 19u8, 246u8, 190u8, 108u8, 227u8, + 77u8, 162u8, 225u8, 230u8, 101u8, 72u8, 159u8, 217u8, 133u8, + 107u8, 84u8, 83u8, 81u8, 227u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::pallet_bags_list::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -22873,22 +20933,15 @@ pub mod api { )] #[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, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseTip { - pub hash: ::subxt::utils::H256, + impl ::subxt::events::StaticEvent for Rebagged { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "Rebagged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -22899,239 +20952,220 @@ pub mod api { )] #[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, + #[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, } - 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."] + impl ::subxt::events::StaticEvent for ScoreUpdated { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "ScoreUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " A single node, within some bag."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(R)` where `R` length of `reason`."] - #[doc = " - encoding and hashing of 'reason'"] - #[doc = "- DbReads: `Reasons`, `Tips`"] - #[doc = "- DbWrites: `Reasons`, `Tips`"] - #[doc = "# "] - pub fn report_awesome( + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes( &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", - ReportAwesome { reason, who }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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 = "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 = " A single node, within some bag."] #[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( + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes_root( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "retract_tip", - RetractTip { hash }, + ) -> ::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(), [ - 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, + 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 = "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( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( &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", - TipNew { - reason, - who, - tip_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( + "VoterList", + "CounterForListNodes", + vec![], [ - 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, + 156u8, 168u8, 97u8, 33u8, 84u8, 117u8, 220u8, 89u8, 62u8, + 182u8, 24u8, 88u8, 231u8, 244u8, 41u8, 19u8, 210u8, 131u8, + 87u8, 0u8, 241u8, 230u8, 160u8, 142u8, 128u8, 153u8, 83u8, + 36u8, 88u8, 247u8, 70u8, 130u8, ], ) } - #[doc = "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 = " A bag stored in storage."] #[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( + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags( &self, - hash: ::subxt::utils::H256, - tip_value: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "tip", - Tip { hash, tip_value }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 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, + 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 = "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 = " A bag stored in storage."] #[doc = ""] - #[doc = "# "] - #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"] - #[doc = " `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost"] - #[doc = " depends on the implementation of `T::Tippers`."] - #[doc = "- DbReads: `Tips`, `Tippers`, `tip finder`"] - #[doc = "- DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`"] - #[doc = "# "] - pub fn close_tip( + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags_root( &self, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "close_tip", - CloseTip { hash }, + ) -> ::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(), [ - 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, + 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 = "Remove and slash an already-open tip."] + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The list of thresholds separating the various bags."] #[doc = ""] - #[doc = "May only be called from `T::RejectOrigin`."] + #[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 = "As a result, the finder is slashed and the deposits are lost."] + #[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 = "Emits `TipSlashed` if successful."] + #[doc = " # Expressing the constant"] #[doc = ""] - #[doc = "# "] - #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] - #[doc = " The actual cost depends on the implementation of `T::Tippers`."] - #[doc = "# "] - pub fn slash_tip( + #[doc = " 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, - hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Tips", - "slash_tip", - SlashTip { hash }, + ) -> ::subxt::constants::StaticConstantAddress< + ::std::vec::Vec<::core::primitive::u64>, + > { + ::subxt::constants::StaticConstantAddress::new( + "VoterList", + "BagThresholds", [ - 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, + 103u8, 102u8, 255u8, 165u8, 124u8, 54u8, 5u8, 172u8, 112u8, + 234u8, 25u8, 175u8, 178u8, 19u8, 251u8, 73u8, 91u8, 192u8, + 227u8, 81u8, 249u8, 45u8, 126u8, 116u8, 7u8, 37u8, 9u8, + 200u8, 167u8, 182u8, 12u8, 131u8, ], ) } } } - #[doc = "\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 { + } + pub mod nomination_pools { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23141,13 +21175,24 @@ pub mod api { )] #[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 struct Join { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub pool_id: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for NewTip { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "NewTip"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BondExtra { + pub extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23158,13 +21203,34 @@ pub mod api { )] #[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 struct ClaimPayout; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Unbond { + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + pub unbonding_points: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for TipClosing { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosing"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PoolWithdrawUnbonded { + pub pool_id: ::core::primitive::u32, + pub num_slashing_spans: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23175,15 +21241,28 @@ pub mod api { )] #[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, + pub struct WithdrawUnbonded { + pub member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TipClosed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipClosed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Create { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23194,13 +21273,28 @@ pub mod api { )] #[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, + pub struct CreateWithPoolId { + #[codec(compact)] + pub amount: ::core::primitive::u128, + pub root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + pub pool_id: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TipRetracted { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipRetracted"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Nominate { + pub pool_id: ::core::primitive::u32, + pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23211,229 +21305,545 @@ pub mod api { )] #[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, + pub struct SetState { + pub pool_id: ::core::primitive::u32, + pub state: runtime_types::pallet_nomination_pools::PoolState, } - impl ::subxt::events::StaticEvent for TipSlashed { - const PALLET: &'static str = "Tips"; - const EVENT: &'static str = "TipSlashed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMetadata { + pub pool_id: ::core::primitive::u32, + pub metadata: ::std::vec::Vec<::core::primitive::u8>, } - } - 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( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, - ::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, - )], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UpdateRoles { + pub pool_id: ::core::primitive::u32, + pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::utils::AccountId32, + >, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Chill { + pub pool_id: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub fn join( + &self, + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "join", + Join { amount, pool_id }, [ - 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, + 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, + 183u8, 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, + 29u8, 118u8, 208u8, 60u8, 192u8, 247u8, 222u8, 100u8, 69u8, + 80u8, 172u8, 13u8, 69u8, 250u8, ], ) } - #[doc = " 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 = "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, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_tips::OpenTip< - ::subxt::utils::AccountId32, + extra: runtime_types::pallet_nomination_pools::BondExtra< ::core::primitive::u128, - ::core::primitive::u32, - ::subxt::utils::H256, >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Tips", - Vec::new(), + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "bond_extra", + BondExtra { extra }, [ - 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, + 50u8, 72u8, 181u8, 216u8, 249u8, 27u8, 250u8, 177u8, 253u8, + 22u8, 240u8, 100u8, 184u8, 202u8, 197u8, 34u8, 21u8, 188u8, + 248u8, 191u8, 11u8, 10u8, 236u8, 161u8, 168u8, 37u8, 38u8, + 238u8, 61u8, 183u8, 86u8, 55u8, ], ) } - #[doc = " 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 = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + pub fn claim_payout(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "claim_payout", + ClaimPayout {}, + [ + 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, + 229u8, 193u8, 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, + 222u8, 5u8, 236u8, 32u8, 88u8, 0u8, 198u8, 72u8, 196u8, + 181u8, 104u8, 16u8, 212u8, 29u8, + ], + ) + } + #[doc = "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. If"] + #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] + #[doc = "`NoMoreChunks` error from the staking system."] + pub fn unbond( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::core::primitive::u8>, - ::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, - )], + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + unbonding_points: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "unbond", + Unbond { + member_account, + unbonding_points, + }, [ - 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, + 78u8, 15u8, 37u8, 18u8, 129u8, 63u8, 31u8, 3u8, 68u8, 10u8, + 12u8, 12u8, 166u8, 179u8, 38u8, 232u8, 97u8, 1u8, 83u8, 53u8, + 26u8, 59u8, 42u8, 219u8, 176u8, 246u8, 169u8, 28u8, 35u8, + 67u8, 139u8, 81u8, ], ) } - #[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 = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if their are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub fn pool_withdraw_unbonded( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::core::primitive::u8>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Tips", - "Reasons", - Vec::new(), + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "pool_withdraw_unbonded", + PoolWithdrawUnbonded { + pool_id, + num_slashing_spans, + }, [ - 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, + 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, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum acceptable reason length."] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] #[doc = ""] - #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] - pub fn maximum_reason_length( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "MaximumReasonLength", + member_account: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "withdraw_unbonded", + WithdrawUnbonded { + member_account, + num_slashing_spans, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 61u8, 216u8, 214u8, 166u8, 59u8, 42u8, 186u8, 141u8, 47u8, + 50u8, 135u8, 236u8, 166u8, 88u8, 90u8, 244u8, 57u8, 106u8, + 193u8, 211u8, 215u8, 131u8, 203u8, 33u8, 195u8, 120u8, 213u8, + 94u8, 213u8, 66u8, 79u8, 140u8, ], ) } - #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] - pub fn data_deposit_per_byte( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "DataDepositPerByte", + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create", + Create { + amount, + root, + nominator, + state_toggler, + }, [ - 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, + 176u8, 210u8, 154u8, 87u8, 218u8, 250u8, 117u8, 90u8, 80u8, + 191u8, 252u8, 146u8, 29u8, 228u8, 36u8, 15u8, 125u8, 102u8, + 87u8, 50u8, 146u8, 108u8, 96u8, 145u8, 135u8, 189u8, 18u8, + 159u8, 21u8, 74u8, 165u8, 33u8, ], ) } - #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] - pub fn tip_countdown( + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub fn create_with_pool_id( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "TipCountdown", + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + state_toggler: ::subxt::utils::MultiAddress< + ::subxt::utils::AccountId32, + (), + >, + pool_id: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "create_with_pool_id", + CreateWithPoolId { + amount, + root, + nominator, + state_toggler, + pool_id, + }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 234u8, 228u8, 116u8, 171u8, 77u8, 41u8, 166u8, 254u8, 20u8, + 78u8, 38u8, 28u8, 144u8, 58u8, 2u8, 64u8, 11u8, 27u8, 124u8, + 215u8, 8u8, 10u8, 172u8, 189u8, 118u8, 131u8, 102u8, 191u8, + 251u8, 208u8, 167u8, 103u8, ], ) } - #[doc = " The percent of the final tip which goes to the original reporter of the tip."] - pub fn tip_finders_fee( + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn nominate( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_arithmetic::per_things::Percent, - > { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "TipFindersFee", + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::subxt::utils::AccountId32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "nominate", + Nominate { + pool_id, + validators, + }, [ - 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, + 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, + 172u8, 25u8, 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, + 13u8, 20u8, 89u8, 140u8, 159u8, 4u8, 132u8, 242u8, 192u8, + 146u8, 55u8, 251u8, 216u8, 255u8, ], ) } - #[doc = " The amount held on deposit for placing a tip report."] - pub fn tip_report_deposit_base( + #[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, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Tips", - "TipReportDepositBase", + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "NominationPools", + "set_state", + SetState { pool_id, state }, [ - 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, + 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, + 180u8, 99u8, 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, + 192u8, 187u8, 39u8, 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, + 175u8, 159u8, 161u8, 151u8, 162u8, + ], + ) + } + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the 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", + SetMetadata { pool_id, metadata }, + [ + 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, + 81u8, 31u8, 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, + 7u8, 8u8, 115u8, 158u8, 151u8, 30u8, 211u8, 52u8, 177u8, + 234u8, 87u8, 125u8, 127u8, + ], + ) + } + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + 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", + SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + max_members, + max_members_per_pool, + }, + [ + 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, + ], + ) + } + #[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", + UpdateRoles { + pool_id, + new_root, + new_nominator, + new_state_toggler, + }, + [ + 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, + ], + ) + } + #[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", + 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, ], ) } } } - } - pub mod assets { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + #[doc = "Events of this pallet."] + pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -23443,34 +21853,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub min_balance: ::core::primitive::u128, + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCreate { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub is_sufficient: ::core::primitive::bool, - #[codec(compact)] - pub min_balance: ::core::primitive::u128, + impl ::subxt::events::StaticEvent for Created { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Created"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23481,9 +21871,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StartDestroy { - #[codec(compact)] - pub id: ::core::primitive::u32, + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: ::subxt::utils::AccountId32, + pub pool_id: ::core::primitive::u32, + pub bonded: ::core::primitive::u128, + pub joined: ::core::primitive::bool, + } + impl ::subxt::events::StaticEvent for Bonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Bonded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23494,151 +21891,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DestroyAccounts { - #[codec(compact)] - pub id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DestroyApprovals { - #[codec(compact)] - pub id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FinishDestroy { - #[codec(compact)] - pub id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Mint { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burn { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferKeepAlive { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceTransfer { - #[codec(compact)] - pub id: ::core::primitive::u32, - 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 amount: ::core::primitive::u128, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Freeze { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + impl ::subxt::events::StaticEvent for PaidOut { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PaidOut"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23649,26 +21910,27 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Thaw { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FreezeAsset { - #[codec(compact)] - pub id: ::core::primitive::u32, + impl ::subxt::events::StaticEvent for Unbonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Unbonded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23679,28 +21941,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ThawAsset { - #[codec(compact)] - pub id: ::core::primitive::u32, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferOwnership { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + impl ::subxt::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Withdrawn"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -23709,37 +21967,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetTeam { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub symbol: ::std::vec::Vec<::core::primitive::u8>, - pub decimals: ::core::primitive::u8, + impl ::subxt::events::StaticEvent for Destroyed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Destroyed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23750,26 +21984,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearMetadata { - #[codec(compact)] - pub id: ::core::primitive::u32, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetMetadata { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub symbol: ::std::vec::Vec<::core::primitive::u8>, - pub decimals: ::core::primitive::u8, - pub is_frozen: ::core::primitive::bool, + impl ::subxt::events::StaticEvent for StateChanged { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "StateChanged"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23780,42 +22002,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceClearMetadata { - #[codec(compact)] - pub id: ::core::primitive::u32, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceAssetStatus { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub min_balance: ::core::primitive::u128, - pub is_sufficient: ::core::primitive::bool, - pub is_frozen: ::core::primitive::bool, + impl ::subxt::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MemberRemoved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23826,32 +22022,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveTransfer { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, + #[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>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelApproval { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + impl ::subxt::events::StaticEvent for RolesUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "RolesUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23862,40 +22042,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCancelApproval { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferApproved { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub destination: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub amount: ::core::primitive::u128, + impl ::subxt::events::StaticEvent for PoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolSlashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -23906,1031 +22060,764 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Touch { - #[codec(compact)] - pub id: ::core::primitive::u32, + #[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, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Refund { - #[codec(compact)] - pub id: ::core::primitive::u32, - pub allow_burn: ::core::primitive::bool, + impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "UnbondingPoolSlashed"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Issue a new class of fungible assets from a public origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "Funds of sender are reserved by `AssetDeposit`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset."] - #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] - #[doc = "member of the asset class's admin team."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn create( + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( &self, - id: ::core::primitive::u32, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - min_balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "create", - Create { - id, - admin, - min_balance, - }, + ) -> ::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![], [ - 197u8, 86u8, 72u8, 4u8, 104u8, 55u8, 113u8, 73u8, 86u8, 21u8, - 128u8, 40u8, 25u8, 91u8, 18u8, 246u8, 157u8, 168u8, 160u8, - 65u8, 101u8, 193u8, 120u8, 217u8, 245u8, 26u8, 194u8, 186u8, - 126u8, 231u8, 118u8, 176u8, + 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, + 58u8, 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, + 247u8, 97u8, 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, + 212u8, 217u8, 84u8, 240u8, 91u8, ], ) } - #[doc = "Issue a new class of fungible assets from a privileged origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset."] - #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] - #[doc = "over this asset, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = " Minimum bond required to create a pool."] #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] + #[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 = "Weight: `O(1)`"] - pub fn force_create( + #[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, - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - is_sufficient: ::core::primitive::bool, - min_balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_create", - ForceCreate { - id, - owner, - is_sufficient, - min_balance, - }, + ) -> ::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![], [ - 152u8, 24u8, 39u8, 126u8, 101u8, 61u8, 147u8, 180u8, 121u8, - 52u8, 45u8, 205u8, 87u8, 32u8, 87u8, 7u8, 134u8, 168u8, 1u8, - 159u8, 191u8, 246u8, 90u8, 245u8, 80u8, 172u8, 185u8, 254u8, - 59u8, 37u8, 204u8, 162u8, + 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, + 210u8, 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, + 111u8, 181u8, 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, + 16u8, 222u8, 219u8, 67u8, ], ) } - #[doc = "Start the process of destroying a fungible asset class."] - #[doc = ""] - #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] - #[doc = "destruction of an asset class."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "The asset class must be frozen before calling `start_destroy`."] - pub fn start_destroy( + #[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, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "start_destroy", - StartDestroy { id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPools", + vec![], [ - 83u8, 116u8, 245u8, 108u8, 180u8, 253u8, 0u8, 109u8, 9u8, - 206u8, 70u8, 95u8, 36u8, 80u8, 86u8, 186u8, 191u8, 161u8, - 227u8, 156u8, 162u8, 102u8, 82u8, 239u8, 124u8, 162u8, 128u8, - 121u8, 183u8, 120u8, 214u8, 136u8, + 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, + 195u8, 23u8, 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, + 68u8, 215u8, 162u8, 255u8, 217u8, 173u8, 141u8, 27u8, 72u8, + 199u8, 7u8, 240u8, 25u8, 34u8, ], ) } - #[doc = "Destroy all accounts associated with a given asset."] - #[doc = ""] - #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedAccounts` event."] - pub fn destroy_accounts( + #[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, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "destroy_accounts", - DestroyAccounts { id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPoolMembers", + vec![], [ - 35u8, 134u8, 147u8, 165u8, 201u8, 250u8, 221u8, 158u8, 216u8, - 147u8, 218u8, 79u8, 235u8, 188u8, 10u8, 101u8, 22u8, 48u8, - 1u8, 192u8, 176u8, 84u8, 111u8, 244u8, 99u8, 92u8, 254u8, - 49u8, 156u8, 24u8, 209u8, 180u8, + 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, + 233u8, 59u8, 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, + 166u8, 89u8, 120u8, 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, + 88u8, 206u8, 41u8, 242u8, 62u8, ], ) } - #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] - #[doc = ""] - #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedApprovals` event."] - pub fn destroy_approvals( + #[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, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "destroy_approvals", - DestroyApprovals { id }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "NominationPools", + "MaxPoolMembersPerPool", + vec![], [ - 138u8, 31u8, 250u8, 93u8, 156u8, 239u8, 19u8, 43u8, 244u8, - 208u8, 159u8, 223u8, 143u8, 253u8, 235u8, 130u8, 159u8, - 117u8, 15u8, 79u8, 1u8, 205u8, 153u8, 36u8, 38u8, 23u8, 38u8, - 0u8, 193u8, 104u8, 140u8, 225u8, + 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, + 30u8, 55u8, 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, + 239u8, 195u8, 147u8, 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, + 248u8, 169u8, 186u8, 48u8, ], ) } - #[doc = "Complete destroying asset and unreserve currency."] - #[doc = ""] - #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] - #[doc = "hand."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each successful call emits the `Event::Destroyed` event."] - pub fn finish_destroy( + #[doc = " Active members."] + pub fn pool_members( &self, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "finish_destroy", - FinishDestroy { id }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 215u8, 16u8, 107u8, 60u8, 181u8, 1u8, 238u8, 172u8, 36u8, - 54u8, 187u8, 26u8, 159u8, 224u8, 161u8, 8u8, 115u8, 183u8, - 132u8, 121u8, 42u8, 165u8, 7u8, 193u8, 208u8, 124u8, 45u8, - 158u8, 100u8, 57u8, 117u8, 209u8, + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, + 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, + 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, + 31u8, 60u8, 120u8, 100u8, 249u8, ], ) } - #[doc = "Mint assets of a particular class."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount minted."] - #[doc = "- `beneficiary`: The account to be credited with the minted assets."] - #[doc = "- `amount`: The amount of the asset to be minted."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] - pub fn mint( + #[doc = " Active members."] + pub fn pool_members_root( &self, - id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "mint", - Mint { - id, - beneficiary, - amount, - }, + ) -> ::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(), [ - 21u8, 30u8, 124u8, 32u8, 105u8, 231u8, 137u8, 139u8, 28u8, - 252u8, 232u8, 138u8, 197u8, 0u8, 109u8, 156u8, 102u8, 83u8, - 51u8, 128u8, 246u8, 186u8, 249u8, 144u8, 133u8, 127u8, 241u8, - 152u8, 201u8, 50u8, 41u8, 105u8, + 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, + 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, + 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, + 31u8, 60u8, 120u8, 100u8, 249u8, ], ) } - #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] - #[doc = ""] - #[doc = "Bails with `NoAccount` if the `who` is already dead."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount burned."] - #[doc = "- `who`: The account to be debited from."] - #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] - #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] - pub fn burn( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_pool_members( &self, - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "burn", - Burn { id, who, amount }, + ) -> ::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![], [ - 104u8, 94u8, 68u8, 117u8, 145u8, 209u8, 149u8, 156u8, 131u8, - 137u8, 137u8, 93u8, 114u8, 237u8, 75u8, 56u8, 77u8, 65u8, - 18u8, 71u8, 19u8, 187u8, 76u8, 145u8, 24u8, 128u8, 62u8, - 234u8, 200u8, 247u8, 196u8, 45u8, + 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, + 107u8, 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, + 31u8, 229u8, 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, + 42u8, 62u8, 212u8, 160u8, 2u8, ], ) } - #[doc = "Move some assets from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub fn transfer( + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( &self, - id: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer", - Transfer { id, target, amount }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 132u8, 120u8, 134u8, 8u8, 238u8, 66u8, 45u8, 83u8, 151u8, - 8u8, 118u8, 62u8, 2u8, 163u8, 213u8, 255u8, 42u8, 211u8, - 125u8, 21u8, 150u8, 117u8, 177u8, 21u8, 105u8, 61u8, 3u8, - 2u8, 30u8, 70u8, 65u8, 145u8, + 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 = "Move some assets from the sender account to another, keeping the sender account alive."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - pub fn transfer_keep_alive( + #[doc = " Storage for bonded pools."] + pub fn bonded_pools_root( &self, - id: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer_keep_alive", - TransferKeepAlive { id, target, amount }, + ) -> ::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(), [ - 9u8, 46u8, 251u8, 191u8, 91u8, 192u8, 119u8, 203u8, 147u8, - 84u8, 76u8, 27u8, 237u8, 174u8, 67u8, 249u8, 185u8, 199u8, - 240u8, 122u8, 160u8, 111u8, 245u8, 247u8, 241u8, 197u8, - 238u8, 253u8, 75u8, 216u8, 41u8, 148u8, + 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 = "Move some assets from one account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `source`: The account to be debited."] - #[doc = "- `dest`: The account to be credited."] - #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] - #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] - #[doc = "below the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] - #[doc = "`dest`."] - pub fn force_transfer( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_bonded_pools( &self, - id: ::core::primitive::u32, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_transfer", - ForceTransfer { - id, - source, - dest, - amount, - }, + ) -> ::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![], [ - 253u8, 100u8, 109u8, 66u8, 153u8, 140u8, 39u8, 85u8, 19u8, - 199u8, 68u8, 6u8, 124u8, 200u8, 250u8, 142u8, 104u8, 55u8, - 190u8, 25u8, 117u8, 180u8, 201u8, 245u8, 153u8, 192u8, 240u8, - 5u8, 176u8, 142u8, 106u8, 92u8, + 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, + 244u8, 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, + 58u8, 111u8, 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, + 135u8, 8u8, 171u8, 180u8, 236u8, ], ) } - #[doc = "Disallow further unprivileged transfers from an account."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze( + #[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, - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "freeze", - Freeze { id, who }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 191u8, 155u8, 214u8, 95u8, 125u8, 58u8, 207u8, 76u8, 99u8, - 15u8, 102u8, 189u8, 26u8, 232u8, 9u8, 73u8, 231u8, 114u8, - 199u8, 129u8, 110u8, 84u8, 22u8, 114u8, 108u8, 57u8, 83u8, - 246u8, 92u8, 0u8, 127u8, 53u8, + 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 = "Allow unprivileged transfers from an account again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be unfrozen."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw( + #[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, - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "thaw", - Thaw { id, who }, + ) -> ::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(), [ - 52u8, 37u8, 227u8, 9u8, 177u8, 120u8, 93u8, 129u8, 81u8, - 35u8, 107u8, 22u8, 80u8, 58u8, 3u8, 98u8, 211u8, 65u8, 49u8, - 107u8, 184u8, 102u8, 185u8, 84u8, 160u8, 73u8, 12u8, 242u8, - 203u8, 233u8, 79u8, 117u8, + 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 = "Disallow further unprivileged transfers for the asset class."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze_asset( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reward_pools( &self, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "freeze_asset", - FreezeAsset { 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( + "NominationPools", + "CounterForRewardPools", + vec![], [ - 208u8, 101u8, 0u8, 73u8, 41u8, 192u8, 227u8, 44u8, 189u8, - 231u8, 40u8, 124u8, 189u8, 147u8, 136u8, 210u8, 76u8, 32u8, - 249u8, 183u8, 68u8, 58u8, 150u8, 136u8, 192u8, 47u8, 173u8, - 178u8, 225u8, 84u8, 110u8, 1u8, + 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, + 23u8, 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, + 45u8, 205u8, 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, + 49u8, 143u8, 135u8, 201u8, 81u8, ], ) } - #[doc = "Allow unprivileged transfers for the asset again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be thawed."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw_asset( + #[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, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "thaw_asset", - ThawAsset { id }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 18u8, 198u8, 141u8, 158u8, 182u8, 167u8, 160u8, 227u8, 20u8, - 74u8, 80u8, 164u8, 89u8, 46u8, 168u8, 139u8, 251u8, 83u8, - 155u8, 91u8, 91u8, 46u8, 205u8, 55u8, 171u8, 175u8, 167u8, - 188u8, 116u8, 155u8, 79u8, 117u8, + 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, + 196u8, 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, + 157u8, 34u8, 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, + 29u8, 205u8, 237u8, 80u8, 42u8, ], ) } - #[doc = "Change the Owner of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer_ownership( + #[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, - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer_ownership", - TransferOwnership { id, owner }, + ) -> ::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(), [ - 170u8, 94u8, 202u8, 42u8, 41u8, 156u8, 250u8, 63u8, 113u8, - 110u8, 166u8, 129u8, 90u8, 233u8, 35u8, 87u8, 123u8, 172u8, - 65u8, 108u8, 170u8, 237u8, 252u8, 70u8, 186u8, 12u8, 58u8, - 6u8, 173u8, 87u8, 161u8, 211u8, + 231u8, 13u8, 111u8, 248u8, 1u8, 208u8, 179u8, 134u8, 224u8, + 196u8, 94u8, 201u8, 229u8, 29u8, 155u8, 211u8, 163u8, 150u8, + 157u8, 34u8, 68u8, 238u8, 55u8, 4u8, 222u8, 96u8, 186u8, + 29u8, 205u8, 237u8, 80u8, 42u8, ], ) } - #[doc = "Change the Issuer, Admin and Freezer of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_team( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( &self, - id: ::core::primitive::u32, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "set_team", - SetTeam { - id, - issuer, - admin, - freezer, - }, + ) -> ::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![], [ - 30u8, 60u8, 182u8, 252u8, 64u8, 97u8, 6u8, 80u8, 159u8, - 204u8, 14u8, 227u8, 54u8, 20u8, 172u8, 100u8, 77u8, 59u8, - 164u8, 247u8, 122u8, 39u8, 129u8, 106u8, 87u8, 82u8, 77u8, - 165u8, 215u8, 232u8, 159u8, 29u8, + 212u8, 145u8, 212u8, 226u8, 234u8, 31u8, 26u8, 240u8, 107u8, + 91u8, 171u8, 120u8, 41u8, 195u8, 16u8, 86u8, 55u8, 127u8, + 103u8, 93u8, 128u8, 48u8, 69u8, 104u8, 168u8, 236u8, 81u8, + 54u8, 2u8, 184u8, 215u8, 51u8, ], ) } - #[doc = "Set the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Funds of sender are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_metadata( + #[doc = " Metadata for the pool."] + pub fn metadata( &self, - id: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - symbol: ::std::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "set_metadata", - SetMetadata { - id, - name, - symbol, - decimals, - }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 15u8, 184u8, 50u8, 46u8, 164u8, 27u8, 105u8, 186u8, 35u8, - 115u8, 194u8, 247u8, 74u8, 252u8, 139u8, 242u8, 108u8, 221u8, - 122u8, 15u8, 139u8, 74u8, 123u8, 17u8, 192u8, 138u8, 182u8, - 163u8, 77u8, 7u8, 124u8, 18u8, + 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 = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Any deposit is freed for the asset owner."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_metadata( + #[doc = " Metadata for the pool."] + pub fn metadata_root( &self, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "clear_metadata", - ClearMetadata { id }, + ) -> ::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(), [ - 192u8, 41u8, 71u8, 183u8, 13u8, 128u8, 244u8, 255u8, 175u8, - 36u8, 99u8, 175u8, 15u8, 129u8, 228u8, 76u8, 107u8, 214u8, - 166u8, 116u8, 244u8, 139u8, 60u8, 31u8, 123u8, 61u8, 203u8, - 59u8, 213u8, 146u8, 116u8, 126u8, + 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 = "Force the metadata for an asset to some value."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is left alone."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] - pub fn force_set_metadata( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_metadata( &self, - id: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - symbol: ::std::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_set_metadata", - ForceSetMetadata { - id, - name, - symbol, - decimals, - is_frozen, - }, + ) -> ::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![], [ - 7u8, 30u8, 55u8, 233u8, 217u8, 113u8, 196u8, 21u8, 29u8, - 122u8, 168u8, 225u8, 63u8, 104u8, 57u8, 78u8, 76u8, 145u8, - 121u8, 118u8, 91u8, 149u8, 87u8, 26u8, 26u8, 125u8, 44u8, - 241u8, 143u8, 138u8, 144u8, 8u8, + 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 = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is returned."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_clear_metadata( + #[doc = " Ever increasing number of all pools created so far."] + pub fn last_pool_id( &self, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_clear_metadata", - ForceClearMetadata { 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( + "NominationPools", + "LastPoolId", + vec![], [ - 71u8, 191u8, 101u8, 72u8, 188u8, 223u8, 215u8, 187u8, 200u8, - 206u8, 3u8, 42u8, 4u8, 62u8, 117u8, 106u8, 26u8, 2u8, 68u8, - 202u8, 162u8, 142u8, 172u8, 123u8, 48u8, 196u8, 247u8, 89u8, - 147u8, 75u8, 84u8, 109u8, + 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 = "Alter the attributes of a given asset."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] - #[doc = "value to account for the state bloat associated with its balance storage. If set to"] - #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] - #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] - #[doc = "growth)."] - #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = " A reverse lookup from the pool's account id to its id."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_asset_status( + #[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, - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - min_balance: ::core::primitive::u128, - is_sufficient: ::core::primitive::bool, - is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_asset_status", - ForceAssetStatus { - id, - owner, - issuer, - admin, - freezer, - min_balance, - is_sufficient, - is_frozen, - }, + _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::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 46u8, 229u8, 189u8, 83u8, 196u8, 180u8, 79u8, 77u8, 71u8, - 147u8, 77u8, 243u8, 99u8, 3u8, 205u8, 171u8, 129u8, 25u8, - 60u8, 10u8, 162u8, 50u8, 205u8, 231u8, 184u8, 75u8, 42u8, - 230u8, 48u8, 194u8, 236u8, 71u8, + 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 = "Approve an amount of asset for transfer by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] - #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] - #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] - #[doc = "meet the right value."] - #[doc = ""] - #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] - #[doc = "making this call."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account to delegate permission to transfer asset."] - #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] - #[doc = "already an approval in place, then this acts additively."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = " A reverse lookup from the pool's account id to its id."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn approve_transfer( + #[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, - id: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "approve_transfer", - ApproveTransfer { - id, - delegate, - amount, - }, + ) -> ::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(), [ - 85u8, 79u8, 216u8, 233u8, 163u8, 169u8, 226u8, 111u8, 10u8, - 110u8, 33u8, 239u8, 248u8, 222u8, 84u8, 160u8, 80u8, 164u8, - 29u8, 88u8, 164u8, 252u8, 238u8, 212u8, 9u8, 230u8, 201u8, - 166u8, 192u8, 225u8, 94u8, 13u8, + 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 = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place between signer and"] - #[doc = "`delegate`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn cancel_approval( + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reverse_pool_id_lookup( &self, - id: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "cancel_approval", - CancelApproval { id, delegate }, + ) -> ::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![], [ - 120u8, 10u8, 77u8, 128u8, 1u8, 232u8, 42u8, 2u8, 87u8, 7u8, - 217u8, 51u8, 172u8, 13u8, 136u8, 176u8, 153u8, 128u8, 196u8, - 3u8, 190u8, 139u8, 219u8, 24u8, 35u8, 51u8, 241u8, 87u8, - 67u8, 49u8, 181u8, 203u8, + 148u8, 83u8, 81u8, 33u8, 188u8, 72u8, 148u8, 208u8, 245u8, + 178u8, 52u8, 245u8, 229u8, 140u8, 100u8, 152u8, 8u8, 217u8, + 161u8, 80u8, 226u8, 42u8, 15u8, 252u8, 90u8, 197u8, 120u8, + 114u8, 144u8, 90u8, 199u8, 123u8, ], ) } - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] - #[doc = "account of the asset `id`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_cancel_approval( + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The nomination pool's pallet id."] + pub fn pallet_id( &self, - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "force_cancel_approval", - ForceCancelApproval { - id, - owner, - delegate, - }, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt::constants::StaticConstantAddress::new( + "NominationPools", + "PalletId", [ - 192u8, 196u8, 91u8, 219u8, 20u8, 150u8, 220u8, 79u8, 81u8, - 151u8, 104u8, 109u8, 21u8, 87u8, 158u8, 169u8, 208u8, 4u8, - 241u8, 109u8, 230u8, 166u8, 237u8, 164u8, 90u8, 54u8, 14u8, - 51u8, 84u8, 239u8, 178u8, 202u8, + 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8, + 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8, + 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8, + 189u8, 30u8, 94u8, 22u8, 39u8, ], ) } - #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] - #[doc = "account."] + #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] - #[doc = "signer."] - #[doc = ""] - #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] - #[doc = "reserved by `approve_transfer` is unreserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] - #[doc = "from which the asset balance will be withdrawn."] - #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] - #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] + #[doc = " ratio becomes disproportional."] #[doc = ""] - #[doc = "Emits `TransferredApproved` on success."] + #[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 = "Weight: `O(1)`"] - pub fn transfer_approved( + #[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, - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - destination: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - amount: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Assets", - "transfer_approved", - TransferApproved { - id, - owner, - destination, - amount, - }, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u8> + { + ::subxt::constants::StaticConstantAddress::new( + "NominationPools", + "MaxPointsToBalance", [ - 151u8, 228u8, 207u8, 182u8, 179u8, 212u8, 208u8, 3u8, 207u8, - 181u8, 193u8, 164u8, 74u8, 160u8, 81u8, 191u8, 42u8, 227u8, - 56u8, 238u8, 50u8, 75u8, 8u8, 50u8, 131u8, 83u8, 152u8, 20u8, - 141u8, 39u8, 29u8, 205u8, + 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 = "Create an asset account for non-provider assets."] + } + } + } + pub mod fast_unstake { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RegisterFastUnstake; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Deregister; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Control { + pub unchecked_eras_to_check: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register oneself for fast-unstake."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] + #[doc = "`staking::unbond`."] + #[doc = ""] + #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] + #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] + #[doc = "to be checked in further blocks."] #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] + #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] + #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] #[doc = ""] - #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] - #[doc = " to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] + #[doc = "unstaked."] #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - pub fn touch( + #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] + #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] + #[doc = "the chain's resources."] + pub fn register_fast_unstake( &self, - id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "touch", - Touch { id }, + "FastUnstake", + "register_fast_unstake", + RegisterFastUnstake {}, [ - 114u8, 149u8, 179u8, 168u8, 115u8, 117u8, 32u8, 50u8, 39u8, - 77u8, 148u8, 238u8, 123u8, 96u8, 193u8, 174u8, 113u8, 141u8, - 34u8, 228u8, 228u8, 214u8, 71u8, 111u8, 55u8, 126u8, 103u8, - 181u8, 133u8, 77u8, 116u8, 105u8, + 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, + 117u8, 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, + 180u8, 85u8, 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, + 184u8, 177u8, 129u8, 42u8, 122u8, ], ) } - #[doc = "Return the deposit (if any) of an asset account."] + #[doc = "Deregister oneself from the fast-unstake."] #[doc = ""] - #[doc = "The origin must be Signed."] + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] + #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] + #[doc = "`Staking::rebond`."] + pub fn deregister(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "FastUnstake", + "deregister", + Deregister {}, + [ + 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, + 181u8, 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, + 242u8, 155u8, 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, + 144u8, 35u8, 252u8, 88u8, 21u8, + ], + ) + } + #[doc = "Control the operation of this pallet."] #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - pub fn refund( + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + pub fn control( &self, - id: ::core::primitive::u32, - allow_burn: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { + unchecked_eras_to_check: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Assets", - "refund", - Refund { id, allow_burn }, + "FastUnstake", + "control", + Control { + unchecked_eras_to_check, + }, [ - 20u8, 139u8, 248u8, 67u8, 123u8, 221u8, 7u8, 106u8, 239u8, - 156u8, 68u8, 59u8, 81u8, 184u8, 47u8, 188u8, 195u8, 227u8, - 75u8, 168u8, 126u8, 176u8, 91u8, 187u8, 30u8, 34u8, 24u8, - 223u8, 108u8, 101u8, 88u8, 83u8, + 134u8, 85u8, 43u8, 231u8, 209u8, 34u8, 248u8, 0u8, 238u8, + 73u8, 175u8, 105u8, 40u8, 128u8, 186u8, 40u8, 211u8, 106u8, + 107u8, 206u8, 124u8, 155u8, 220u8, 125u8, 143u8, 10u8, 162u8, + 20u8, 99u8, 142u8, 243u8, 5u8, ], ) } } } - #[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_assets::pallet::Event; + #[doc = "The events of this pallet."] + pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -24942,15 +22829,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some asset class was created."] - pub struct Created { - pub asset_id: ::core::primitive::u32, - pub creator: ::subxt::utils::AccountId32, - pub owner: ::subxt::utils::AccountId32, + #[doc = "A staker was unstaked."] + pub struct Unstaked { + pub stash: ::subxt::utils::AccountId32, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Created"; + impl ::subxt::events::StaticEvent for Unstaked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Unstaked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -24961,15 +22848,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some assets were issued."] - pub struct Issued { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub total_supply: ::core::primitive::u128, + #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] + pub struct Slashed { + pub stash: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Issued"; + impl ::subxt::events::StaticEvent for Slashed { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Slashed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -24980,16 +22866,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some assets were transferred."] - pub struct Transferred { - pub asset_id: ::core::primitive::u32, - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] + #[doc = "consequence."] + pub struct Errored { + pub stash: ::subxt::utils::AccountId32, } - impl ::subxt::events::StaticEvent for Transferred { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Transferred"; + impl ::subxt::events::StaticEvent for Errored { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "Errored"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25000,15 +22884,28 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some assets were destroyed."] - pub struct Burned { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub balance: ::core::primitive::u128, + #[doc = "An internal error happened. Operations will be paused now."] + pub struct InternalError; + impl ::subxt::events::StaticEvent for InternalError { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "InternalError"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A batch was partially checked for the given eras, but the process did not finish."] + pub struct BatchChecked { + pub eras: ::std::vec::Vec<::core::primitive::u32>, } - impl ::subxt::events::StaticEvent for Burned { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Burned"; + impl ::subxt::events::StaticEvent for BatchChecked { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchChecked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25019,18 +22916,159 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The management team changed."] - pub struct TeamChanged { - pub asset_id: ::core::primitive::u32, - pub issuer: ::subxt::utils::AccountId32, - pub admin: ::subxt::utils::AccountId32, - pub freezer: ::subxt::utils::AccountId32, + #[doc = "A batch was terminated."] + #[doc = ""] + #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] + #[doc = "of the batch. A new batch will be created upon next block."] + pub struct BatchFinished; + impl ::subxt::events::StaticEvent for BatchFinished { + const PALLET: &'static str = "FastUnstake"; + const EVENT: &'static str = "BatchFinished"; } - impl ::subxt::events::StaticEvent for TeamChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "TeamChanged"; + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current \"head of the queue\" being unstaked."] + pub fn head( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_fast_unstake::types::UnstakeRequest, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "Head", + vec![], + [ + 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, + 110u8, 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, + 2u8, 213u8, 134u8, 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, + 42u8, 135u8, 212u8, 108u8, 177u8, + ], + ) + } + #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = ""] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] + pub fn queue( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "Queue", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, + 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, + 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, + 205u8, 173u8, 189u8, 230u8, 71u8, + ], + ) + } + #[doc = " The map of all accounts wishing to be unstaked."] + #[doc = ""] + #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] + pub fn queue_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "Queue", + Vec::new(), + [ + 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, + 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, + 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, + 205u8, 173u8, 189u8, 230u8, 71u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_queue( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "CounterForQueue", + vec![], + [ + 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, + 63u8, 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, + 112u8, 5u8, 248u8, 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, + 237u8, 4u8, 138u8, 210u8, + ], + ) + } + #[doc = " Number of eras to check per block."] + #[doc = ""] + #[doc = " If set to 0, this pallet does absolutely nothing."] + #[doc = ""] + #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] + #[doc = " nominator might be checked."] + pub fn eras_to_check_per_block( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "FastUnstake", + "ErasToCheckPerBlock", + vec![], + [ + 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, + 250u8, 203u8, 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, + 254u8, 23u8, 49u8, 140u8, 195u8, 116u8, 66u8, 124u8, 165u8, + 161u8, 151u8, 174u8, 37u8, 51u8, + ], + ) + } } + } + } + pub mod parachains_origin { + use super::root_mod; + use super::runtime_types; + } + pub mod configuration { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25039,16 +23077,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The owner changed."] - pub struct OwnerChanged { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, + pub struct SetValidationUpgradeCooldown { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for OwnerChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "OwnerChanged"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetValidationUpgradeDelay { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25057,16 +23103,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some account `who` was frozen."] - pub struct Frozen { - pub asset_id: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, + pub struct SetCodeRetentionPeriod { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Frozen { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Frozen"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxCodeSize { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25075,14 +23129,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some account `who` was thawed."] - pub struct Thawed { - pub asset_id: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, + pub struct SetMaxPovSize { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Thawed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Thawed"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxHeadDataSize { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25094,13 +23155,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some asset `asset_id` was frozen."] - pub struct AssetFrozen { - pub asset_id: ::core::primitive::u32, + pub struct SetParathreadCores { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AssetFrozen { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetFrozen"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetParathreadRetries { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25112,15 +23181,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some asset `asset_id` was thawed."] - pub struct AssetThawed { - pub asset_id: ::core::primitive::u32, + pub struct SetGroupRotationFrequency { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AssetThawed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetThawed"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetChainAvailabilityPeriod { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25129,15 +23207,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Accounts were destroyed for given asset."] - pub struct AccountsDestroyed { - pub asset_id: ::core::primitive::u32, - pub accounts_destroyed: ::core::primitive::u32, - pub accounts_remaining: ::core::primitive::u32, + pub struct SetThreadAvailabilityPeriod { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AccountsDestroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AccountsDestroyed"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetSchedulingLookahead { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25148,15 +23232,20 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Approvals were destroyed for given asset."] - pub struct ApprovalsDestroyed { - pub asset_id: ::core::primitive::u32, - pub approvals_destroyed: ::core::primitive::u32, - pub approvals_remaining: ::core::primitive::u32, + pub struct SetMaxValidatorsPerCore { + pub new: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::events::StaticEvent for ApprovalsDestroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovalsDestroyed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxValidators { + pub new: ::core::option::Option<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25168,13 +23257,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An asset class is in the process of being destroyed."] - pub struct DestructionStarted { - pub asset_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for DestructionStarted { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "DestructionStarted"; + pub struct SetDisputePeriod { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25186,15 +23270,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An asset class was destroyed."] - pub struct Destroyed { - pub asset_id: ::core::primitive::u32, + pub struct SetDisputePostConclusionAcceptancePeriod { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "Destroyed"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetDisputeMaxSpamSlots { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25203,16 +23296,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some asset class was force-created."] - pub struct ForceCreated { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, + pub struct SetDisputeConclusionByTimeOutPeriod { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for ForceCreated { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ForceCreated"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetNoShowSlots { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25221,17 +23322,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New metadata has been set for an asset."] - pub struct MetadataSet { - pub asset_id: ::core::primitive::u32, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub symbol: ::std::vec::Vec<::core::primitive::u8>, - pub decimals: ::core::primitive::u8, - pub is_frozen: ::core::primitive::bool, + pub struct SetNDelayTranches { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "MetadataSet"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetZerothDelayTrancheWidth { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25243,15 +23348,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for an asset."] - pub struct MetadataCleared { - pub asset_id: ::core::primitive::u32, + pub struct SetNeededApprovals { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "MetadataCleared"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetRelayVrfModuloSamples { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25260,18 +23374,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "(Additional) funds have been approved for transfer to a destination account."] - pub struct ApprovedTransfer { - pub asset_id: ::core::primitive::u32, - pub source: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + pub struct SetMaxUpwardQueueCount { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for ApprovedTransfer { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovedTransfer"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardQueueSize { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25280,17 +23400,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An approval for account `delegate` was cancelled by `owner`."] - pub struct ApprovalCancelled { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, + pub struct SetMaxDownwardMessageSize { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for ApprovalCancelled { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "ApprovalCancelled"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetUmpServiceTotalWeight { + pub new: runtime_types::sp_weights::weight_v2::Weight, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25299,18 +23425,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] - #[doc = "the approved `delegate`."] - pub struct TransferredApproved { - pub asset_id: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, - pub destination: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + pub struct SetMaxUpwardMessageSize { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TransferredApproved { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "TransferredApproved"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMaxUpwardMessageNumPerCandidate { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -25322,454 +23451,63 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An asset has had its attributes changed by the `Force` origin."] - pub struct AssetStatusChanged { - pub asset_id: ::core::primitive::u32, + pub struct SetHrmpOpenRequestTtl { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AssetStatusChanged { - const PALLET: &'static str = "Assets"; - const EVENT: &'static str = "AssetStatusChanged"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpSenderDeposit { + pub new: ::core::primitive::u128, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Details of an asset."] - pub fn asset( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetDetails< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Assets", - "Asset", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 251u8, 148u8, 82u8, 150u8, 66u8, 26u8, 46u8, 186u8, 60u8, - 59u8, 239u8, 190u8, 102u8, 156u8, 113u8, 175u8, 1u8, 117u8, - 147u8, 236u8, 114u8, 88u8, 49u8, 210u8, 165u8, 162u8, 201u8, - 230u8, 147u8, 141u8, 174u8, 221u8, - ], - ) - } - #[doc = " Details of an asset."] - pub fn asset_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetDetails< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Assets", - "Asset", - Vec::new(), - [ - 251u8, 148u8, 82u8, 150u8, 66u8, 26u8, 46u8, 186u8, 60u8, - 59u8, 239u8, 190u8, 102u8, 156u8, 113u8, 175u8, 1u8, 117u8, - 147u8, 236u8, 114u8, 88u8, 49u8, 210u8, 165u8, 162u8, 201u8, - 230u8, 147u8, 141u8, 174u8, 221u8, - ], - ) - } - #[doc = " The holdings of a specific account for a specific asset."] - pub fn account( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetAccount< - ::core::primitive::u128, - ::core::primitive::u128, - (), - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Assets" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [109u8 , 245u8 , 93u8 , 133u8 , 206u8 , 68u8 , 94u8 , 233u8 , 29u8 , 113u8 , 245u8 , 201u8 , 241u8 , 2u8 , 200u8 , 179u8 , 37u8 , 199u8 , 128u8 , 243u8 , 49u8 , 50u8 , 122u8 , 139u8 , 135u8 , 48u8 , 201u8 , 109u8 , 195u8 , 38u8 , 205u8 , 32u8 ,]) - } - #[doc = " The holdings of a specific account for a specific asset."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetAccount< - ::core::primitive::u128, - ::core::primitive::u128, - (), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Assets", - "Account", - Vec::new(), - [ - 109u8, 245u8, 93u8, 133u8, 206u8, 68u8, 94u8, 233u8, 29u8, - 113u8, 245u8, 201u8, 241u8, 2u8, 200u8, 179u8, 37u8, 199u8, - 128u8, 243u8, 49u8, 50u8, 122u8, 139u8, 135u8, 48u8, 201u8, - 109u8, 195u8, 38u8, 205u8, 32u8, - ], - ) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _2: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::Approval< - ::core::primitive::u128, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Assets" , "Approvals" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [210u8 , 147u8 , 203u8 , 49u8 , 232u8 , 215u8 , 116u8 , 154u8 , 43u8 , 154u8 , 69u8 , 159u8 , 241u8 , 28u8 , 238u8 , 101u8 , 108u8 , 162u8 , 242u8 , 121u8 , 138u8 , 164u8 , 217u8 , 243u8 , 72u8 , 173u8 , 75u8 , 109u8 , 194u8 , 9u8 , 196u8 , 163u8 ,]) - } - #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] - #[doc = " is the amount of `T::Currency` reserved for storing this."] - #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] - pub fn approvals_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::Approval< - ::core::primitive::u128, - ::core::primitive::u128, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Assets", - "Approvals", - Vec::new(), - [ - 210u8, 147u8, 203u8, 49u8, 232u8, 215u8, 116u8, 154u8, 43u8, - 154u8, 69u8, 159u8, 241u8, 28u8, 238u8, 101u8, 108u8, 162u8, - 242u8, 121u8, 138u8, 164u8, 217u8, 243u8, 72u8, 173u8, 75u8, - 109u8, 194u8, 9u8, 196u8, 163u8, - ], - ) - } - #[doc = " Metadata of an asset."] - pub fn metadata( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetMetadata< - ::core::primitive::u128, - 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( - "Assets", - "Metadata", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 80u8, 115u8, 155u8, 115u8, 136u8, 108u8, 82u8, 93u8, 65u8, - 130u8, 143u8, 228u8, 170u8, 234u8, 182u8, 170u8, 229u8, - 217u8, 168u8, 71u8, 81u8, 80u8, 16u8, 112u8, 209u8, 82u8, - 8u8, 165u8, 80u8, 137u8, 58u8, 170u8, - ], - ) - } - #[doc = " Metadata of an asset."] - pub fn metadata_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_assets::types::AssetMetadata< - ::core::primitive::u128, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Assets", - "Metadata", - Vec::new(), - [ - 80u8, 115u8, 155u8, 115u8, 136u8, 108u8, 82u8, 93u8, 65u8, - 130u8, 143u8, 228u8, 170u8, 234u8, 182u8, 170u8, 229u8, - 217u8, 168u8, 71u8, 81u8, 80u8, 16u8, 112u8, 209u8, 82u8, - 8u8, 165u8, 80u8, 137u8, 58u8, 170u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpRecipientDeposit { + pub new: ::core::primitive::u128, } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call."] - #[doc = ""] - #[doc = " Must be configured to result in a weight that makes each call fit in a block."] - pub fn remove_items_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "RemoveItemsLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved for an asset."] - pub fn asset_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "AssetDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount of funds that must be reserved for a non-provider asset account to be"] - #[doc = " maintained."] - pub fn asset_account_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "AssetAccountDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved when adding metadata to your asset."] - pub fn metadata_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "MetadataDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The additional funds that must be reserved for the number of bytes you store in your"] - #[doc = " metadata."] - pub fn metadata_deposit_per_byte( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "MetadataDepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The amount of funds that must be reserved when creating a new approval."] - pub fn approval_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "ApprovalDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum length of a name or symbol stored on-chain."] - pub fn string_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Assets", - "StringLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpChannelMaxCapacity { + pub new: ::core::primitive::u32, } - } - } - pub mod mmr { - use super::root_mod; - use super::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::StaticStorageAddress< - ::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, - ], - ) - } - #[doc = " Current size of the MMR (number of leaves)."] - pub fn number_of_leaves( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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 = " 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::StaticStorageAddress< - ::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, - ], - ) - } - #[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::StaticStorageAddress< - ::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, - ], - ) - } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetHrmpChannelMaxTotalSize { + pub new: ::core::primitive::u32, } - } - } - pub mod lottery { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25778,11 +23516,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BuyTicket { - pub call: - ::std::boxed::Box, + pub struct SetHrmpMaxParachainInboundChannels { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25791,11 +23529,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCalls { - pub calls: - ::std::vec::Vec, + pub struct SetHrmpMaxParathreadInboundChannels { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25804,13 +23542,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StartLottery { - pub price: ::core::primitive::u128, - pub length: ::core::primitive::u32, - pub delay: ::core::primitive::u32, - pub repeat: ::core::primitive::bool, + pub struct SetHrmpChannelMaxMessageSize { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25819,120 +23555,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct StopRepeat; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Buy a ticket to enter the lottery."] - #[doc = ""] - #[doc = "This extrinsic acts as a passthrough function for `call`. In all"] - #[doc = "situations where `call` alone would succeed, this extrinsic should"] - #[doc = "succeed."] - #[doc = ""] - #[doc = "If `call` is successful, then we will attempt to purchase a ticket,"] - #[doc = "which may fail silently. To detect success of a ticket purchase, you"] - #[doc = "should listen for the `TicketBought` event."] - #[doc = ""] - #[doc = "This extrinsic must be called by a signed origin."] - pub fn buy_ticket( - &self, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Lottery", - "buy_ticket", - BuyTicket { - call: ::std::boxed::Box::new(call), - }, - [ - 79u8, 217u8, 66u8, 99u8, 216u8, 68u8, 136u8, 171u8, 219u8, - 98u8, 99u8, 197u8, 231u8, 22u8, 46u8, 142u8, 209u8, 64u8, - 131u8, 60u8, 113u8, 91u8, 69u8, 50u8, 231u8, 74u8, 255u8, - 172u8, 165u8, 235u8, 144u8, 92u8, - ], - ) - } - #[doc = "Set calls in storage which can be used to purchase a lottery ticket."] - #[doc = ""] - #[doc = "This function only matters if you use the `ValidateCall` implementation"] - #[doc = "provided by this pallet, which uses storage to determine the valid calls."] - #[doc = ""] - #[doc = "This extrinsic must be called by the Manager origin."] - pub fn set_calls( - &self, - calls: ::std::vec::Vec< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Lottery", - "set_calls", - SetCalls { calls }, - [ - 203u8, 124u8, 79u8, 183u8, 230u8, 227u8, 173u8, 241u8, 93u8, - 30u8, 210u8, 123u8, 71u8, 254u8, 158u8, 165u8, 113u8, 206u8, - 201u8, 1u8, 208u8, 174u8, 246u8, 174u8, 194u8, 28u8, 223u8, - 81u8, 117u8, 26u8, 118u8, 99u8, - ], - ) - } - #[doc = "Start a lottery using the provided configuration."] - #[doc = ""] - #[doc = "This extrinsic must be called by the `ManagerOrigin`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = ""] - #[doc = "* `price`: The cost of a single ticket."] - #[doc = "* `length`: How long the lottery should run for starting at the current block."] - #[doc = "* `delay`: How long after the lottery end we should wait before picking a winner."] - #[doc = "* `repeat`: If the lottery should repeat when completed."] - pub fn start_lottery( - &self, - price: ::core::primitive::u128, - length: ::core::primitive::u32, - delay: ::core::primitive::u32, - repeat: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Lottery", - "start_lottery", - StartLottery { - price, - length, - delay, - repeat, - }, - [ - 4u8, 194u8, 105u8, 75u8, 63u8, 167u8, 224u8, 4u8, 163u8, - 148u8, 96u8, 248u8, 21u8, 190u8, 168u8, 101u8, 207u8, 152u8, - 169u8, 203u8, 180u8, 103u8, 137u8, 151u8, 166u8, 187u8, - 232u8, 219u8, 22u8, 89u8, 206u8, 194u8, - ], - ) - } - #[doc = "If a lottery is repeating, you can use this to stop the repeat."] - #[doc = "The lottery will continue to run to completion."] - #[doc = ""] - #[doc = "This extrinsic must be called by the `ManagerOrigin`."] - pub fn stop_repeat(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Lottery", - "stop_repeat", - StopRepeat {}, - [ - 28u8, 43u8, 248u8, 131u8, 209u8, 84u8, 75u8, 42u8, 22u8, - 180u8, 126u8, 235u8, 116u8, 241u8, 167u8, 161u8, 25u8, 0u8, - 22u8, 207u8, 167u8, 191u8, 89u8, 180u8, 54u8, 25u8, 14u8, - 35u8, 90u8, 244u8, 5u8, 241u8, - ], - ) - } + pub struct SetHrmpMaxParachainOutboundChannels { + pub new: ::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_lottery::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, @@ -25941,13 +23568,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A lottery has been started!"] - pub struct LotteryStarted; - impl ::subxt::events::StaticEvent for LotteryStarted { - const PALLET: &'static str = "Lottery"; - const EVENT: &'static str = "LotteryStarted"; + pub struct SetHrmpMaxParathreadOutboundChannels { + pub new: ::core::primitive::u32, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25956,11 +23581,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new set of calls have been set!"] - pub struct CallsUpdated; - impl ::subxt::events::StaticEvent for CallsUpdated { - const PALLET: &'static str = "Lottery"; - const EVENT: &'static str = "CallsUpdated"; + pub struct SetHrmpMaxMessageNumPerCandidate { + pub new: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -25971,16 +23593,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A winner has been chosen!"] - pub struct Winner { - pub winner: ::subxt::utils::AccountId32, - pub lottery_balance: ::core::primitive::u128, + pub struct SetUmpMaxIndividualWeight { + pub new: runtime_types::sp_weights::weight_v2::Weight, } - impl ::subxt::events::StaticEvent for Winner { - const PALLET: &'static str = "Lottery"; - const EVENT: &'static str = "Winner"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetPvfCheckingEnabled { + pub new: ::core::primitive::bool, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -25989,933 +23618,881 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A ticket has been bought!"] - pub struct TicketBought { - pub who: ::subxt::utils::AccountId32, - pub call_index: (::core::primitive::u8, ::core::primitive::u8), + pub struct SetPvfVotingTtl { + pub new: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetMinimumValidationUpgradeDelay { + pub new: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for TicketBought { - const PALLET: &'static str = "Lottery"; - const EVENT: &'static str = "TicketBought"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SetBypassConsistencyCheck { + pub new: ::core::primitive::bool, } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn lottery_index( + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the validation upgrade cooldown."] + pub fn set_validation_upgrade_cooldown( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "LotteryIndex", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_validation_upgrade_cooldown", + SetValidationUpgradeCooldown { new }, [ - 79u8, 74u8, 246u8, 125u8, 89u8, 183u8, 60u8, 48u8, 34u8, - 211u8, 236u8, 222u8, 23u8, 158u8, 184u8, 140u8, 200u8, 80u8, - 232u8, 5u8, 240u8, 218u8, 70u8, 221u8, 219u8, 1u8, 3u8, - 203u8, 77u8, 3u8, 128u8, 89u8, + 109u8, 185u8, 0u8, 59u8, 177u8, 198u8, 76u8, 90u8, 108u8, + 190u8, 56u8, 126u8, 147u8, 110u8, 76u8, 111u8, 38u8, 200u8, + 230u8, 144u8, 42u8, 167u8, 175u8, 220u8, 102u8, 37u8, 60u8, + 10u8, 118u8, 79u8, 146u8, 203u8, ], ) } - #[doc = " The configuration for the current lottery."] - pub fn lottery( + #[doc = "Set the validation upgrade delay."] + pub fn set_validation_upgrade_delay( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_lottery::LotteryConfig< - ::core::primitive::u32, - ::core::primitive::u128, - >, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "Lottery", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_validation_upgrade_delay", + SetValidationUpgradeDelay { new }, [ - 46u8, 51u8, 122u8, 129u8, 145u8, 2u8, 183u8, 42u8, 184u8, - 167u8, 30u8, 73u8, 175u8, 49u8, 109u8, 166u8, 188u8, 151u8, - 171u8, 8u8, 186u8, 208u8, 227u8, 19u8, 252u8, 141u8, 56u8, - 89u8, 229u8, 139u8, 247u8, 117u8, + 18u8, 130u8, 158u8, 253u8, 160u8, 194u8, 220u8, 120u8, 9u8, + 68u8, 232u8, 176u8, 34u8, 81u8, 200u8, 236u8, 141u8, 139u8, + 62u8, 110u8, 76u8, 9u8, 218u8, 69u8, 55u8, 2u8, 233u8, 109u8, + 83u8, 117u8, 141u8, 253u8, ], ) } - #[doc = " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)"] - pub fn participants( + #[doc = "Set the acceptance period for an included candidate."] + pub fn set_code_retention_period( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u8, - ::core::primitive::u8, - )>, - ), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "Participants", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_code_retention_period", + SetCodeRetentionPeriod { new }, [ - 129u8, 243u8, 95u8, 30u8, 228u8, 183u8, 238u8, 141u8, 77u8, - 8u8, 166u8, 197u8, 168u8, 93u8, 27u8, 40u8, 38u8, 22u8, - 188u8, 55u8, 58u8, 154u8, 122u8, 122u8, 76u8, 57u8, 183u8, - 210u8, 254u8, 185u8, 239u8, 242u8, + 221u8, 140u8, 253u8, 111u8, 64u8, 236u8, 93u8, 52u8, 214u8, + 245u8, 178u8, 30u8, 77u8, 166u8, 242u8, 252u8, 203u8, 106u8, + 12u8, 195u8, 27u8, 159u8, 96u8, 197u8, 145u8, 69u8, 241u8, + 59u8, 74u8, 220u8, 62u8, 205u8, ], ) } - #[doc = " Users who have purchased a ticket. (Lottery Index, Tickets Purchased)"] - pub fn participants_root( + #[doc = "Set the max validation code size for incoming upgrades."] + pub fn set_max_code_size( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - ::core::primitive::u32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u8, - ::core::primitive::u8, - )>, - ), - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "Participants", - Vec::new(), + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_code_size", + SetMaxCodeSize { new }, [ - 129u8, 243u8, 95u8, 30u8, 228u8, 183u8, 238u8, 141u8, 77u8, - 8u8, 166u8, 197u8, 168u8, 93u8, 27u8, 40u8, 38u8, 22u8, - 188u8, 55u8, 58u8, 154u8, 122u8, 122u8, 76u8, 57u8, 183u8, - 210u8, 254u8, 185u8, 239u8, 242u8, + 232u8, 106u8, 45u8, 195u8, 27u8, 162u8, 188u8, 213u8, 137u8, + 13u8, 123u8, 89u8, 215u8, 141u8, 231u8, 82u8, 205u8, 215u8, + 73u8, 142u8, 115u8, 109u8, 132u8, 118u8, 194u8, 211u8, 82u8, + 20u8, 75u8, 55u8, 218u8, 46u8, ], ) } - #[doc = " Total number of tickets sold."] - pub fn tickets_count( + #[doc = "Set the max POV block size for incoming upgrades."] + pub fn set_max_pov_size( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "TicketsCount", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_pov_size", + SetMaxPovSize { new }, [ - 112u8, 164u8, 111u8, 40u8, 98u8, 247u8, 174u8, 117u8, 198u8, - 56u8, 109u8, 205u8, 38u8, 175u8, 118u8, 75u8, 136u8, 86u8, - 95u8, 200u8, 233u8, 199u8, 195u8, 198u8, 161u8, 64u8, 199u8, - 141u8, 125u8, 42u8, 187u8, 40u8, + 15u8, 176u8, 13u8, 19u8, 177u8, 160u8, 211u8, 238u8, 29u8, + 194u8, 187u8, 235u8, 244u8, 65u8, 158u8, 47u8, 102u8, 221u8, + 95u8, 10u8, 21u8, 33u8, 219u8, 234u8, 82u8, 122u8, 75u8, + 53u8, 14u8, 126u8, 218u8, 23u8, ], ) } - #[doc = " Each ticket's owner."] - #[doc = ""] - #[doc = " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones"] - #[doc = " are actually valid ticket mappings."] - pub fn tickets( + #[doc = "Set the max head data size for paras."] + pub fn set_max_head_data_size( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "Tickets", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_head_data_size", + SetMaxHeadDataSize { new }, [ - 146u8, 73u8, 177u8, 170u8, 239u8, 27u8, 41u8, 142u8, 212u8, - 251u8, 124u8, 174u8, 237u8, 255u8, 133u8, 237u8, 34u8, 249u8, - 246u8, 3u8, 153u8, 156u8, 80u8, 244u8, 65u8, 26u8, 106u8, - 234u8, 150u8, 75u8, 93u8, 175u8, + 219u8, 128u8, 213u8, 65u8, 190u8, 224u8, 87u8, 80u8, 172u8, + 112u8, 160u8, 229u8, 52u8, 1u8, 189u8, 125u8, 177u8, 139u8, + 103u8, 39u8, 21u8, 125u8, 62u8, 177u8, 74u8, 25u8, 41u8, + 11u8, 200u8, 79u8, 139u8, 171u8, ], ) } - #[doc = " Each ticket's owner."] - #[doc = ""] - #[doc = " May have residual storage from previous lotteries. Use `TicketsCount` to see which ones"] - #[doc = " are actually valid ticket mappings."] - pub fn tickets_root( + #[doc = "Set the number of parathread execution cores."] + pub fn set_parathread_cores( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "Tickets", - Vec::new(), + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_parathread_cores", + SetParathreadCores { new }, [ - 146u8, 73u8, 177u8, 170u8, 239u8, 27u8, 41u8, 142u8, 212u8, - 251u8, 124u8, 174u8, 237u8, 255u8, 133u8, 237u8, 34u8, 249u8, - 246u8, 3u8, 153u8, 156u8, 80u8, 244u8, 65u8, 26u8, 106u8, - 234u8, 150u8, 75u8, 93u8, 175u8, + 155u8, 102u8, 168u8, 202u8, 236u8, 87u8, 16u8, 128u8, 141u8, + 99u8, 154u8, 162u8, 216u8, 198u8, 236u8, 233u8, 104u8, 230u8, + 137u8, 132u8, 41u8, 106u8, 167u8, 81u8, 195u8, 172u8, 107u8, + 28u8, 138u8, 254u8, 180u8, 61u8, ], ) } - #[doc = " The calls stored in this pallet to be used in an active lottery if configured"] - #[doc = " by `Config::ValidateCall`."] - pub fn call_indices( + #[doc = "Set the number of retries for a particular parathread."] + pub fn set_parathread_retries( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u8, - ::core::primitive::u8, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Lottery", - "CallIndices", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_parathread_retries", + SetParathreadRetries { new }, [ - 244u8, 89u8, 150u8, 164u8, 63u8, 13u8, 41u8, 8u8, 140u8, - 211u8, 163u8, 176u8, 239u8, 120u8, 247u8, 160u8, 131u8, - 116u8, 13u8, 152u8, 154u8, 1u8, 128u8, 128u8, 182u8, 246u8, - 45u8, 106u8, 88u8, 6u8, 135u8, 158u8, + 192u8, 81u8, 152u8, 41u8, 40u8, 3u8, 251u8, 205u8, 244u8, + 133u8, 42u8, 197u8, 21u8, 221u8, 80u8, 196u8, 222u8, 69u8, + 153u8, 39u8, 161u8, 90u8, 4u8, 38u8, 167u8, 131u8, 237u8, + 42u8, 135u8, 37u8, 156u8, 108u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The Lottery's pallet id"] - pub fn pallet_id( + #[doc = "Set the parachain validator-group rotation frequency"] + pub fn set_group_rotation_frequency( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( - "Lottery", - "PalletId", + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_group_rotation_frequency", + SetGroupRotationFrequency { new }, [ - 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, + 205u8, 222u8, 129u8, 36u8, 136u8, 186u8, 114u8, 70u8, 214u8, + 22u8, 112u8, 65u8, 56u8, 42u8, 103u8, 93u8, 108u8, 242u8, + 188u8, 229u8, 150u8, 19u8, 12u8, 222u8, 25u8, 254u8, 48u8, + 218u8, 200u8, 208u8, 132u8, 251u8, ], ) } - #[doc = " The max number of calls available in a single lottery."] - pub fn max_calls( + #[doc = "Set the availability period for parachains."] + pub fn set_chain_availability_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_chain_availability_period", + SetChainAvailabilityPeriod { new }, + [ + 171u8, 21u8, 54u8, 241u8, 19u8, 100u8, 54u8, 143u8, 97u8, + 191u8, 193u8, 96u8, 7u8, 86u8, 255u8, 109u8, 255u8, 93u8, + 113u8, 28u8, 182u8, 75u8, 120u8, 208u8, 91u8, 125u8, 156u8, + 38u8, 56u8, 230u8, 24u8, 139u8, + ], + ) + } + #[doc = "Set the availability period for parathreads."] + pub fn set_thread_availability_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_thread_availability_period", + SetThreadAvailabilityPeriod { new }, + [ + 208u8, 27u8, 246u8, 33u8, 90u8, 200u8, 75u8, 177u8, 19u8, + 107u8, 236u8, 43u8, 159u8, 156u8, 184u8, 10u8, 146u8, 71u8, + 212u8, 129u8, 44u8, 19u8, 162u8, 172u8, 162u8, 46u8, 166u8, + 10u8, 67u8, 112u8, 206u8, 50u8, + ], + ) + } + #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] + pub fn set_scheduling_lookahead( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_scheduling_lookahead", + SetSchedulingLookahead { new }, + [ + 220u8, 74u8, 0u8, 150u8, 45u8, 29u8, 56u8, 210u8, 66u8, 12u8, + 119u8, 176u8, 103u8, 24u8, 216u8, 55u8, 211u8, 120u8, 233u8, + 204u8, 167u8, 100u8, 199u8, 157u8, 186u8, 174u8, 40u8, 218u8, + 19u8, 230u8, 253u8, 7u8, + ], + ) + } + #[doc = "Set the maximum number of validators to assign to any core."] + pub fn set_max_validators_per_core( + &self, + new: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_validators_per_core", + SetMaxValidatorsPerCore { new }, + [ + 227u8, 113u8, 192u8, 116u8, 114u8, 171u8, 27u8, 22u8, 84u8, + 117u8, 146u8, 152u8, 94u8, 101u8, 14u8, 52u8, 228u8, 170u8, + 163u8, 82u8, 248u8, 130u8, 32u8, 103u8, 225u8, 151u8, 145u8, + 36u8, 98u8, 158u8, 6u8, 245u8, + ], + ) + } + #[doc = "Set the maximum number of validators to use in parachain consensus."] + pub fn set_max_validators( + &self, + new: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_validators", + SetMaxValidators { new }, + [ + 143u8, 212u8, 59u8, 147u8, 4u8, 55u8, 142u8, 209u8, 237u8, + 76u8, 7u8, 178u8, 41u8, 81u8, 4u8, 203u8, 184u8, 149u8, 32u8, + 1u8, 106u8, 180u8, 121u8, 20u8, 137u8, 169u8, 144u8, 77u8, + 38u8, 53u8, 243u8, 127u8, + ], + ) + } + #[doc = "Set the dispute period, in number of sessions to keep for disputes."] + pub fn set_dispute_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_period", + SetDisputePeriod { new }, + [ + 36u8, 191u8, 142u8, 240u8, 48u8, 101u8, 10u8, 197u8, 117u8, + 125u8, 156u8, 189u8, 130u8, 77u8, 242u8, 130u8, 205u8, 154u8, + 152u8, 47u8, 75u8, 56u8, 63u8, 61u8, 33u8, 163u8, 151u8, + 97u8, 105u8, 99u8, 55u8, 180u8, + ], + ) + } + #[doc = "Set the dispute post conclusion acceptance period."] + pub fn set_dispute_post_conclusion_acceptance_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Lottery", - "MaxCalls", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_post_conclusion_acceptance_period", + SetDisputePostConclusionAcceptancePeriod { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 66u8, 56u8, 45u8, 87u8, 51u8, 49u8, 91u8, 95u8, 255u8, 185u8, + 54u8, 165u8, 85u8, 142u8, 238u8, 251u8, 174u8, 81u8, 3u8, + 61u8, 92u8, 97u8, 203u8, 20u8, 107u8, 50u8, 208u8, 250u8, + 208u8, 159u8, 225u8, 175u8, ], ) } - #[doc = " Number of time we should try to generate a random number that has no modulo bias."] - #[doc = " The larger this number, the more potential computation is used for picking the winner,"] - #[doc = " but also the more likely that the chosen winner is done fairly."] - pub fn max_generate_random( + #[doc = "Set the maximum number of dispute spam slots."] + pub fn set_dispute_max_spam_slots( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_max_spam_slots", + SetDisputeMaxSpamSlots { new }, + [ + 177u8, 58u8, 3u8, 205u8, 145u8, 85u8, 160u8, 162u8, 13u8, + 171u8, 124u8, 54u8, 58u8, 209u8, 88u8, 131u8, 230u8, 248u8, + 142u8, 18u8, 121u8, 129u8, 196u8, 121u8, 25u8, 15u8, 252u8, + 229u8, 89u8, 230u8, 14u8, 68u8, + ], + ) + } + #[doc = "Set the dispute conclusion by time out period."] + pub fn set_dispute_conclusion_by_time_out_period( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Lottery", - "MaxGenerateRandom", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_dispute_conclusion_by_time_out_period", + SetDisputeConclusionByTimeOutPeriod { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 238u8, 102u8, 27u8, 169u8, 68u8, 116u8, 198u8, 64u8, 190u8, + 33u8, 36u8, 98u8, 176u8, 157u8, 123u8, 148u8, 126u8, 85u8, + 32u8, 19u8, 49u8, 40u8, 172u8, 41u8, 195u8, 182u8, 44u8, + 255u8, 136u8, 204u8, 250u8, 6u8, ], ) } - } - } - } - pub mod nis { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlaceBid { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub duration: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RetractBid { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub duration: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FundDeficit; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Thaw { - #[codec(compact)] - pub index: ::core::primitive::u32, - pub portion: ::core::option::Option<::core::primitive::u128>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Place a bid."] - #[doc = ""] - #[doc = "Origin must be Signed, and account must have at least `amount` in free balance."] - #[doc = ""] - #[doc = "- `amount`: The amount of the bid; these funds will be reserved, and if/when"] - #[doc = " consolidated, removed. Must be at least `MinBid`."] - #[doc = "- `duration`: The number of periods before which the newly consolidated bid may be"] - #[doc = " thawed. Must be greater than 1 and no more than `QueueCount`."] - #[doc = ""] - #[doc = "Complexities:"] - #[doc = "- `Queues[duration].len()` (just take max)."] - pub fn place_bid( + #[doc = "Set the no show slots, in number of number of consensus slots."] + #[doc = "Must be at least 1."] + pub fn set_no_show_slots( &self, - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nis", - "place_bid", - PlaceBid { amount, duration }, + "Configuration", + "set_no_show_slots", + SetNoShowSlots { new }, [ - 197u8, 16u8, 24u8, 59u8, 72u8, 162u8, 72u8, 124u8, 149u8, - 28u8, 208u8, 47u8, 208u8, 0u8, 110u8, 122u8, 32u8, 225u8, - 29u8, 21u8, 144u8, 75u8, 138u8, 188u8, 213u8, 188u8, 34u8, - 231u8, 52u8, 191u8, 210u8, 158u8, + 94u8, 230u8, 89u8, 131u8, 188u8, 246u8, 251u8, 34u8, 249u8, + 16u8, 134u8, 63u8, 238u8, 115u8, 19u8, 97u8, 97u8, 218u8, + 238u8, 115u8, 126u8, 140u8, 236u8, 17u8, 177u8, 192u8, 210u8, + 239u8, 126u8, 107u8, 117u8, 207u8, ], ) } - #[doc = "Retract a previously placed bid."] - #[doc = ""] - #[doc = "Origin must be Signed, and the account should have previously issued a still-active bid"] - #[doc = "of `amount` for `duration`."] - #[doc = ""] - #[doc = "- `amount`: The amount of the previous bid."] - #[doc = "- `duration`: The duration of the previous bid."] - pub fn retract_bid( + #[doc = "Set the total number of delay tranches."] + pub fn set_n_delay_tranches( &self, - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nis", - "retract_bid", - RetractBid { amount, duration }, + "Configuration", + "set_n_delay_tranches", + SetNDelayTranches { new }, [ - 139u8, 141u8, 178u8, 24u8, 250u8, 206u8, 70u8, 51u8, 249u8, - 82u8, 172u8, 68u8, 157u8, 50u8, 110u8, 233u8, 163u8, 46u8, - 204u8, 54u8, 154u8, 20u8, 18u8, 205u8, 137u8, 95u8, 187u8, - 74u8, 250u8, 161u8, 220u8, 22u8, + 195u8, 168u8, 178u8, 51u8, 20u8, 107u8, 227u8, 236u8, 57u8, + 30u8, 130u8, 93u8, 149u8, 2u8, 161u8, 66u8, 48u8, 37u8, 71u8, + 108u8, 195u8, 65u8, 153u8, 30u8, 181u8, 181u8, 158u8, 252u8, + 120u8, 119u8, 36u8, 146u8, ], ) } - #[doc = "Ensure we have sufficient funding for all potential payouts."] - #[doc = ""] - #[doc = "- `origin`: Must be accepted by `FundOrigin`."] - pub fn fund_deficit(&self) -> ::subxt::tx::Payload { + #[doc = "Set the zeroth delay tranche width."] + pub fn set_zeroth_delay_tranche_width( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nis", - "fund_deficit", - FundDeficit {}, + "Configuration", + "set_zeroth_delay_tranche_width", + SetZerothDelayTrancheWidth { new }, [ - 70u8, 45u8, 215u8, 5u8, 225u8, 2u8, 127u8, 191u8, 36u8, - 210u8, 1u8, 35u8, 22u8, 17u8, 187u8, 237u8, 241u8, 245u8, - 168u8, 204u8, 112u8, 25u8, 55u8, 124u8, 12u8, 26u8, 149u8, - 7u8, 26u8, 248u8, 190u8, 125u8, + 69u8, 56u8, 125u8, 24u8, 181u8, 62u8, 99u8, 92u8, 166u8, + 107u8, 91u8, 134u8, 230u8, 128u8, 214u8, 135u8, 245u8, 64u8, + 62u8, 78u8, 96u8, 231u8, 195u8, 29u8, 158u8, 113u8, 46u8, + 96u8, 29u8, 0u8, 154u8, 80u8, ], ) } - #[doc = "Reduce or remove an outstanding receipt, placing the according proportion of funds into"] - #[doc = "the account of the owner."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed and the account must be the owner of the receipt `index` as"] - #[doc = " well as any fungible counterpart."] - #[doc = "- `index`: The index of the receipt."] - #[doc = "- `portion`: If `Some`, then only the given portion of the receipt should be thawed. If"] - #[doc = " `None`, then all of it should be."] - pub fn thaw( + #[doc = "Set the number of validators needed to approve a block."] + pub fn set_needed_approvals( &self, - index: ::core::primitive::u32, - portion: ::core::option::Option<::core::primitive::u128>, - ) -> ::subxt::tx::Payload { + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nis", - "thaw", - Thaw { index, portion }, + "Configuration", + "set_needed_approvals", + SetNeededApprovals { new }, [ - 34u8, 100u8, 241u8, 244u8, 68u8, 188u8, 12u8, 217u8, 192u8, - 173u8, 139u8, 114u8, 120u8, 167u8, 231u8, 227u8, 76u8, 125u8, - 28u8, 138u8, 19u8, 252u8, 29u8, 197u8, 228u8, 89u8, 74u8, - 145u8, 250u8, 41u8, 179u8, 192u8, + 238u8, 55u8, 134u8, 30u8, 67u8, 153u8, 150u8, 5u8, 226u8, + 227u8, 185u8, 188u8, 66u8, 60u8, 147u8, 118u8, 46u8, 174u8, + 104u8, 100u8, 26u8, 162u8, 65u8, 58u8, 162u8, 52u8, 211u8, + 66u8, 242u8, 177u8, 230u8, 98u8, ], ) } - } - } - #[doc = "\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_nis::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bid was successfully placed."] - pub struct BidPlaced { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub duration: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BidPlaced { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "BidPlaced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bid was successfully removed (before being accepted)."] - pub struct BidRetracted { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub duration: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BidRetracted { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "BidRetracted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bid was dropped from a queue because of another, more substantial, bid was present."] - pub struct BidDropped { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - pub duration: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for BidDropped { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "BidDropped"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A bid was accepted. The balance may not be released until expiry."] - pub struct Issued { - pub index: ::core::primitive::u32, - pub expiry: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "Issued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An receipt has been (at least partially) thawed."] - pub struct Thawed { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, - pub amount: ::core::primitive::u128, - pub dropped: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Thawed { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "Thawed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An automatic funding of the deficit was made."] - pub struct Funded { - pub deficit: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Funded { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "Funded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A receipt was transfered."] - pub struct Transferred { - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Transferred { - const PALLET: &'static str = "Nis"; - const EVENT: &'static str = "Transferred"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The totals of items and balances within each queue. Saves a lot of storage reads in the"] - #[doc = " case of sparsely packed queues."] - #[doc = ""] - #[doc = " The vector is indexed by duration in `Period`s, offset by one, so information on the queue"] - #[doc = " whose duration is one `Period` would be storage `0`."] - pub fn queue_totals( + #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] + pub fn set_relay_vrf_modulo_samples( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u128, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "QueueTotals", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_relay_vrf_modulo_samples", + SetRelayVrfModuloSamples { new }, [ - 230u8, 24u8, 0u8, 151u8, 63u8, 26u8, 180u8, 81u8, 179u8, - 26u8, 176u8, 46u8, 2u8, 91u8, 250u8, 210u8, 212u8, 27u8, - 47u8, 228u8, 2u8, 51u8, 64u8, 7u8, 218u8, 130u8, 210u8, 7u8, - 92u8, 102u8, 184u8, 227u8, + 76u8, 101u8, 207u8, 184u8, 211u8, 8u8, 43u8, 4u8, 165u8, + 147u8, 166u8, 3u8, 189u8, 42u8, 125u8, 130u8, 21u8, 43u8, + 189u8, 120u8, 239u8, 131u8, 235u8, 35u8, 151u8, 15u8, 30u8, + 81u8, 0u8, 2u8, 64u8, 21u8, ], ) } - #[doc = " The queues of bids. Indexed by duration (in `Period`s)."] - pub fn queues( + #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] + pub fn set_max_upward_queue_count( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_nis::pallet::Bid< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "Queues", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_queue_count", + SetMaxUpwardQueueCount { new }, [ - 11u8, 50u8, 58u8, 232u8, 240u8, 243u8, 90u8, 103u8, 252u8, - 238u8, 15u8, 75u8, 189u8, 241u8, 231u8, 50u8, 194u8, 134u8, - 162u8, 220u8, 97u8, 217u8, 215u8, 135u8, 138u8, 189u8, 167u8, - 15u8, 162u8, 247u8, 6u8, 74u8, + 116u8, 186u8, 216u8, 17u8, 150u8, 187u8, 86u8, 154u8, 92u8, + 122u8, 178u8, 167u8, 215u8, 165u8, 55u8, 86u8, 229u8, 114u8, + 10u8, 149u8, 50u8, 183u8, 165u8, 32u8, 233u8, 105u8, 82u8, + 177u8, 120u8, 25u8, 44u8, 130u8, ], ) } - #[doc = " The queues of bids. Indexed by duration (in `Period`s)."] - pub fn queues_root( + #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] + pub fn set_max_upward_queue_size( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_nis::pallet::Bid< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "Queues", - Vec::new(), + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_queue_size", + SetMaxUpwardQueueSize { new }, [ - 11u8, 50u8, 58u8, 232u8, 240u8, 243u8, 90u8, 103u8, 252u8, - 238u8, 15u8, 75u8, 189u8, 241u8, 231u8, 50u8, 194u8, 134u8, - 162u8, 220u8, 97u8, 217u8, 215u8, 135u8, 138u8, 189u8, 167u8, - 15u8, 162u8, 247u8, 6u8, 74u8, + 18u8, 60u8, 141u8, 57u8, 134u8, 96u8, 140u8, 85u8, 137u8, + 9u8, 209u8, 123u8, 10u8, 165u8, 33u8, 184u8, 34u8, 82u8, + 59u8, 60u8, 30u8, 47u8, 22u8, 163u8, 119u8, 200u8, 197u8, + 192u8, 112u8, 243u8, 156u8, 12u8, ], ) } - #[doc = " Summary information over the general state."] - pub fn summary( + #[doc = "Set the critical downward message size."] + pub fn set_max_downward_message_size( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nis::pallet::SummaryRecord< - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "Summary", - vec![], + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_downward_message_size", + SetMaxDownwardMessageSize { new }, [ - 169u8, 255u8, 214u8, 207u8, 179u8, 114u8, 114u8, 194u8, - 239u8, 197u8, 161u8, 209u8, 15u8, 176u8, 220u8, 190u8, 146u8, - 97u8, 71u8, 153u8, 84u8, 143u8, 121u8, 111u8, 12u8, 234u8, - 251u8, 71u8, 190u8, 22u8, 138u8, 89u8, + 104u8, 25u8, 229u8, 184u8, 53u8, 246u8, 206u8, 180u8, 13u8, + 156u8, 14u8, 224u8, 215u8, 115u8, 104u8, 127u8, 167u8, 189u8, + 239u8, 183u8, 68u8, 124u8, 55u8, 211u8, 186u8, 115u8, 70u8, + 195u8, 61u8, 151u8, 32u8, 218u8, ], ) } - #[doc = " The currently outstanding receipts, indexed according to the order of creation."] - pub fn receipts( + #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] + pub fn set_ump_service_total_weight( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nis::pallet::ReceiptRecord< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "Receipts", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], + new: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_ump_service_total_weight", + SetUmpServiceTotalWeight { new }, [ - 206u8, 83u8, 28u8, 145u8, 57u8, 73u8, 165u8, 239u8, 15u8, - 178u8, 3u8, 56u8, 4u8, 223u8, 219u8, 14u8, 196u8, 197u8, - 104u8, 167u8, 33u8, 163u8, 26u8, 162u8, 107u8, 146u8, 208u8, - 242u8, 60u8, 66u8, 218u8, 3u8, + 178u8, 63u8, 233u8, 183u8, 160u8, 109u8, 10u8, 162u8, 150u8, + 110u8, 66u8, 166u8, 197u8, 207u8, 91u8, 208u8, 137u8, 106u8, + 140u8, 184u8, 35u8, 85u8, 138u8, 49u8, 32u8, 15u8, 150u8, + 136u8, 50u8, 197u8, 21u8, 99u8, ], ) } - #[doc = " The currently outstanding receipts, indexed according to the order of creation."] - pub fn receipts_root( + #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] + pub fn set_max_upward_message_size( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nis::pallet::ReceiptRecord< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nis", - "Receipts", - Vec::new(), + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_message_size", + SetMaxUpwardMessageSize { new }, [ - 206u8, 83u8, 28u8, 145u8, 57u8, 73u8, 165u8, 239u8, 15u8, - 178u8, 3u8, 56u8, 4u8, 223u8, 219u8, 14u8, 196u8, 197u8, - 104u8, 167u8, 33u8, 163u8, 26u8, 162u8, 107u8, 146u8, 208u8, - 242u8, 60u8, 66u8, 218u8, 3u8, + 213u8, 120u8, 21u8, 247u8, 101u8, 21u8, 164u8, 228u8, 33u8, + 115u8, 20u8, 138u8, 28u8, 174u8, 247u8, 39u8, 194u8, 113u8, + 34u8, 73u8, 142u8, 94u8, 116u8, 151u8, 113u8, 92u8, 151u8, + 227u8, 116u8, 250u8, 101u8, 179u8, ], ) } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] - pub fn pallet_id( + #[doc = "Sets the maximum number of messages that a candidate can contain."] + pub fn set_max_upward_message_num_per_candidate( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "PalletId", + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload + { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_max_upward_message_num_per_candidate", + SetMaxUpwardMessageNumPerCandidate { new }, [ - 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, + 54u8, 133u8, 226u8, 138u8, 184u8, 27u8, 130u8, 153u8, 130u8, + 196u8, 54u8, 79u8, 124u8, 10u8, 37u8, 139u8, 59u8, 190u8, + 169u8, 87u8, 255u8, 211u8, 38u8, 142u8, 37u8, 74u8, 144u8, + 204u8, 75u8, 94u8, 154u8, 149u8, ], ) } - #[doc = " Number of duration queues in total. This sets the maximum duration supported, which is"] - #[doc = " this value multiplied by `Period`."] - pub fn queue_count( + #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] + pub fn set_hrmp_open_request_ttl( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_open_request_ttl", + SetHrmpOpenRequestTtl { new }, + [ + 192u8, 113u8, 113u8, 133u8, 197u8, 75u8, 88u8, 67u8, 130u8, + 207u8, 37u8, 192u8, 157u8, 159u8, 114u8, 75u8, 83u8, 180u8, + 194u8, 180u8, 96u8, 129u8, 7u8, 138u8, 110u8, 14u8, 229u8, + 98u8, 71u8, 22u8, 229u8, 247u8, + ], + ) + } + #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] + pub fn set_hrmp_sender_deposit( + &self, + new: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_sender_deposit", + SetHrmpSenderDeposit { new }, + [ + 49u8, 38u8, 173u8, 114u8, 66u8, 140u8, 15u8, 151u8, 193u8, + 54u8, 128u8, 108u8, 72u8, 71u8, 28u8, 65u8, 129u8, 199u8, + 105u8, 61u8, 96u8, 119u8, 16u8, 53u8, 115u8, 120u8, 152u8, + 122u8, 182u8, 171u8, 233u8, 48u8, + ], + ) + } + #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] + #[doc = "channel."] + pub fn set_hrmp_recipient_deposit( + &self, + new: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_recipient_deposit", + SetHrmpRecipientDeposit { new }, + [ + 209u8, 212u8, 164u8, 56u8, 71u8, 215u8, 98u8, 250u8, 202u8, + 150u8, 228u8, 6u8, 166u8, 94u8, 171u8, 142u8, 10u8, 253u8, + 89u8, 43u8, 6u8, 173u8, 8u8, 235u8, 52u8, 18u8, 78u8, 129u8, + 227u8, 61u8, 74u8, 83u8, + ], + ) + } + #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] + pub fn set_hrmp_channel_max_capacity( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_capacity", + SetHrmpChannelMaxCapacity { new }, + [ + 148u8, 109u8, 67u8, 220u8, 1u8, 115u8, 70u8, 93u8, 138u8, + 190u8, 60u8, 220u8, 80u8, 137u8, 246u8, 230u8, 115u8, 162u8, + 30u8, 197u8, 11u8, 33u8, 211u8, 224u8, 49u8, 165u8, 149u8, + 155u8, 197u8, 44u8, 6u8, 167u8, + ], + ) + } + #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] + pub fn set_hrmp_channel_max_total_size( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_total_size", + SetHrmpChannelMaxTotalSize { new }, + [ + 79u8, 40u8, 207u8, 173u8, 168u8, 143u8, 130u8, 240u8, 205u8, + 34u8, 61u8, 217u8, 215u8, 106u8, 61u8, 181u8, 8u8, 21u8, + 105u8, 64u8, 183u8, 235u8, 39u8, 133u8, 70u8, 77u8, 233u8, + 201u8, 222u8, 8u8, 43u8, 159u8, + ], + ) + } + #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] + pub fn set_hrmp_max_parachain_inbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "QueueCount", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parachain_inbound_channels", + SetHrmpMaxParachainInboundChannels { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 91u8, 215u8, 212u8, 131u8, 140u8, 185u8, 119u8, 184u8, 61u8, + 121u8, 120u8, 73u8, 202u8, 98u8, 124u8, 187u8, 171u8, 84u8, + 136u8, 77u8, 103u8, 169u8, 185u8, 8u8, 214u8, 214u8, 23u8, + 195u8, 100u8, 72u8, 45u8, 12u8, ], ) } - #[doc = " Maximum number of items that may be in each duration queue."] - #[doc = ""] - #[doc = " Must be larger than zero."] - pub fn max_queue_len( + #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] + pub fn set_hrmp_max_parathread_inbound_channels( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "MaxQueueLen", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parathread_inbound_channels", + SetHrmpMaxParathreadInboundChannels { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 209u8, 66u8, 180u8, 20u8, 87u8, 242u8, 219u8, 71u8, 22u8, + 145u8, 220u8, 48u8, 44u8, 42u8, 77u8, 69u8, 255u8, 82u8, + 27u8, 125u8, 231u8, 111u8, 23u8, 32u8, 239u8, 28u8, 200u8, + 255u8, 91u8, 207u8, 99u8, 107u8, ], ) } - #[doc = " Portion of the queue which is free from ordering and just a FIFO."] - #[doc = ""] - #[doc = " Must be no greater than `MaxQueueLen`."] - pub fn fifo_queue_len( + #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] + pub fn set_hrmp_channel_max_message_size( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_channel_max_message_size", + SetHrmpChannelMaxMessageSize { new }, + [ + 17u8, 224u8, 230u8, 9u8, 114u8, 221u8, 138u8, 46u8, 234u8, + 151u8, 27u8, 34u8, 179u8, 67u8, 113u8, 228u8, 128u8, 212u8, + 209u8, 125u8, 122u8, 1u8, 79u8, 28u8, 10u8, 14u8, 83u8, 65u8, + 253u8, 173u8, 116u8, 209u8, + ], + ) + } + #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] + pub fn set_hrmp_max_parachain_outbound_channels( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "FifoQueueLen", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parachain_outbound_channels", + SetHrmpMaxParachainOutboundChannels { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 26u8, 146u8, 150u8, 88u8, 236u8, 8u8, 63u8, 103u8, 71u8, + 11u8, 20u8, 210u8, 205u8, 106u8, 101u8, 112u8, 116u8, 73u8, + 116u8, 136u8, 149u8, 181u8, 207u8, 95u8, 151u8, 7u8, 98u8, + 17u8, 224u8, 157u8, 117u8, 88u8, ], ) } - #[doc = " The base period for the duration queues. This is the common multiple across all"] - #[doc = " supported freezing durations that can be bid upon."] - pub fn base_period( + #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] + pub fn set_hrmp_max_parathread_outbound_channels( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "BasePeriod", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_parathread_outbound_channels", + SetHrmpMaxParathreadOutboundChannels { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 31u8, 72u8, 93u8, 21u8, 180u8, 156u8, 101u8, 24u8, 145u8, + 220u8, 194u8, 93u8, 176u8, 164u8, 53u8, 123u8, 36u8, 113u8, + 152u8, 13u8, 222u8, 54u8, 175u8, 170u8, 235u8, 68u8, 236u8, + 130u8, 178u8, 56u8, 140u8, 31u8, ], ) } - #[doc = " The minimum amount of funds that may be placed in a bid. Note that this"] - #[doc = " does not actually limit the amount which may be represented in a receipt since bids may"] - #[doc = " be split up by the system."] - #[doc = ""] - #[doc = " It should be at least big enough to ensure that there is no possible storage spam attack"] - #[doc = " or queue-filling attack."] - pub fn min_bid( + #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] + pub fn set_hrmp_max_message_num_per_candidate( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "MinBid", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_hrmp_max_message_num_per_candidate", + SetHrmpMaxMessageNumPerCandidate { new }, [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 244u8, 94u8, 225u8, 194u8, 133u8, 116u8, 202u8, 238u8, 8u8, + 57u8, 122u8, 125u8, 6u8, 131u8, 84u8, 102u8, 180u8, 67u8, + 250u8, 136u8, 30u8, 29u8, 110u8, 105u8, 219u8, 166u8, 91u8, + 140u8, 44u8, 192u8, 37u8, 185u8, ], ) } - #[doc = " The minimum amount of funds which may intentionally be left remaining under a single"] - #[doc = " receipt."] - pub fn min_receipt( + #[doc = "Sets the maximum amount of weight any individual upward message may consume."] + pub fn set_ump_max_individual_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_arithmetic::per_things::Perquintill, - > { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "MinReceipt", + new: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_ump_max_individual_weight", + SetUmpMaxIndividualWeight { new }, + [ + 66u8, 190u8, 15u8, 172u8, 67u8, 16u8, 117u8, 247u8, 176u8, + 25u8, 163u8, 130u8, 147u8, 224u8, 226u8, 101u8, 219u8, 173u8, + 176u8, 49u8, 90u8, 133u8, 12u8, 223u8, 220u8, 18u8, 83u8, + 232u8, 137u8, 52u8, 206u8, 71u8, + ], + ) + } + #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] + pub fn set_pvf_checking_enabled( + &self, + new: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_pvf_checking_enabled", + SetPvfCheckingEnabled { new }, + [ + 123u8, 76u8, 1u8, 112u8, 174u8, 245u8, 18u8, 67u8, 13u8, + 29u8, 219u8, 197u8, 201u8, 112u8, 230u8, 191u8, 37u8, 148u8, + 73u8, 125u8, 54u8, 236u8, 3u8, 80u8, 114u8, 155u8, 244u8, + 132u8, 57u8, 63u8, 158u8, 248u8, + ], + ) + } + #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] + pub fn set_pvf_voting_ttl( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_pvf_voting_ttl", + SetPvfVotingTtl { new }, [ - 6u8, 4u8, 24u8, 100u8, 110u8, 86u8, 4u8, 252u8, 70u8, 43u8, - 169u8, 124u8, 204u8, 27u8, 252u8, 91u8, 99u8, 13u8, 149u8, - 202u8, 65u8, 211u8, 125u8, 108u8, 127u8, 4u8, 146u8, 163u8, - 41u8, 193u8, 25u8, 103u8, + 17u8, 11u8, 98u8, 217u8, 208u8, 102u8, 238u8, 83u8, 118u8, + 123u8, 20u8, 18u8, 46u8, 212u8, 21u8, 164u8, 61u8, 104u8, + 208u8, 204u8, 91u8, 210u8, 40u8, 6u8, 201u8, 147u8, 46u8, + 166u8, 219u8, 227u8, 121u8, 187u8, ], ) } - #[doc = " The number of blocks between consecutive attempts to dequeue bids and create receipts."] + #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] + #[doc = "upgrade taking place."] #[doc = ""] - #[doc = " A larger value results in fewer storage hits each block, but a slower period to get to"] - #[doc = " the target."] - pub fn intake_period( + #[doc = "See the field documentation for information and constraints for the new value."] + pub fn set_minimum_validation_upgrade_delay( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + new: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "IntakePeriod", + ::subxt::tx::Payload::new_static( + "Configuration", + "set_minimum_validation_upgrade_delay", + SetMinimumValidationUpgradeDelay { new }, [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 205u8, 188u8, 75u8, 136u8, 228u8, 26u8, 112u8, 27u8, 119u8, + 37u8, 252u8, 109u8, 23u8, 145u8, 21u8, 212u8, 7u8, 28u8, + 242u8, 210u8, 182u8, 111u8, 121u8, 109u8, 50u8, 130u8, 46u8, + 127u8, 122u8, 40u8, 141u8, 242u8, ], ) } - #[doc = " The maximum amount of bids that can consolidated into receipts in a single intake. A"] - #[doc = " larger value here means less of the block available for transactions should there be a"] - #[doc = " glut of bids."] - pub fn max_intake_weight( + #[doc = "Setting this to true will disable consistency checks for the configuration setters."] + #[doc = "Use with caution."] + pub fn set_bypass_consistency_check( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_weights::weight_v2::Weight, - > { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "MaxIntakeWeight", + new: ::core::primitive::bool, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Configuration", + "set_bypass_consistency_check", + SetBypassConsistencyCheck { new }, [ - 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, + 80u8, 66u8, 200u8, 98u8, 54u8, 207u8, 64u8, 99u8, 162u8, + 121u8, 26u8, 173u8, 113u8, 224u8, 240u8, 106u8, 69u8, 191u8, + 177u8, 107u8, 34u8, 74u8, 103u8, 128u8, 252u8, 160u8, 169u8, + 246u8, 125u8, 127u8, 153u8, 129u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The active configuration for the current session."] pub fn active_config (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "Configuration", + "ActiveConfig", + vec![], + [ + 152u8, 7u8, 210u8, 144u8, 253u8, 1u8, 141u8, 200u8, 122u8, + 214u8, 104u8, 100u8, 228u8, 235u8, 16u8, 86u8, 213u8, 212u8, + 204u8, 46u8, 74u8, 95u8, 217u8, 3u8, 40u8, 28u8, 149u8, + 175u8, 7u8, 146u8, 24u8, 3u8, + ], + ) + } + #[doc = " Pending configuration changes."] + #[doc = ""] + #[doc = " This is a list of configuration changes, each with a session index at which it should"] + #[doc = " be applied."] + #[doc = ""] + #[doc = " The list is sorted ascending by session index. Also, this list can only contain at most"] + #[doc = " 2 items: for the next session and for the `scheduled_session`."] pub fn pending_configs (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "Configuration", + "PendingConfigs", + vec![], + [ + 206u8, 161u8, 39u8, 154u8, 62u8, 215u8, 33u8, 93u8, 214u8, + 37u8, 29u8, 71u8, 32u8, 176u8, 87u8, 166u8, 39u8, 11u8, 81u8, + 155u8, 174u8, 118u8, 138u8, 76u8, 22u8, 248u8, 148u8, 210u8, + 243u8, 41u8, 111u8, 216u8, ], ) } - #[doc = " The maximum proportion which may be thawed and the period over which it is reset."] - pub fn thaw_throttle( + #[doc = " If this is set, then the configuration setters will bypass the consistency checks. This"] + #[doc = " is meant to be used only as the last resort."] + pub fn bypass_consistency_check( &self, - ) -> ::subxt::constants::StaticConstantAddress<( - runtime_types::sp_arithmetic::per_things::Perquintill, - ::core::primitive::u32, - )> { - ::subxt::constants::StaticConstantAddress::new( - "Nis", - "ThawThrottle", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::bool, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Configuration", + "BypassConsistencyCheck", + vec![], [ - 186u8, 73u8, 125u8, 166u8, 127u8, 250u8, 1u8, 100u8, 253u8, - 174u8, 176u8, 185u8, 210u8, 229u8, 218u8, 53u8, 27u8, 72u8, - 79u8, 130u8, 87u8, 138u8, 50u8, 139u8, 205u8, 79u8, 190u8, - 58u8, 140u8, 68u8, 70u8, 16u8, + 42u8, 191u8, 122u8, 163u8, 112u8, 2u8, 148u8, 59u8, 79u8, + 219u8, 184u8, 172u8, 246u8, 136u8, 185u8, 251u8, 189u8, + 226u8, 83u8, 129u8, 162u8, 109u8, 148u8, 75u8, 120u8, 216u8, + 44u8, 28u8, 221u8, 78u8, 177u8, 94u8, ], ) } } } } - pub mod uniques { + pub mod paras_shared { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -26923,52 +24500,104 @@ pub mod api { use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - pub collection: ::core::primitive::u32, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCreate { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + pub struct TransactionApi; + impl TransactionApi {} + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The current session index."] + pub fn current_session_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, - >, - pub free_holding: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Destroy { - pub collection: ::core::primitive::u32, - pub witness: runtime_types::pallet_uniques::types::DestroyWitness, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "CurrentSessionIndex", + vec![], + [ + 83u8, 15u8, 20u8, 55u8, 103u8, 65u8, 76u8, 202u8, 69u8, 14u8, + 221u8, 93u8, 38u8, 163u8, 167u8, 83u8, 18u8, 245u8, 33u8, + 175u8, 7u8, 97u8, 67u8, 186u8, 96u8, 57u8, 147u8, 120u8, + 107u8, 91u8, 147u8, 64u8, + ], + ) + } + #[doc = " All the validators actively participating in parachain consensus."] + #[doc = " Indices are into the broader validator set."] + pub fn active_validator_indices( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "ActiveValidatorIndices", + vec![], + [ + 123u8, 26u8, 202u8, 53u8, 219u8, 42u8, 54u8, 92u8, 144u8, + 74u8, 228u8, 234u8, 129u8, 216u8, 161u8, 98u8, 199u8, 12u8, + 13u8, 231u8, 23u8, 166u8, 185u8, 209u8, 191u8, 33u8, 231u8, + 252u8, 232u8, 44u8, 213u8, 221u8, + ], + ) + } + #[doc = " The parachain attestation keys of the validators actively participating in parachain consensus."] + #[doc = " This should be the same length as `ActiveValidatorIndices`."] + pub fn active_validator_keys( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasShared", + "ActiveValidatorKeys", + vec![], + [ + 33u8, 14u8, 54u8, 86u8, 184u8, 171u8, 194u8, 35u8, 187u8, + 252u8, 181u8, 79u8, 229u8, 134u8, 50u8, 235u8, 162u8, 216u8, + 108u8, 160u8, 175u8, 172u8, 239u8, 114u8, 57u8, 238u8, 9u8, + 54u8, 57u8, 196u8, 105u8, 15u8, + ], + ) + } } + } + } + pub mod para_inclusion { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi; + impl TransactionApi {} + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = + runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -26978,13 +24607,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Mint { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + #[doc = "A candidate was backed. `[candidate, head_data]`"] + pub struct CandidateBacked( + pub runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, >, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v2::CoreIndex, + pub runtime_types::polkadot_primitives::v2::GroupIndex, + ); + impl ::subxt::events::StaticEvent for CandidateBacked { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateBacked"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -26995,15 +24629,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burn { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub check_owner: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[doc = "A candidate was included. `[candidate, head_data]`"] + pub struct CandidateIncluded( + pub runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, >, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v2::CoreIndex, + pub runtime_types::polkadot_primitives::v2::GroupIndex, + ); + impl ::subxt::events::StaticEvent for CandidateIncluded { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateIncluded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27014,27 +24651,143 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + #[doc = "A candidate timed out. `[candidate, head_data]`"] + pub struct CandidateTimedOut( + pub runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, >, + pub runtime_types::polkadot_parachain::primitives::HeadData, + pub runtime_types::polkadot_primitives::v2::CoreIndex, + ); + impl ::subxt::events::StaticEvent for CandidateTimedOut { + const PALLET: &'static str = "ParaInclusion"; + const EVENT: &'static str = "CandidateTimedOut"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Redeposit { - pub collection: ::core::primitive::u32, - pub items: ::std::vec::Vec<::core::primitive::u32>, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "AvailabilityBitfields", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, + 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, + 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, + 114u8, 215u8, 250u8, 111u8, 225u8, + ], + ) + } + #[doc = " The latest bitfield for each validator, referred to by their index in the validator set."] pub fn availability_bitfields_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "AvailabilityBitfields", + Vec::new(), + [ + 149u8, 215u8, 123u8, 226u8, 73u8, 240u8, 102u8, 39u8, 243u8, + 232u8, 226u8, 116u8, 65u8, 180u8, 110u8, 4u8, 194u8, 50u8, + 60u8, 193u8, 142u8, 62u8, 20u8, 148u8, 106u8, 162u8, 96u8, + 114u8, 215u8, 250u8, 111u8, 225u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: Id > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailability", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, + 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, + 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, + 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) + } + #[doc = " Candidates pending availability by `ParaId`."] pub fn pending_availability_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: inclusion :: CandidatePendingAvailability < :: subxt :: utils :: H256 , :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailability", + Vec::new(), + [ + 54u8, 166u8, 18u8, 56u8, 51u8, 241u8, 31u8, 165u8, 220u8, + 138u8, 67u8, 171u8, 23u8, 101u8, 109u8, 26u8, 211u8, 237u8, + 81u8, 143u8, 192u8, 214u8, 49u8, 42u8, 69u8, 30u8, 168u8, + 113u8, 72u8, 12u8, 140u8, 242u8, + ], + ) + } + #[doc = " The commitments of candidates pending availability, by `ParaId`."] + pub fn pending_availability_commitments( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailabilityCommitments", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, + 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, + 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, + 195u8, 56u8, 59u8, 54u8, 8u8, + ], + ) + } + #[doc = " The commitments of candidates pending availability, by `ParaId`."] + pub fn pending_availability_commitments_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaInclusion", + "PendingAvailabilityCommitments", + Vec::new(), + [ + 146u8, 206u8, 148u8, 102u8, 55u8, 101u8, 144u8, 33u8, 197u8, + 232u8, 64u8, 205u8, 216u8, 21u8, 247u8, 170u8, 237u8, 115u8, + 144u8, 43u8, 106u8, 87u8, 82u8, 39u8, 11u8, 87u8, 149u8, + 195u8, 56u8, 59u8, 54u8, 8u8, + ], + ) + } } + } + } + pub mod para_inherent { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -27044,38 +24797,267 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Freeze { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct Enter { + pub data: runtime_types::polkadot_primitives::v2::InherentData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Thaw { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] + pub fn enter( + &self, + data: runtime_types::polkadot_primitives::v2::InherentData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ParaInherent", + "enter", + Enter { data }, + [ + 92u8, 247u8, 59u8, 6u8, 2u8, 102u8, 76u8, 147u8, 46u8, 232u8, + 38u8, 191u8, 145u8, 155u8, 23u8, 39u8, 228u8, 95u8, 57u8, + 249u8, 247u8, 20u8, 9u8, 189u8, 156u8, 187u8, 207u8, 107u8, + 0u8, 13u8, 228u8, 6u8, + ], + ) + } } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FreezeCollection { - pub collection: ::core::primitive::u32, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Whether the paras inherent was included within this block."] + #[doc = ""] + #[doc = " The `Option<()>` is effectively a `bool`, but it never hits storage in the `None` variant"] + #[doc = " due to the guarantees of FRAME's storage APIs."] + #[doc = ""] + #[doc = " If this is `None` at the end of the block, we panic and render the block invalid."] + pub fn included( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaInherent", + "Included", + vec![], + [ + 208u8, 213u8, 76u8, 64u8, 90u8, 141u8, 144u8, 52u8, 220u8, + 35u8, 143u8, 171u8, 45u8, 59u8, 9u8, 218u8, 29u8, 186u8, + 139u8, 203u8, 205u8, 12u8, 10u8, 2u8, 27u8, 167u8, 182u8, + 244u8, 167u8, 220u8, 44u8, 16u8, + ], + ) + } + #[doc = " Scraped on chain data for extracting resolved disputes as well as backing votes."] + pub fn on_chain_votes( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< + ::subxt::utils::H256, + >, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaInherent", + "OnChainVotes", + vec![], + [ + 187u8, 34u8, 219u8, 197u8, 202u8, 214u8, 140u8, 152u8, 253u8, + 65u8, 206u8, 217u8, 36u8, 40u8, 107u8, 215u8, 135u8, 115u8, + 35u8, 61u8, 180u8, 131u8, 0u8, 184u8, 193u8, 76u8, 165u8, + 63u8, 106u8, 222u8, 126u8, 113u8, + ], + ) + } + } + } + } + pub mod para_scheduler { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All the validator groups. One for each core. Indices are into `ActiveValidators` - not the"] + #[doc = " broader set of Polkadot validators, but instead just the subset used for parachains during"] + #[doc = " this session."] + #[doc = ""] + #[doc = " Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers."] + #[doc = " Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k."] + pub fn validator_groups( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ValidatorGroups", + vec![], + [ + 175u8, 187u8, 69u8, 76u8, 211u8, 36u8, 162u8, 147u8, 83u8, + 65u8, 83u8, 44u8, 241u8, 112u8, 246u8, 14u8, 237u8, 255u8, + 248u8, 58u8, 44u8, 207u8, 159u8, 112u8, 31u8, 90u8, 15u8, + 85u8, 4u8, 212u8, 215u8, 211u8, + ], + ) + } + #[doc = " A queue of upcoming claims and which core they should be mapped onto."] + #[doc = ""] + #[doc = " The number of queued claims is bounded at the `scheduling_lookahead`"] + #[doc = " multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500."] pub fn parathread_queue (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: scheduler :: ParathreadClaimQueue , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ParathreadQueue", + vec![], + [ + 79u8, 144u8, 191u8, 114u8, 235u8, 55u8, 133u8, 208u8, 73u8, + 97u8, 73u8, 148u8, 96u8, 185u8, 110u8, 95u8, 132u8, 54u8, + 244u8, 86u8, 50u8, 218u8, 121u8, 226u8, 153u8, 58u8, 232u8, + 202u8, 132u8, 147u8, 168u8, 48u8, + ], + ) + } + #[doc = " One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be"] + #[doc = " temporarily `Some` if scheduled but not occupied."] + #[doc = " The i'th parachain belongs to the i'th core, with the remaining cores all being"] + #[doc = " parathread-multiplexers."] + #[doc = ""] + #[doc = " Bounded by the maximum of either of these two values:"] + #[doc = " * The number of parachains and parathread multiplexers"] + #[doc = " * The number of validators divided by `configuration.max_validators_per_core`."] + pub fn availability_cores( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::core::option::Option< + runtime_types::polkadot_primitives::v2::CoreOccupied, + >, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "AvailabilityCores", + vec![], + [ + 103u8, 94u8, 52u8, 17u8, 118u8, 25u8, 254u8, 190u8, 74u8, + 91u8, 64u8, 205u8, 243u8, 113u8, 143u8, 166u8, 193u8, 110u8, + 214u8, 151u8, 24u8, 112u8, 69u8, 131u8, 235u8, 78u8, 240u8, + 120u8, 240u8, 68u8, 56u8, 215u8, + ], + ) + } + #[doc = " An index used to ensure that only one claim on a parathread exists in the queue or is"] + #[doc = " currently being handled by an occupied core."] + #[doc = ""] + #[doc = " Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500."] + pub fn parathread_claim_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "ParathreadClaimIndex", + vec![], + [ + 64u8, 17u8, 173u8, 35u8, 14u8, 16u8, 149u8, 200u8, 118u8, + 211u8, 130u8, 15u8, 124u8, 112u8, 44u8, 220u8, 156u8, 132u8, + 119u8, 148u8, 24u8, 120u8, 252u8, 246u8, 204u8, 119u8, 206u8, + 85u8, 44u8, 210u8, 135u8, 83u8, + ], + ) + } + #[doc = " The block number where the session start occurred. Used to track how many group rotations have occurred."] + #[doc = ""] + #[doc = " Note that in the context of parachains modules the session change is signaled during"] + #[doc = " the block and enacted at the end of the block (at the finalization stage, to be exact)."] + #[doc = " Thus for all intents and purposes the effect of the session change is observed at the"] + #[doc = " block following the session change, block number of which we save in this storage value."] + pub fn session_start_block( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "SessionStartBlock", + vec![], + [ + 122u8, 37u8, 150u8, 1u8, 185u8, 201u8, 168u8, 67u8, 55u8, + 17u8, 101u8, 18u8, 133u8, 212u8, 6u8, 73u8, 191u8, 204u8, + 229u8, 22u8, 185u8, 120u8, 24u8, 245u8, 121u8, 215u8, 124u8, + 210u8, 49u8, 28u8, 26u8, 80u8, + ], + ) + } + #[doc = " Currently scheduled cores - free but up to be occupied."] + #[doc = ""] + #[doc = " Bounded by the number of cores: one for each parachain and parathread multiplexer."] + #[doc = ""] + #[doc = " The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/"] + #[doc = " for the upcoming block."] pub fn scheduled (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: CoreAssignment > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "ParaScheduler", + "Scheduled", + vec![], + [ + 246u8, 105u8, 102u8, 107u8, 143u8, 92u8, 220u8, 69u8, 71u8, + 102u8, 212u8, 157u8, 56u8, 112u8, 42u8, 179u8, 183u8, 139u8, + 128u8, 81u8, 239u8, 84u8, 103u8, 126u8, 82u8, 247u8, 39u8, + 39u8, 231u8, 218u8, 131u8, 53u8, + ], + ) + } } + } + } + pub mod paras { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27084,8 +25066,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ThawCollection { - pub collection: ::core::primitive::u32, + pub struct ForceSetCurrentCode { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27096,12 +25080,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferOwnership { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct ForceSetCurrentHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27112,20 +25093,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetTeam { - pub collection: ::core::primitive::u32, - pub issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct ForceScheduleCodeUpgrade { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + pub relay_parent_number: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27136,13 +25108,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveTransfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct ForceNoteNewHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27153,15 +25121,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelApproval { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub maybe_check_delegate: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, + pub struct ForceQueueAction { + pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27172,26 +25133,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceItemStatus { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub free_holding: ::core::primitive::bool, - pub is_frozen: ::core::primitive::bool, + pub struct AddTrustedValidationCode { + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27202,15 +25146,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAttribute { - pub collection: ::core::primitive::u32, - pub maybe_item: ::core::option::Option<::core::primitive::u32>, - pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + pub struct PokeUnusedValidationCode { + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27221,13 +25159,186 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAttribute { - pub collection: ::core::primitive::u32, - pub maybe_item: ::core::option::Option<::core::primitive::u32>, - pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + pub struct IncludePvfCheckStatement { + pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + pub signature: + runtime_types::polkadot_primitives::v2::validator_app::Signature, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the storage for the parachain validation code immediately."] + pub fn force_set_current_code( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_set_current_code", + ForceSetCurrentCode { para, new_code }, + [ + 56u8, 59u8, 48u8, 185u8, 106u8, 99u8, 250u8, 32u8, 207u8, + 2u8, 4u8, 110u8, 165u8, 131u8, 22u8, 33u8, 248u8, 175u8, + 186u8, 6u8, 118u8, 51u8, 74u8, 239u8, 68u8, 122u8, 148u8, + 242u8, 193u8, 131u8, 6u8, 135u8, + ], + ) + } + #[doc = "Set the storage for the current parachain head data immediately."] + pub fn force_set_current_head( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_set_current_head", + ForceSetCurrentHead { para, new_head }, + [ + 203u8, 70u8, 33u8, 168u8, 133u8, 64u8, 146u8, 137u8, 156u8, + 104u8, 183u8, 26u8, 74u8, 227u8, 154u8, 224u8, 75u8, 85u8, + 143u8, 51u8, 60u8, 194u8, 59u8, 94u8, 100u8, 84u8, 194u8, + 100u8, 153u8, 9u8, 222u8, 63u8, + ], + ) + } + #[doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] + pub fn force_schedule_code_upgrade( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + relay_parent_number: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_schedule_code_upgrade", + ForceScheduleCodeUpgrade { + para, + new_code, + relay_parent_number, + }, + [ + 30u8, 210u8, 178u8, 31u8, 48u8, 144u8, 167u8, 117u8, 220u8, + 36u8, 175u8, 220u8, 145u8, 193u8, 20u8, 98u8, 149u8, 130u8, + 66u8, 54u8, 20u8, 204u8, 231u8, 116u8, 203u8, 179u8, 253u8, + 106u8, 55u8, 58u8, 116u8, 109u8, + ], + ) + } + #[doc = "Note a new block head for para within the context of the current block."] + pub fn force_note_new_head( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_note_new_head", + ForceNoteNewHead { para, new_head }, + [ + 83u8, 93u8, 166u8, 142u8, 213u8, 1u8, 243u8, 73u8, 192u8, + 164u8, 104u8, 206u8, 99u8, 250u8, 31u8, 222u8, 231u8, 54u8, + 12u8, 45u8, 92u8, 74u8, 248u8, 50u8, 180u8, 86u8, 251u8, + 172u8, 227u8, 88u8, 45u8, 127u8, + ], + ) + } + #[doc = "Put a parachain directly into the next session's action queue."] + #[doc = "We can't queue it any sooner than this without going into the"] + #[doc = "initializer..."] + pub fn force_queue_action( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "force_queue_action", + ForceQueueAction { para }, + [ + 195u8, 243u8, 79u8, 34u8, 111u8, 246u8, 109u8, 90u8, 251u8, + 137u8, 48u8, 23u8, 117u8, 29u8, 26u8, 200u8, 37u8, 64u8, + 36u8, 254u8, 224u8, 99u8, 165u8, 246u8, 8u8, 76u8, 250u8, + 36u8, 141u8, 67u8, 185u8, 17u8, + ], + ) + } + #[doc = "Adds the validation code to the storage."] + #[doc = ""] + #[doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] + #[doc = "is running for that code, it will be instantly accepted."] + #[doc = ""] + #[doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] + #[doc = "into storage with reference count 0. This is to account the fact that there are no users"] + #[doc = "for this code yet. The caller will have to make sure that this code eventually gets"] + #[doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] + #[doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] + #[doc = ""] + #[doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] + #[doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] + pub fn add_trusted_validation_code( + &self, + validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "add_trusted_validation_code", + AddTrustedValidationCode { validation_code }, + [ + 160u8, 199u8, 245u8, 178u8, 58u8, 65u8, 79u8, 199u8, 53u8, + 60u8, 84u8, 225u8, 2u8, 145u8, 154u8, 204u8, 165u8, 171u8, + 173u8, 223u8, 59u8, 196u8, 37u8, 12u8, 243u8, 158u8, 77u8, + 184u8, 58u8, 64u8, 133u8, 71u8, + ], + ) + } + #[doc = "Remove the validation code from the storage iff the reference count is 0."] + #[doc = ""] + #[doc = "This is better than removing the storage directly, because it will not remove the code"] + #[doc = "that was suddenly got used by some parachain while this dispatchable was pending"] + #[doc = "dispatching."] + pub fn poke_unused_validation_code( + &self, + validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "poke_unused_validation_code", + PokeUnusedValidationCode { + validation_code_hash, + }, + [ + 98u8, 9u8, 24u8, 180u8, 8u8, 144u8, 36u8, 28u8, 111u8, 83u8, + 162u8, 160u8, 66u8, 119u8, 177u8, 117u8, 143u8, 233u8, 241u8, + 128u8, 189u8, 118u8, 241u8, 30u8, 74u8, 171u8, 193u8, 177u8, + 233u8, 12u8, 254u8, 146u8, + ], + ) + } + #[doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] + #[doc = "enacts the results if that was the last vote before achieving the supermajority."] + pub fn include_pvf_check_statement( + &self, + stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, + signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Paras", + "include_pvf_check_statement", + IncludePvfCheckStatement { stmt, signature }, + [ + 22u8, 136u8, 241u8, 59u8, 36u8, 249u8, 239u8, 255u8, 169u8, + 117u8, 19u8, 58u8, 214u8, 16u8, 135u8, 65u8, 13u8, 250u8, + 5u8, 41u8, 144u8, 29u8, 207u8, 73u8, 215u8, 221u8, 1u8, + 253u8, 123u8, 110u8, 6u8, 196u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::paras::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -27237,13 +25348,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub is_frozen: ::core::primitive::bool, + #[doc = "Current code has been updated for a Para. `para_id`"] + pub struct CurrentCodeUpdated( + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for CurrentCodeUpdated { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CurrentCodeUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27254,9 +25365,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearMetadata { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + #[doc = "Current head has been updated for a Para. `para_id`"] + pub struct CurrentHeadUpdated( + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for CurrentHeadUpdated { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CurrentHeadUpdated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27267,15 +25382,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCollectionMetadata { - pub collection: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub is_frozen: ::core::primitive::bool, + #[doc = "A code upgrade has been scheduled for a Para. `para_id`"] + pub struct CodeUpgradeScheduled( + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for CodeUpgradeScheduled { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "CodeUpgradeScheduled"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -27284,8 +25399,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearCollectionMetadata { - pub collection: ::core::primitive::u32, + #[doc = "A new head has been noted for a Para. `para_id`"] + pub struct NewHeadNoted( + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for NewHeadNoted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "NewHeadNoted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27296,8 +25416,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAcceptOwnership { - pub maybe_collection: ::core::option::Option<::core::primitive::u32>, + #[doc = "A para has been queued to execute pending actions. `para_id`"] + pub struct ActionQueued( + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for ActionQueued { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "ActionQueued"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27308,9 +25434,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCollectionMaxSupply { - pub collection: ::core::primitive::u32, - pub max_supply: ::core::primitive::u32, + #[doc = "The given para either initiated or subscribed to a PVF check for the given validation"] + #[doc = "code. `code_hash` `para_id`"] + pub struct PvfCheckStarted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckStarted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckStarted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27321,16 +25453,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPrice { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::option::Option<::core::primitive::u128>, - pub whitelisted_buyer: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, + #[doc = "The given validation code was accepted by the PVF pre-checking vote."] + #[doc = "`code_hash` `para_id`"] + pub struct PvfCheckAccepted( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckAccepted { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckAccepted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -27341,960 +25472,1162 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BuyItem { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub bid_price: ::core::primitive::u128, + #[doc = "The given validation code was rejected by the PVF pre-checking vote."] + #[doc = "`code_hash` `para_id`"] + pub struct PvfCheckRejected( + pub runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for PvfCheckRejected { + const PALLET: &'static str = "Paras"; + const EVENT: &'static str = "PvfCheckRejected"; } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Issue a new collection of non-fungible items from a public origin."] - #[doc = ""] - #[doc = "This new collection has no items initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "`ItemDeposit` funds of sender are reserved."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `collection`: The identifier of the new collection. This must not be currently in use."] - #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] - #[doc = "member of the collection's admin team."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn create( - &self, - collection: ::core::primitive::u32, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "create", - Create { collection, admin }, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " All currently active PVF pre-checking votes."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteMap", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 250u8, 79u8, 237u8, 220u8, 143u8, 6u8, 150u8, 213u8, 251u8, - 95u8, 81u8, 65u8, 94u8, 176u8, 218u8, 190u8, 103u8, 116u8, - 61u8, 188u8, 31u8, 180u8, 109u8, 209u8, 140u8, 102u8, 247u8, - 41u8, 12u8, 21u8, 143u8, 162u8, + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, + 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, + 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, + 43u8, 248u8, 134u8, 124u8, 73u8, ], ) } - #[doc = "Issue a new collection of non-fungible items from a privileged origin."] - #[doc = ""] - #[doc = "This new collection has no items initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the new item. This must not be currently in use."] - #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] - #[doc = " permissions"] - #[doc = "over this item, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] + #[doc = " All currently active PVF pre-checking votes."] #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_create( + #[doc = " Invariant:"] + #[doc = " - There are no PVF pre-checking votes that exists in list but not in the set and vice versa."] pub fn pvf_active_vote_map_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: paras :: PvfCheckActiveVoteState < :: core :: primitive :: u32 > , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteMap", + Vec::new(), + [ + 84u8, 214u8, 221u8, 221u8, 244u8, 56u8, 135u8, 87u8, 252u8, + 39u8, 188u8, 13u8, 196u8, 25u8, 214u8, 186u8, 152u8, 181u8, + 190u8, 39u8, 235u8, 211u8, 236u8, 114u8, 67u8, 85u8, 138u8, + 43u8, 248u8, 134u8, 124u8, 73u8, + ], + ) + } + #[doc = " The list of all currently active PVF votes. Auxiliary to `PvfActiveVoteMap`."] + pub fn pvf_active_vote_list( &self, - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - free_holding: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "force_create", - ForceCreate { - collection, - owner, - free_holding, - }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PvfActiveVoteList", + vec![], [ - 128u8, 35u8, 126u8, 101u8, 171u8, 131u8, 36u8, 84u8, 196u8, - 235u8, 243u8, 21u8, 43u8, 160u8, 101u8, 203u8, 58u8, 103u8, - 236u8, 159u8, 217u8, 124u8, 94u8, 135u8, 37u8, 42u8, 159u8, - 204u8, 163u8, 106u8, 86u8, 97u8, + 196u8, 23u8, 108u8, 162u8, 29u8, 33u8, 49u8, 219u8, 127u8, + 26u8, 241u8, 58u8, 102u8, 43u8, 156u8, 3u8, 87u8, 153u8, + 195u8, 96u8, 68u8, 132u8, 170u8, 162u8, 18u8, 156u8, 121u8, + 63u8, 53u8, 91u8, 68u8, 69u8, ], ) } - #[doc = "Destroy a collection of fungible items."] + #[doc = " All parachains. Ordered ascending by `ParaId`. Parathreads are not included."] #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] - #[doc = "owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to be destroyed."] - #[doc = "- `witness`: Information on the items minted in the collection. This must be"] - #[doc = "correct."] - #[doc = ""] - #[doc = "Emits `Destroyed` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(n + m)` where:"] - #[doc = "- `n = witness.items`"] - #[doc = "- `m = witness.item_metadatas`"] - #[doc = "- `a = witness.attributes`"] - pub fn destroy( + #[doc = " Consider using the [`ParachainsCache`] type of modifying."] + pub fn parachains( &self, - collection: ::core::primitive::u32, - witness: runtime_types::pallet_uniques::types::DestroyWitness, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "destroy", - Destroy { - collection, - witness, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Parachains", + vec![], [ - 194u8, 219u8, 14u8, 11u8, 254u8, 25u8, 217u8, 157u8, 117u8, - 236u8, 144u8, 148u8, 151u8, 141u8, 40u8, 60u8, 243u8, 241u8, - 140u8, 184u8, 45u8, 153u8, 33u8, 177u8, 248u8, 79u8, 67u8, - 249u8, 47u8, 244u8, 198u8, 138u8, + 85u8, 234u8, 218u8, 69u8, 20u8, 169u8, 235u8, 6u8, 69u8, + 126u8, 28u8, 18u8, 57u8, 93u8, 238u8, 7u8, 167u8, 221u8, + 75u8, 35u8, 36u8, 4u8, 46u8, 55u8, 234u8, 123u8, 122u8, + 173u8, 13u8, 205u8, 58u8, 226u8, ], ) } - #[doc = "Mint an item of a particular collection."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be minted."] - #[doc = "- `item`: The item value of the item to be minted."] - #[doc = "- `beneficiary`: The initial owner of the minted item."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn mint( + #[doc = " The current lifecycle of a all known Para IDs."] + pub fn para_lifecycles( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "mint", - Mint { - collection, - item, - owner, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ParaLifecycles", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 55u8, 248u8, 214u8, 184u8, 144u8, 201u8, 35u8, 97u8, 81u8, - 129u8, 159u8, 219u8, 46u8, 107u8, 174u8, 115u8, 73u8, 198u8, - 140u8, 172u8, 254u8, 157u8, 182u8, 0u8, 71u8, 237u8, 226u8, - 202u8, 136u8, 65u8, 174u8, 246u8, + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, + 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, + 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, + 186u8, 209u8, 191u8, 186u8, ], ) } - #[doc = "Destroy a single item."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be burned."] - #[doc = "- `item`: The item of the item to be burned."] - #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] - #[doc = " item is owned by this value."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: `check_owner.is_some()`."] - pub fn burn( + #[doc = " The current lifecycle of a all known Para IDs."] + pub fn para_lifecycles_root( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - check_owner: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "burn", - Burn { - collection, - item, - check_owner, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaLifecycle, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ParaLifecycles", + Vec::new(), [ - 215u8, 138u8, 65u8, 126u8, 201u8, 135u8, 73u8, 194u8, 2u8, - 196u8, 229u8, 103u8, 140u8, 74u8, 21u8, 144u8, 111u8, 99u8, - 200u8, 210u8, 191u8, 108u8, 220u8, 56u8, 64u8, 89u8, 216u8, - 181u8, 175u8, 57u8, 41u8, 173u8, + 221u8, 103u8, 112u8, 222u8, 86u8, 2u8, 172u8, 187u8, 174u8, + 106u8, 4u8, 253u8, 35u8, 73u8, 18u8, 78u8, 25u8, 31u8, 124u8, + 110u8, 81u8, 62u8, 215u8, 228u8, 183u8, 132u8, 138u8, 213u8, + 186u8, 209u8, 191u8, 186u8, ], ) } - #[doc = "Move an item from the sender account to another."] - #[doc = ""] - #[doc = "This resets the approved account of the item."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item to be transferred."] - #[doc = "- `item`: The item of the item to be transferred."] - #[doc = "- `dest`: The account to receive ownership of the item."] - #[doc = ""] - #[doc = "Emits `Transferred`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer( + #[doc = " The head-data of every registered para."] + pub fn heads( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "transfer", - Transfer { - collection, - item, - dest, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::HeadData, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Heads", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 223u8, 90u8, 63u8, 140u8, 84u8, 72u8, 67u8, 84u8, 225u8, - 84u8, 4u8, 197u8, 17u8, 53u8, 151u8, 209u8, 163u8, 114u8, - 253u8, 225u8, 44u8, 171u8, 240u8, 8u8, 112u8, 8u8, 20u8, - 25u8, 224u8, 131u8, 175u8, 40u8, + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, + 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, + 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, + 134u8, 131u8, 142u8, 70u8, 3u8, ], ) } - #[doc = "Reevaluate the deposits on some items."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be frozen."] - #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] - #[doc = ""] - #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] - #[doc = "in the case that the owner account does not have reservable funds to pay for a"] - #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] - #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] - #[doc = "so it's of little consequence."] - #[doc = ""] - #[doc = "It will still return an error in the case that the collection is unknown of the signer"] - #[doc = "is not permitted to call it."] - #[doc = ""] - #[doc = "Weight: `O(items.len())`"] - pub fn redeposit( + #[doc = " The head-data of every registered para."] + pub fn heads_root( &self, - collection: ::core::primitive::u32, - items: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "redeposit", - Redeposit { collection, items }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::HeadData, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "Heads", + Vec::new(), [ - 81u8, 142u8, 143u8, 126u8, 12u8, 71u8, 139u8, 28u8, 170u8, - 219u8, 195u8, 22u8, 146u8, 69u8, 202u8, 7u8, 202u8, 113u8, - 93u8, 187u8, 113u8, 16u8, 8u8, 76u8, 3u8, 124u8, 248u8, 38u8, - 17u8, 232u8, 120u8, 145u8, + 122u8, 38u8, 181u8, 121u8, 245u8, 100u8, 136u8, 233u8, 237u8, + 248u8, 127u8, 2u8, 147u8, 41u8, 202u8, 242u8, 238u8, 70u8, + 55u8, 200u8, 15u8, 106u8, 138u8, 108u8, 192u8, 61u8, 158u8, + 134u8, 131u8, 142u8, 70u8, 3u8, ], ) } - #[doc = "Disallow further unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be frozen."] - #[doc = "- `item`: The item of the item to be frozen."] + #[doc = " The validation code hash of every live para."] #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze( + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn current_code_hash( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "freeze", - Freeze { collection, item }, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CurrentCodeHash", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 71u8, 169u8, 3u8, 86u8, 145u8, 29u8, 181u8, 125u8, 226u8, - 255u8, 19u8, 202u8, 166u8, 193u8, 183u8, 145u8, 184u8, 67u8, - 80u8, 51u8, 241u8, 132u8, 226u8, 206u8, 24u8, 249u8, 189u8, - 1u8, 2u8, 65u8, 53u8, 114u8, + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, + 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, + 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, + 35u8, 157u8, 195u8, 104u8, 236u8, ], ) } - #[doc = "Re-allow unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be thawed."] - #[doc = "- `item`: The item of the item to be thawed."] + #[doc = " The validation code hash of every live para."] #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw( + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn current_code_hash_root( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "thaw", - Thaw { collection, item }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CurrentCodeHash", + Vec::new(), [ - 17u8, 158u8, 130u8, 248u8, 75u8, 216u8, 110u8, 113u8, 113u8, - 243u8, 157u8, 40u8, 140u8, 41u8, 128u8, 255u8, 188u8, 7u8, - 135u8, 27u8, 251u8, 123u8, 192u8, 220u8, 149u8, 111u8, 215u8, - 26u8, 92u8, 188u8, 219u8, 90u8, + 179u8, 145u8, 45u8, 44u8, 130u8, 240u8, 50u8, 128u8, 190u8, + 133u8, 66u8, 85u8, 47u8, 141u8, 56u8, 87u8, 131u8, 99u8, + 170u8, 203u8, 8u8, 51u8, 123u8, 73u8, 206u8, 30u8, 173u8, + 35u8, 157u8, 195u8, 104u8, 236u8, ], ) } - #[doc = "Disallow further unprivileged transfers for a whole collection."] + #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] + #[doc = " became outdated."] #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be frozen."] - #[doc = ""] - #[doc = "Emits `CollectionFrozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn freeze_collection( + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn past_code_hash( &self, - collection: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "freeze_collection", - FreezeCollection { collection }, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + _1: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeHash", + vec![::subxt::storage::address::StaticStorageMapKey::new(&( + _0.borrow(), + _1.borrow(), + ))], [ - 17u8, 75u8, 230u8, 120u8, 48u8, 46u8, 9u8, 118u8, 130u8, - 136u8, 249u8, 123u8, 110u8, 105u8, 145u8, 232u8, 243u8, 80u8, - 149u8, 59u8, 233u8, 151u8, 24u8, 140u8, 40u8, 60u8, 250u8, - 54u8, 25u8, 168u8, 147u8, 194u8, + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, + 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, + 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, + 187u8, 71u8, 94u8, 88u8, 124u8, ], ) } - #[doc = "Re-allow unprivileged transfers for a whole collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be thawed."] - #[doc = ""] - #[doc = "Emits `CollectionThawed`."] + #[doc = " Actual past code hash, indicated by the para id as well as the block number at which it"] + #[doc = " became outdated."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn thaw_collection( + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn past_code_hash_root( &self, - collection: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "thaw_collection", - ThawCollection { collection }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeHash", + Vec::new(), [ - 134u8, 69u8, 120u8, 153u8, 244u8, 7u8, 197u8, 28u8, 169u8, - 128u8, 183u8, 72u8, 46u8, 41u8, 47u8, 173u8, 251u8, 33u8, - 195u8, 245u8, 74u8, 156u8, 165u8, 9u8, 164u8, 32u8, 144u8, - 158u8, 58u8, 202u8, 69u8, 213u8, + 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, + 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, + 36u8, 224u8, 46u8, 119u8, 245u8, 253u8, 55u8, 22u8, 137u8, + 187u8, 71u8, 94u8, 88u8, 124u8, ], ) } - #[doc = "Change the Owner of a collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose owner should be changed."] - #[doc = "- `owner`: The new Owner of this collection. They must have called"] - #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer_ownership( + #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] + #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] + #[doc = " to keep it available for secondary checkers."] + pub fn past_code_meta( &self, - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< ::core::primitive::u32, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "transfer_ownership", - TransferOwnership { collection, owner }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeMeta", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 217u8, 228u8, 51u8, 96u8, 179u8, 215u8, 163u8, 137u8, 231u8, - 239u8, 181u8, 113u8, 48u8, 144u8, 91u8, 140u8, 50u8, 175u8, - 81u8, 251u8, 128u8, 208u8, 38u8, 246u8, 103u8, 219u8, 65u8, - 179u8, 153u8, 4u8, 154u8, 181u8, + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, + 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, + 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, + 164u8, 168u8, 72u8, 171u8, 228u8, ], ) } - #[doc = "Change the Issuer, Admin and Freezer of a collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose team should be changed."] - #[doc = "- `issuer`: The new Issuer of this collection."] - #[doc = "- `admin`: The new Admin of this collection."] - #[doc = "- `freezer`: The new Freezer of this collection."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_team( + #[doc = " Past code of parachains. The parachains themselves may not be registered anymore,"] + #[doc = " but we also keep their code on-chain for the same amount of time as outdated code"] + #[doc = " to keep it available for secondary checkers."] + pub fn past_code_meta_root( &self, - collection: ::core::primitive::u32, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaPastCodeMeta< ::core::primitive::u32, >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_team", - SetTeam { - collection, - issuer, - admin, - freezer, - }, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodeMeta", + Vec::new(), [ - 34u8, 168u8, 70u8, 30u8, 29u8, 186u8, 131u8, 181u8, 132u8, - 63u8, 163u8, 22u8, 244u8, 41u8, 205u8, 234u8, 17u8, 238u8, - 54u8, 64u8, 158u8, 136u8, 50u8, 40u8, 242u8, 117u8, 111u8, - 211u8, 168u8, 156u8, 156u8, 27u8, + 251u8, 52u8, 126u8, 12u8, 21u8, 178u8, 151u8, 195u8, 153u8, + 17u8, 215u8, 242u8, 118u8, 192u8, 86u8, 72u8, 36u8, 97u8, + 245u8, 134u8, 155u8, 117u8, 85u8, 93u8, 225u8, 209u8, 63u8, + 164u8, 168u8, 72u8, 171u8, 228u8, ], ) } - #[doc = "Approve an item to be transferred by a delegated third-party account."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be"] - #[doc = "either the owner of the `item` or the admin of the collection."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] - #[doc = "- `item`: The item of the item to be approved for delegated transfer."] - #[doc = "- `delegate`: The account to delegate permission to transfer the item."] - #[doc = ""] - #[doc = "Important NOTE: The `approved` account gets reset after each transfer."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn approve_transfer( + #[doc = " Which paras have past code that needs pruning and the relay-chain block at which the code was replaced."] + #[doc = " Note that this is the actual height of the included block, not the expected height at which the"] + #[doc = " code upgrade would be applied, although they may be equal."] + #[doc = " This is to ensure the entire acceptance period is covered, not an offset acceptance period starting"] + #[doc = " from the time at which the parachain perceives a code upgrade as having occurred."] + #[doc = " Multiple entries for a single para are permitted. Ordered ascending by block number."] + pub fn past_code_pruning( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "PastCodePruning", + vec![], + [ + 59u8, 26u8, 175u8, 129u8, 174u8, 27u8, 239u8, 77u8, 38u8, + 130u8, 37u8, 134u8, 62u8, 28u8, 218u8, 176u8, 16u8, 137u8, + 175u8, 90u8, 248u8, 44u8, 248u8, 172u8, 231u8, 6u8, 36u8, + 190u8, 109u8, 237u8, 228u8, 135u8, + ], + ) + } + #[doc = " The block number at which the planned code change is expected for a para."] + #[doc = " The change will be applied after the first parablock for this ID included which executes"] + #[doc = " in the context of a relay chain block with a number >= `expected_at`."] + pub fn future_code_upgrades( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "approve_transfer", - ApproveTransfer { - collection, - item, - delegate, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeUpgrades", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 101u8, 171u8, 204u8, 251u8, 223u8, 253u8, 213u8, 182u8, - 128u8, 86u8, 244u8, 4u8, 19u8, 173u8, 197u8, 93u8, 80u8, - 13u8, 234u8, 229u8, 47u8, 60u8, 100u8, 77u8, 112u8, 138u8, - 74u8, 178u8, 95u8, 244u8, 12u8, 52u8, + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, + 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, + 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, + 158u8, 115u8, 172u8, 149u8, ], ) } - #[doc = "Cancel the prior approval for the transfer of an item by a delegate."] - #[doc = ""] - #[doc = "Origin must be either:"] - #[doc = "- the `Force` origin;"] - #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] - #[doc = "- `Signed` with the signer being the Owner of the `item`;"] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] - #[doc = "- `item`: The item of the item of whose approval will be cancelled."] - #[doc = "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to"] - #[doc = " which permission of transfer is delegated."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = " The block number at which the planned code change is expected for a para."] + #[doc = " The change will be applied after the first parablock for this ID included which executes"] + #[doc = " in the context of a relay chain block with a number >= `expected_at`."] + pub fn future_code_upgrades_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeUpgrades", + Vec::new(), + [ + 40u8, 134u8, 185u8, 28u8, 48u8, 105u8, 152u8, 229u8, 166u8, + 235u8, 32u8, 173u8, 64u8, 63u8, 151u8, 157u8, 190u8, 214u8, + 7u8, 8u8, 6u8, 128u8, 21u8, 104u8, 175u8, 71u8, 130u8, 207u8, + 158u8, 115u8, 172u8, 149u8, + ], + ) + } + #[doc = " The actual future code hash of a para."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn cancel_approval( + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn future_code_hash( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - maybe_check_delegate: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "cancel_approval", - CancelApproval { - collection, - item, - maybe_check_delegate, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeHash", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 66u8, 69u8, 36u8, 135u8, 174u8, 24u8, 110u8, 166u8, 77u8, - 128u8, 3u8, 102u8, 186u8, 253u8, 130u8, 191u8, 2u8, 159u8, - 54u8, 217u8, 190u8, 45u8, 64u8, 54u8, 29u8, 196u8, 99u8, - 204u8, 74u8, 128u8, 143u8, 84u8, + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, + 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, + 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, + 53u8, 44u8, 145u8, 244u8, 216u8, ], ) } - #[doc = "Alter the attributes of a given item."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] + #[doc = " The actual future code hash of a para."] #[doc = ""] - #[doc = "- `collection`: The identifier of the item."] - #[doc = "- `owner`: The new Owner of this item."] - #[doc = "- `issuer`: The new Issuer of this item."] - #[doc = "- `admin`: The new Admin of this item."] - #[doc = "- `freezer`: The new Freezer of this item."] - #[doc = "- `free_holding`: Whether a deposit is taken for holding an item of this collection."] - #[doc = "- `is_frozen`: Whether this collection is frozen except for permissioned/admin"] - #[doc = "instructions."] + #[doc = " Corresponding code can be retrieved with [`CodeByHash`]."] + pub fn future_code_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "FutureCodeHash", + Vec::new(), + [ + 252u8, 24u8, 95u8, 200u8, 207u8, 91u8, 66u8, 103u8, 54u8, + 171u8, 191u8, 187u8, 73u8, 170u8, 132u8, 59u8, 205u8, 125u8, + 68u8, 194u8, 122u8, 124u8, 190u8, 53u8, 241u8, 225u8, 131u8, + 53u8, 44u8, 145u8, 244u8, 216u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] #[doc = ""] - #[doc = "Emits `ItemStatusChanged` with the identity of the item."] + #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] + #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] + #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] + #[doc = " gets reset to `None`."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_item_status( + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_go_ahead_signal( &self, - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - free_holding: ::core::primitive::bool, - is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "force_item_status", - ForceItemStatus { - collection, - owner, - issuer, - admin, - freezer, - free_holding, - is_frozen, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeGoAheadSignal", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 80u8, 205u8, 188u8, 92u8, 184u8, 129u8, 222u8, 36u8, 205u8, - 131u8, 248u8, 126u8, 56u8, 209u8, 7u8, 109u8, 105u8, 176u8, - 173u8, 65u8, 75u8, 130u8, 117u8, 50u8, 124u8, 27u8, 233u8, - 146u8, 5u8, 114u8, 226u8, 230u8, + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, + 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, + 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, + 249u8, 245u8, 120u8, 98u8, 183u8, ], ) } - #[doc = "Set an attribute for a collection or item."] + #[doc = " This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure."] #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] + #[doc = " This value is absent when there are no upgrades scheduled or during the time the relay chain"] + #[doc = " performs the checks. It is set at the first relay-chain block when the corresponding parachain"] + #[doc = " can switch its upgrade function. As soon as the parachain's block is included, the value"] + #[doc = " gets reset to `None`."] #[doc = ""] - #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] - #[doc = "- `key`: The key of the attribute."] - #[doc = "- `value`: The value to which to set the attribute."] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_go_ahead_signal_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::UpgradeGoAhead, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeGoAheadSignal", + Vec::new(), + [ + 159u8, 47u8, 247u8, 154u8, 54u8, 20u8, 235u8, 49u8, 74u8, + 41u8, 65u8, 51u8, 52u8, 187u8, 242u8, 6u8, 84u8, 144u8, + 200u8, 176u8, 222u8, 232u8, 70u8, 50u8, 70u8, 97u8, 61u8, + 249u8, 245u8, 120u8, 98u8, 183u8, + ], + ) + } + #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] + #[doc = " an upgrade for this parachain."] #[doc = ""] - #[doc = "Emits `AttributeSet`."] + #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] + #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] + #[doc = " we could restrict upgrades to make the process simpler."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_attribute( + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_restriction_signal( &self, - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_attribute", - SetAttribute { - collection, - maybe_item, - key, - value, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeRestrictionSignal", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 227u8, 229u8, 21u8, 73u8, 122u8, 15u8, 156u8, 240u8, 210u8, - 78u8, 83u8, 101u8, 42u8, 92u8, 160u8, 235u8, 225u8, 150u8, - 221u8, 160u8, 204u8, 221u8, 9u8, 175u8, 122u8, 145u8, 169u8, - 28u8, 71u8, 148u8, 188u8, 20u8, + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, + 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, + 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, + 163u8, 45u8, 92u8, 44u8, 11u8, ], ) } - #[doc = "Clear an attribute for a collection or item."] + #[doc = " This is used by the relay-chain to communicate that there are restrictions for performing"] + #[doc = " an upgrade for this parachain."] #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] + #[doc = " This may be a because the parachain waits for the upgrade cooldown to expire. Another"] + #[doc = " potential use case is when we want to perform some maintenance (such as storage migration)"] + #[doc = " we could restrict upgrades to make the process simpler."] #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] + #[doc = " NOTE that this field is used by parachains via merkle storage proofs, therefore changing"] + #[doc = " the format will require migration of parachains."] + pub fn upgrade_restriction_signal_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeRestrictionSignal", + Vec::new(), + [ + 86u8, 190u8, 41u8, 79u8, 66u8, 68u8, 46u8, 87u8, 212u8, + 176u8, 255u8, 134u8, 104u8, 121u8, 44u8, 143u8, 248u8, 100u8, + 35u8, 157u8, 91u8, 165u8, 118u8, 38u8, 49u8, 171u8, 158u8, + 163u8, 45u8, 92u8, 44u8, 11u8, + ], + ) + } + #[doc = " The list of parachains that are awaiting for their upgrade restriction to cooldown."] #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] - #[doc = "- `key`: The key of the attribute."] + #[doc = " Ordered ascending by block number."] + pub fn upgrade_cooldowns( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpgradeCooldowns", + vec![], + [ + 205u8, 236u8, 140u8, 145u8, 241u8, 245u8, 60u8, 68u8, 23u8, + 175u8, 226u8, 174u8, 154u8, 107u8, 243u8, 197u8, 61u8, 218u8, + 7u8, 24u8, 109u8, 221u8, 178u8, 80u8, 242u8, 123u8, 33u8, + 119u8, 5u8, 241u8, 179u8, 13u8, + ], + ) + } + #[doc = " The list of upcoming code upgrades. Each item is a pair of which para performs a code"] + #[doc = " upgrade and at which relay-chain block it is expected at."] #[doc = ""] - #[doc = "Emits `AttributeCleared`."] + #[doc = " Ordered ascending by block number."] + pub fn upcoming_upgrades( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + )>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingUpgrades", + vec![], + [ + 165u8, 112u8, 215u8, 149u8, 125u8, 175u8, 206u8, 195u8, + 214u8, 173u8, 0u8, 144u8, 46u8, 197u8, 55u8, 204u8, 144u8, + 68u8, 158u8, 156u8, 145u8, 230u8, 173u8, 101u8, 255u8, 108u8, + 52u8, 199u8, 142u8, 37u8, 55u8, 32u8, + ], + ) + } + #[doc = " The actions to perform during the start of a specific session index."] + pub fn actions_queue( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ActionsQueue", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, + 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, + 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, + 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) + } + #[doc = " The actions to perform during the start of a specific session index."] + pub fn actions_queue_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "ActionsQueue", + Vec::new(), + [ + 209u8, 106u8, 198u8, 228u8, 148u8, 75u8, 246u8, 248u8, 12u8, + 143u8, 175u8, 56u8, 168u8, 243u8, 67u8, 166u8, 59u8, 92u8, + 219u8, 184u8, 1u8, 34u8, 241u8, 66u8, 245u8, 48u8, 174u8, + 41u8, 123u8, 16u8, 178u8, 161u8, + ], + ) + } + #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_attribute( + #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] + pub fn upcoming_paras_genesis( &self, - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "clear_attribute", - ClearAttribute { - collection, - maybe_item, - key, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingParasGenesis", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 246u8, 34u8, 148u8, 125u8, 22u8, 119u8, 14u8, 109u8, 181u8, - 113u8, 246u8, 243u8, 83u8, 171u8, 77u8, 0u8, 162u8, 15u8, - 76u8, 250u8, 119u8, 186u8, 0u8, 176u8, 74u8, 207u8, 70u8, - 33u8, 218u8, 134u8, 239u8, 78u8, + 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, + 75u8, 75u8, 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, + 107u8, 75u8, 200u8, 61u8, 211u8, 7u8, 105u8, 251u8, 243u8, + 18u8, 220u8, 195u8, 216u8, 167u8, ], ) } - #[doc = "Set the metadata for an item."] + #[doc = " Upcoming paras instantiation arguments."] #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `item`: The identifier of the item whose metadata to set."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_metadata( + #[doc = " NOTE that after PVF pre-checking is enabled the para genesis arg will have it's code set"] + #[doc = " to empty. Instead, the code will be saved into the storage right away via `CodeByHash`."] + pub fn upcoming_paras_genesis_root( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "UpcomingParasGenesis", + Vec::new(), + [ + 134u8, 111u8, 59u8, 49u8, 28u8, 111u8, 6u8, 57u8, 109u8, + 75u8, 75u8, 53u8, 91u8, 150u8, 86u8, 38u8, 223u8, 50u8, + 107u8, 75u8, 200u8, 61u8, 211u8, 7u8, 105u8, 251u8, 243u8, + 18u8, 220u8, 195u8, 216u8, 167u8, + ], + ) + } + #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] + pub fn code_by_hash_refs( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_metadata", - SetMetadata { - collection, - item, - data, - is_frozen, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHashRefs", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 182u8, 1u8, 20u8, 121u8, 184u8, 169u8, 101u8, 195u8, 60u8, - 196u8, 77u8, 79u8, 207u8, 175u8, 109u8, 136u8, 214u8, 201u8, - 99u8, 32u8, 89u8, 8u8, 181u8, 182u8, 226u8, 166u8, 146u8, - 224u8, 48u8, 231u8, 146u8, 123u8, + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, + 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, + 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, + 160u8, 143u8, 88u8, 168u8, ], ) } - #[doc = "Clear the metadata for an item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`item`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `item`: The identifier of the item whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_metadata( + #[doc = " The number of reference on the validation code in [`CodeByHash`] storage."] + pub fn code_by_hash_refs_root( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "clear_metadata", - ClearMetadata { collection, item }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHashRefs", + Vec::new(), [ - 113u8, 75u8, 211u8, 250u8, 129u8, 61u8, 231u8, 204u8, 141u8, - 151u8, 65u8, 108u8, 230u8, 68u8, 51u8, 165u8, 126u8, 211u8, - 51u8, 33u8, 9u8, 47u8, 50u8, 71u8, 123u8, 71u8, 43u8, 162u8, - 76u8, 1u8, 90u8, 222u8, + 24u8, 6u8, 23u8, 50u8, 105u8, 203u8, 126u8, 161u8, 0u8, 5u8, + 121u8, 165u8, 204u8, 106u8, 68u8, 91u8, 84u8, 126u8, 29u8, + 239u8, 236u8, 138u8, 32u8, 237u8, 241u8, 226u8, 190u8, 233u8, + 160u8, 143u8, 88u8, 168u8, ], ) } - #[doc = "Set the metadata for a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] + #[doc = " Validation code stored by its hash."] #[doc = ""] - #[doc = "- `collection`: The identifier of the item whose metadata to update."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_collection_metadata( + #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] + #[doc = " [`PastCodeHash`]."] + pub fn code_by_hash( &self, - collection: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, >, - is_frozen: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_collection_metadata", - SetCollectionMetadata { - collection, - data, - is_frozen, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCode, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHash", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 98u8, 156u8, 235u8, 75u8, 88u8, 239u8, 86u8, 131u8, 2u8, - 226u8, 12u8, 122u8, 135u8, 145u8, 138u8, 220u8, 36u8, 120u8, - 21u8, 27u8, 222u8, 11u8, 99u8, 44u8, 250u8, 233u8, 219u8, - 65u8, 33u8, 152u8, 226u8, 51u8, + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, + 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, + 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, + 73u8, 15u8, 210u8, 226u8, ], ) } - #[doc = "Clear the metadata for a collection."] + #[doc = " Validation code stored by its hash."] #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_collection_metadata( + #[doc = " This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and"] + #[doc = " [`PastCodeHash`]."] + pub fn code_by_hash_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::ValidationCode, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Paras", + "CodeByHash", + Vec::new(), + [ + 58u8, 104u8, 36u8, 34u8, 226u8, 210u8, 253u8, 90u8, 23u8, + 3u8, 6u8, 202u8, 9u8, 44u8, 107u8, 108u8, 41u8, 149u8, 255u8, + 173u8, 119u8, 206u8, 201u8, 180u8, 32u8, 193u8, 44u8, 232u8, + 73u8, 15u8, 210u8, 226u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn unsigned_priority( &self, - collection: ::core::primitive::u32, - ) -> ::subxt::tx::Payload + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> { - ::subxt::tx::Payload::new_static( - "Uniques", - "clear_collection_metadata", - ClearCollectionMetadata { collection }, + ::subxt::constants::StaticConstantAddress::new( + "Paras", + "UnsignedPriority", [ - 218u8, 108u8, 43u8, 96u8, 85u8, 130u8, 198u8, 167u8, 28u8, - 4u8, 151u8, 185u8, 162u8, 123u8, 120u8, 42u8, 72u8, 37u8, - 250u8, 135u8, 100u8, 37u8, 193u8, 232u8, 62u8, 91u8, 18u8, - 120u8, 241u8, 47u8, 73u8, 209u8, + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, + 190u8, 146u8, 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, + 65u8, 18u8, 191u8, 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, + 220u8, 42u8, 184u8, 239u8, 42u8, 246u8, ], ) } - #[doc = "Set (or reset) the acceptance of ownership for a particular account."] - #[doc = ""] - #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] - #[doc = "provider reference."] - #[doc = ""] - #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] - #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] - #[doc = " ownership transferal."] - #[doc = ""] - #[doc = "Emits `OwnershipAcceptanceChanged`."] - pub fn set_accept_ownership( + } + } + } + pub mod initializer { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ForceApprove { + pub up_to: ::core::primitive::u32, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] + #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] + #[doc = "chain are valid and should be finalized."] + pub fn force_approve( &self, - maybe_collection: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { + up_to: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Uniques", - "set_accept_ownership", - SetAcceptOwnership { maybe_collection }, + "Initializer", + "force_approve", + ForceApprove { up_to }, [ - 171u8, 174u8, 217u8, 70u8, 115u8, 1u8, 231u8, 149u8, 223u8, - 227u8, 6u8, 226u8, 190u8, 144u8, 101u8, 21u8, 147u8, 243u8, - 123u8, 228u8, 42u8, 27u8, 126u8, 58u8, 31u8, 233u8, 54u8, - 157u8, 193u8, 212u8, 114u8, 232u8, + 28u8, 117u8, 86u8, 182u8, 19u8, 127u8, 43u8, 17u8, 153u8, + 80u8, 193u8, 53u8, 120u8, 41u8, 205u8, 23u8, 252u8, 148u8, + 77u8, 227u8, 138u8, 35u8, 182u8, 122u8, 112u8, 232u8, 246u8, + 69u8, 173u8, 97u8, 42u8, 103u8, ], ) } - #[doc = "Set the maximum amount of items a collection could have."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "Note: This function can only succeed once per collection."] + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Whether the parachains modules have been initialized within this block."] #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to change."] - #[doc = "- `max_supply`: The maximum amount of items a collection could have."] + #[doc = " Semantically a `bool`, but this guarantees it should never hit the trie,"] + #[doc = " as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values."] #[doc = ""] - #[doc = "Emits `CollectionMaxSupplySet` event when successful."] - pub fn set_collection_max_supply( + #[doc = " As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of"] + #[doc = " them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for"] + #[doc = " the semantics of this variable."] + pub fn has_initialized( &self, - collection: ::core::primitive::u32, - max_supply: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_collection_max_supply", - SetCollectionMaxSupply { - collection, - max_supply, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (), + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Initializer", + "HasInitialized", + vec![], [ - 116u8, 134u8, 93u8, 228u8, 6u8, 198u8, 26u8, 168u8, 154u8, - 137u8, 0u8, 151u8, 1u8, 187u8, 36u8, 154u8, 62u8, 193u8, - 250u8, 83u8, 41u8, 135u8, 187u8, 4u8, 132u8, 234u8, 207u8, - 127u8, 153u8, 157u8, 76u8, 80u8, + 251u8, 135u8, 247u8, 61u8, 139u8, 102u8, 12u8, 122u8, 227u8, + 123u8, 11u8, 232u8, 120u8, 80u8, 81u8, 48u8, 216u8, 115u8, + 159u8, 131u8, 133u8, 105u8, 200u8, 122u8, 114u8, 6u8, 109u8, + 4u8, 164u8, 204u8, 214u8, 111u8, ], ) } - #[doc = "Set (or reset) the price for an item."] - #[doc = ""] - #[doc = "Origin must be Signed and must be the owner of the asset `item`."] + #[doc = " Buffered session changes along with the block number at which they should be applied."] #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item to set the price for."] - #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] - #[doc = "- `buyer`: Restricts the buy operation to a specific account."] + #[doc = " Typically this will be empty or one element long. Apart from that this item never hits"] + #[doc = " the storage."] #[doc = ""] - #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] - #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] - pub fn set_price( + #[doc = " However this is a `Vec` regardless to handle various edge cases that may occur at runtime"] + #[doc = " upgrade boundaries or if governance intervenes."] pub fn buffered_session_changes (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: initializer :: BufferedSessionChange > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ + ::subxt::storage::address::Address::new_static( + "Initializer", + "BufferedSessionChanges", + vec![], + [ + 176u8, 60u8, 165u8, 138u8, 99u8, 140u8, 22u8, 169u8, 121u8, + 65u8, 203u8, 85u8, 39u8, 198u8, 91u8, 167u8, 118u8, 49u8, + 129u8, 128u8, 171u8, 232u8, 249u8, 39u8, 6u8, 101u8, 57u8, + 193u8, 85u8, 143u8, 105u8, 29u8, + ], + ) + } + } + } + } + pub mod dmp { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub struct TransactionApi; + impl TransactionApi {} + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The downward messages addressed for a certain para."] + pub fn downward_message_queues( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - price: ::core::option::Option<::core::primitive::u128>, - whitelisted_buyer: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< ::core::primitive::u32, >, >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "set_price", - SetPrice { - collection, - item, - price, - whitelisted_buyer, - }, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueues", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 159u8, 178u8, 134u8, 144u8, 165u8, 80u8, 141u8, 253u8, 194u8, - 11u8, 8u8, 215u8, 7u8, 82u8, 138u8, 62u8, 81u8, 178u8, 75u8, - 84u8, 97u8, 175u8, 161u8, 97u8, 125u8, 175u8, 70u8, 247u8, - 209u8, 132u8, 48u8, 196u8, + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, + 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, + 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, + 88u8, 94u8, 40u8, 18u8, 31u8, ], ) } - #[doc = "Allows to buy an item if it's up for sale."] - #[doc = ""] - #[doc = "Origin must be Signed and must not be the owner of the `item`."] + #[doc = " The downward messages addressed for a certain para."] + pub fn downward_message_queues_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundDownwardMessage< + ::core::primitive::u32, + >, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueues", + Vec::new(), + [ + 57u8, 115u8, 112u8, 195u8, 25u8, 43u8, 104u8, 199u8, 107u8, + 238u8, 93u8, 129u8, 141u8, 167u8, 167u8, 9u8, 85u8, 34u8, + 53u8, 117u8, 148u8, 246u8, 196u8, 46u8, 96u8, 114u8, 15u8, + 88u8, 94u8, 40u8, 18u8, 31u8, + ], + ) + } + #[doc = " A mapping that stores the downward message queue MQC head for each para."] #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item the sender wants to buy."] - #[doc = "- `bid_price`: The price the sender is willing to pay."] + #[doc = " Each link in this chain has a form:"] + #[doc = " `(prev_head, B, H(M))`, where"] + #[doc = " - `prev_head`: is the previous head hash or zero if none."] + #[doc = " - `B`: is the relay-chain block number in which a message was appended."] + #[doc = " - `H(M)`: is the hash of the message being appended."] + pub fn downward_message_queue_heads( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueueHeads", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, + 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, + 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, + 207u8, 163u8, 104u8, 103u8, 38u8, + ], + ) + } + #[doc = " A mapping that stores the downward message queue MQC head for each para."] #[doc = ""] - #[doc = "Emits `ItemBought` on success."] - pub fn buy_item( + #[doc = " Each link in this chain has a form:"] + #[doc = " `(prev_head, B, H(M))`, where"] + #[doc = " - `prev_head`: is the previous head hash or zero if none."] + #[doc = " - `B`: is the relay-chain block number in which a message was appended."] + #[doc = " - `H(M)`: is the hash of the message being appended."] + pub fn downward_message_queue_heads_root( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - bid_price: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Uniques", - "buy_item", - BuyItem { - collection, - item, - bid_price, - }, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::subxt::utils::H256, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Dmp", + "DownwardMessageQueueHeads", + Vec::new(), [ - 79u8, 39u8, 106u8, 21u8, 227u8, 244u8, 7u8, 107u8, 125u8, - 114u8, 24u8, 254u8, 208u8, 67u8, 31u8, 123u8, 134u8, 29u8, - 94u8, 243u8, 164u8, 137u8, 191u8, 71u8, 17u8, 170u8, 226u8, - 172u8, 233u8, 198u8, 226u8, 33u8, + 137u8, 70u8, 108u8, 184u8, 177u8, 204u8, 17u8, 187u8, 250u8, + 134u8, 85u8, 18u8, 239u8, 185u8, 167u8, 224u8, 70u8, 18u8, + 38u8, 245u8, 176u8, 122u8, 254u8, 251u8, 204u8, 126u8, 34u8, + 207u8, 163u8, 104u8, 103u8, 38u8, ], ) } } } - #[doc = "\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_uniques::pallet::Event; - pub mod events { + } + pub mod ump { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28304,16 +26637,50 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was created."] - pub struct Created { - pub collection: ::core::primitive::u32, - pub creator: ::subxt::utils::AccountId32, - pub owner: ::subxt::utils::AccountId32, + pub struct ServiceOverweight { + pub index: ::core::primitive::u64, + pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Created"; + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Service a single overweight upward message."] + #[doc = ""] + #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] + #[doc = "- `index`: The index of the overweight message to service."] + #[doc = "- `weight_limit`: The amount of weight that message execution may take."] + #[doc = ""] + #[doc = "Errors:"] + #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] + #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] + #[doc = ""] + #[doc = "Events:"] + #[doc = "- `OverweightServiced`: On success."] + pub fn service_overweight( + &self, + index: ::core::primitive::u64, + weight_limit: runtime_types::sp_weights::weight_v2::Weight, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Ump", + "service_overweight", + ServiceOverweight { + index, + weight_limit, + }, + [ + 121u8, 236u8, 235u8, 23u8, 210u8, 238u8, 238u8, 122u8, 15u8, + 86u8, 34u8, 119u8, 105u8, 100u8, 214u8, 236u8, 117u8, 39u8, + 254u8, 235u8, 189u8, 15u8, 72u8, 74u8, 225u8, 134u8, 148u8, + 126u8, 31u8, 203u8, 144u8, 106u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::ump::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28323,17 +26690,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was force-created."] - pub struct ForceCreated { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ForceCreated { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ForceCreated"; + #[doc = "Upward message is invalid XCM."] + #[doc = "\\[ id \\]"] + pub struct InvalidFormat(pub [::core::primitive::u8; 32usize]); + impl ::subxt::events::StaticEvent for InvalidFormat { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "InvalidFormat"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28342,13 +26706,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was destroyed."] - pub struct Destroyed { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Destroyed"; + #[doc = "Upward message is unsupported version of XCM."] + #[doc = "\\[ id \\]"] + pub struct UnsupportedVersion(pub [::core::primitive::u8; 32usize]); + impl ::subxt::events::StaticEvent for UnsupportedVersion { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "UnsupportedVersion"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28359,15 +26722,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was issued."] - pub struct Issued { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Issued"; + #[doc = "Upward message executed with the given outcome."] + #[doc = "\\[ id, outcome \\]"] + pub struct ExecutedUpward( + pub [::core::primitive::u8; 32usize], + pub runtime_types::xcm::v2::traits::Outcome, + ); + impl ::subxt::events::StaticEvent for ExecutedUpward { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "ExecutedUpward"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28378,53 +26741,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was transferred."] - pub struct Transferred { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Transferred { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Transferred"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was destroyed."] - pub struct Burned { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Burned { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Burned"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some `item` was frozen."] - pub struct Frozen { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Frozen { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Frozen"; + #[doc = "The weight limit for handling upward messages was reached."] + #[doc = "\\[ id, remaining, required \\]"] + pub struct WeightExhausted( + pub [::core::primitive::u8; 32usize], + pub runtime_types::sp_weights::weight_v2::Weight, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for WeightExhausted { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "WeightExhausted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28435,17 +26761,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some `item` was thawed."] - pub struct Thawed { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Thawed { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Thawed"; + #[doc = "Some upward messages have been received and will be processed."] + #[doc = "\\[ para, count, size \\]"] + pub struct UpwardMessagesReceived( + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for UpwardMessagesReceived { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "UpwardMessagesReceived"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28454,16 +26781,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some `collection` was frozen."] - pub struct CollectionFrozen { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for CollectionFrozen { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "CollectionFrozen"; + #[doc = "The weight budget was exceeded for an individual upward message."] + #[doc = ""] + #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] + #[doc = "using the assigned `overweight_index`."] + #[doc = ""] + #[doc = "\\[ para, id, overweight_index, required \\]"] + pub struct OverweightEnqueued( + pub runtime_types::polkadot_parachain::primitives::Id, + pub [::core::primitive::u8; 32usize], + pub ::core::primitive::u64, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for OverweightEnqueued { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "OverweightEnqueued"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -28472,14 +26806,294 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some `collection` was thawed."] - pub struct CollectionThawed { - pub collection: ::core::primitive::u32, + #[doc = "Upward message from the overweight queue was executed with the given actual weight"] + #[doc = "used."] + #[doc = ""] + #[doc = "\\[ overweight_index, used \\]"] + pub struct OverweightServiced( + pub ::core::primitive::u64, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for OverweightServiced { + const PALLET: &'static str = "Ump"; + const EVENT: &'static str = "OverweightServiced"; } - impl ::subxt::events::StaticEvent for CollectionThawed { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "CollectionThawed"; + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] + #[doc = ""] + #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] + #[doc = " channel management messages."] + #[doc = ""] + #[doc = " The messages are processed in FIFO order."] + pub fn relay_dispatch_queues( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueues", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, + 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, + 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, + 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) + } + #[doc = " The messages waiting to be handled by the relay-chain originating from a certain parachain."] + #[doc = ""] + #[doc = " Note that some upward messages might have been already processed by the inclusion logic. E.g."] + #[doc = " channel management messages."] + #[doc = ""] + #[doc = " The messages are processed in FIFO order."] + pub fn relay_dispatch_queues_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueues", + Vec::new(), + [ + 237u8, 72u8, 167u8, 6u8, 67u8, 106u8, 186u8, 191u8, 160u8, + 9u8, 62u8, 102u8, 229u8, 164u8, 100u8, 24u8, 202u8, 109u8, + 90u8, 24u8, 192u8, 233u8, 26u8, 239u8, 23u8, 127u8, 77u8, + 191u8, 144u8, 14u8, 3u8, 141u8, + ], + ) + } + #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] + #[doc = ""] + #[doc = " First item in the tuple is the count of messages and second"] + #[doc = " is the total length (in bytes) of the message payloads."] + #[doc = ""] + #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] + #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] + #[doc = " loading the whole message queue if only the total size and count are required."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] + pub fn relay_dispatch_queue_size( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueueSize", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, + 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, + 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, + 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) + } + #[doc = " Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`."] + #[doc = ""] + #[doc = " First item in the tuple is the count of messages and second"] + #[doc = " is the total length (in bytes) of the message payloads."] + #[doc = ""] + #[doc = " Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of"] + #[doc = " messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of"] + #[doc = " loading the whole message queue if only the total size and count are required."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of keys should exactly match the set of keys of `RelayDispatchQueues`."] + pub fn relay_dispatch_queue_size_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "RelayDispatchQueueSize", + Vec::new(), + [ + 243u8, 120u8, 70u8, 2u8, 208u8, 105u8, 180u8, 25u8, 86u8, + 219u8, 151u8, 227u8, 233u8, 53u8, 151u8, 29u8, 231u8, 40u8, + 84u8, 163u8, 71u8, 254u8, 19u8, 47u8, 174u8, 63u8, 200u8, + 173u8, 86u8, 199u8, 207u8, 138u8, + ], + ) + } + #[doc = " The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - The set of items from this vector should be exactly the set of the keys in"] + #[doc = " `RelayDispatchQueues` and `RelayDispatchQueueSize`."] + pub fn needs_dispatch( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "NeedsDispatch", + vec![], + [ + 176u8, 94u8, 152u8, 112u8, 46u8, 124u8, 89u8, 29u8, 92u8, + 104u8, 192u8, 58u8, 59u8, 186u8, 81u8, 150u8, 157u8, 61u8, + 235u8, 182u8, 222u8, 127u8, 109u8, 11u8, 104u8, 175u8, 141u8, + 219u8, 15u8, 152u8, 255u8, 40u8, + ], + ) + } + #[doc = " This is the para that gets will get dispatched first during the next upward dispatchable queue"] + #[doc = " execution round."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - If `Some(para)`, then `para` must be present in `NeedsDispatch`."] + pub fn next_dispatch_round_start_with( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "NextDispatchRoundStartWith", + vec![], + [ + 157u8, 221u8, 6u8, 175u8, 61u8, 99u8, 250u8, 30u8, 177u8, + 53u8, 37u8, 191u8, 138u8, 65u8, 251u8, 216u8, 37u8, 84u8, + 246u8, 76u8, 8u8, 29u8, 18u8, 253u8, 143u8, 75u8, 129u8, + 141u8, 48u8, 178u8, 135u8, 197u8, + ], + ) + } + #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = ""] + #[doc = " These messages stay there until manually dispatched."] + pub fn overweight( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "Overweight", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, + 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, + 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, + 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) + } + #[doc = " The messages that exceeded max individual message weight budget."] + #[doc = ""] + #[doc = " These messages stay there until manually dispatched."] + pub fn overweight_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ( + runtime_types::polkadot_parachain::primitives::Id, + ::std::vec::Vec<::core::primitive::u8>, + ), + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "Overweight", + Vec::new(), + [ + 49u8, 4u8, 221u8, 218u8, 249u8, 183u8, 49u8, 198u8, 48u8, + 42u8, 110u8, 67u8, 47u8, 50u8, 181u8, 141u8, 184u8, 47u8, + 114u8, 3u8, 232u8, 132u8, 32u8, 201u8, 13u8, 213u8, 175u8, + 236u8, 111u8, 87u8, 146u8, 212u8, + ], + ) + } + #[doc = " The number of overweight messages ever recorded in `Overweight` (and thus the lowest free"] + #[doc = " index)."] + pub fn overweight_count( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Ump", + "OverweightCount", + vec![], + [ + 102u8, 180u8, 196u8, 148u8, 115u8, 62u8, 46u8, 238u8, 97u8, + 116u8, 117u8, 42u8, 14u8, 5u8, 72u8, 237u8, 230u8, 46u8, + 150u8, 126u8, 89u8, 64u8, 233u8, 166u8, 180u8, 137u8, 52u8, + 233u8, 252u8, 255u8, 36u8, 20u8, + ], + ) + } } + } + } + pub mod hrmp { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28489,14 +27103,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The owner changed."] - pub struct OwnerChanged { - pub collection: ::core::primitive::u32, - pub new_owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for OwnerChanged { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "OwnerChanged"; + pub struct HrmpInitOpenChannel { + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + pub proposed_max_capacity: ::core::primitive::u32, + pub proposed_max_message_size: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28507,16 +27117,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The management team changed."] - pub struct TeamChanged { - pub collection: ::core::primitive::u32, - pub issuer: ::subxt::utils::AccountId32, - pub admin: ::subxt::utils::AccountId32, - pub freezer: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for TeamChanged { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "TeamChanged"; + pub struct HrmpAcceptOpenChannel { + pub sender: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28527,17 +27129,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] - #[doc = "a `delegate`."] - pub struct ApprovedTransfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ApprovedTransfer { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ApprovedTransfer"; + pub struct HrmpCloseChannel { + pub channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28548,17 +27142,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] - #[doc = "`collection` was cancelled by its `owner`."] - pub struct ApprovalCancelled { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ApprovalCancelled { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ApprovalCancelled"; + pub struct ForceCleanHrmp { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub inbound: ::core::primitive::u32, + pub outbound: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -28570,34 +27157,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` has had its attributes changed by the `Force` origin."] - pub struct ItemStatusChanged { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ItemStatusChanged { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ItemStatusChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New metadata has been set for a `collection`."] - pub struct CollectionMetadataSet { - pub collection: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub is_frozen: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for CollectionMetadataSet { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "CollectionMetadataSet"; + pub struct ForceProcessHrmpOpen { + pub channels: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -28609,71 +27170,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for a `collection`."] - pub struct CollectionMetadataCleared { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for CollectionMetadataCleared { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "CollectionMetadataCleared"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New metadata has been set for an item."] - pub struct MetadataSet { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub is_frozen: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for MetadataSet { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "MetadataSet"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for an item."] - pub struct MetadataCleared { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for MetadataCleared { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "MetadataCleared"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for an item."] - pub struct Redeposited { - pub collection: ::core::primitive::u32, - pub successful_items: ::std::vec::Vec<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for Redeposited { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "Redeposited"; + pub struct ForceProcessHrmpClose { + pub channels: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28684,20 +27182,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New attribute metadata has been set for a `collection` or `item`."] - pub struct AttributeSet { - pub collection: ::core::primitive::u32, - pub maybe_item: ::core::option::Option<::core::primitive::u32>, - pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - impl ::subxt::events::StaticEvent for AttributeSet { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "AttributeSet"; + pub struct HrmpCancelOpenRequest { + pub channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + pub open_requests: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28708,18 +27196,222 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] - pub struct AttributeCleared { - pub collection: ::core::primitive::u32, - pub maybe_item: ::core::option::Option<::core::primitive::u32>, - pub key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + pub struct ForceOpenHrmpChannel { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + pub max_capacity: ::core::primitive::u32, + pub max_message_size: ::core::primitive::u32, } - impl ::subxt::events::StaticEvent for AttributeCleared { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "AttributeCleared"; + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] + #[doc = "parameters."] + #[doc = ""] + #[doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] + #[doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] + #[doc = ""] + #[doc = "These numbers are a subject to the relay-chain configuration limits."] + #[doc = ""] + #[doc = "The channel can be opened only after the recipient confirms it and only on a session"] + #[doc = "change."] + pub fn hrmp_init_open_channel( + &self, + recipient: runtime_types::polkadot_parachain::primitives::Id, + proposed_max_capacity: ::core::primitive::u32, + proposed_max_message_size: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "hrmp_init_open_channel", + HrmpInitOpenChannel { + recipient, + proposed_max_capacity, + proposed_max_message_size, + }, + [ + 170u8, 72u8, 58u8, 42u8, 38u8, 11u8, 110u8, 229u8, 239u8, + 136u8, 99u8, 230u8, 223u8, 225u8, 126u8, 61u8, 234u8, 185u8, + 101u8, 156u8, 40u8, 102u8, 253u8, 123u8, 77u8, 204u8, 217u8, + 86u8, 162u8, 66u8, 25u8, 214u8, + ], + ) + } + #[doc = "Accept a pending open channel request from the given sender."] + #[doc = ""] + #[doc = "The channel will be opened only on the next session boundary."] + pub fn hrmp_accept_open_channel( + &self, + sender: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "hrmp_accept_open_channel", + HrmpAcceptOpenChannel { sender }, + [ + 75u8, 111u8, 52u8, 164u8, 204u8, 100u8, 204u8, 111u8, 127u8, + 84u8, 60u8, 136u8, 95u8, 255u8, 48u8, 157u8, 189u8, 76u8, + 33u8, 177u8, 223u8, 27u8, 74u8, 221u8, 139u8, 1u8, 12u8, + 128u8, 242u8, 7u8, 3u8, 53u8, + ], + ) + } + #[doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] + #[doc = "recipient in the channel being closed."] + #[doc = ""] + #[doc = "The closure can only happen on a session change."] + pub fn hrmp_close_channel( + &self, + channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "hrmp_close_channel", + HrmpCloseChannel { channel_id }, + [ + 11u8, 202u8, 76u8, 107u8, 213u8, 21u8, 191u8, 190u8, 40u8, + 229u8, 60u8, 115u8, 232u8, 136u8, 41u8, 114u8, 21u8, 19u8, + 238u8, 236u8, 202u8, 56u8, 212u8, 232u8, 34u8, 84u8, 27u8, + 70u8, 176u8, 252u8, 218u8, 52u8, + ], + ) + } + #[doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] + #[doc = "a para may have. Normally this happens once per session, but this allows"] + #[doc = "you to trigger the cleanup immediately for a specific parachain."] + #[doc = ""] + #[doc = "Origin must be Root."] + #[doc = ""] + #[doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] + pub fn force_clean_hrmp( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + inbound: ::core::primitive::u32, + outbound: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "force_clean_hrmp", + ForceCleanHrmp { + para, + inbound, + outbound, + }, + [ + 171u8, 109u8, 147u8, 49u8, 163u8, 107u8, 36u8, 169u8, 117u8, + 193u8, 231u8, 114u8, 207u8, 38u8, 240u8, 195u8, 155u8, 222u8, + 244u8, 142u8, 93u8, 79u8, 111u8, 43u8, 5u8, 33u8, 190u8, + 30u8, 200u8, 225u8, 173u8, 64u8, + ], + ) + } + #[doc = "Force process HRMP open channel requests."] + #[doc = ""] + #[doc = "If there are pending HRMP open channel requests, you can use this"] + #[doc = "function process all of those requests immediately."] + #[doc = ""] + #[doc = "Total number of opening channels must be provided as witness data of weighing."] + pub fn force_process_hrmp_open( + &self, + channels: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "force_process_hrmp_open", + ForceProcessHrmpOpen { channels }, + [ + 231u8, 80u8, 233u8, 15u8, 131u8, 167u8, 223u8, 28u8, 182u8, + 185u8, 213u8, 24u8, 154u8, 160u8, 68u8, 94u8, 160u8, 59u8, + 78u8, 85u8, 85u8, 149u8, 130u8, 131u8, 9u8, 162u8, 169u8, + 119u8, 165u8, 44u8, 150u8, 50u8, + ], + ) + } + #[doc = "Force process HRMP close channel requests."] + #[doc = ""] + #[doc = "If there are pending HRMP close channel requests, you can use this"] + #[doc = "function process all of those requests immediately."] + #[doc = ""] + #[doc = "Total number of closing channels must be provided as witness data of weighing."] + pub fn force_process_hrmp_close( + &self, + channels: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "force_process_hrmp_close", + ForceProcessHrmpClose { channels }, + [ + 248u8, 138u8, 30u8, 151u8, 53u8, 16u8, 44u8, 116u8, 51u8, + 194u8, 173u8, 252u8, 143u8, 53u8, 184u8, 129u8, 80u8, 80u8, + 25u8, 118u8, 47u8, 183u8, 249u8, 130u8, 8u8, 221u8, 56u8, + 106u8, 182u8, 114u8, 186u8, 161u8, + ], + ) + } + #[doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] + #[doc = "or the recipient for that request. The origin must be either of those."] + #[doc = ""] + #[doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] + #[doc = "already accepted."] + #[doc = ""] + #[doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] + #[doc = "witness data."] + pub fn hrmp_cancel_open_request( + &self, + channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId, + open_requests: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "hrmp_cancel_open_request", + HrmpCancelOpenRequest { + channel_id, + open_requests, + }, + [ + 136u8, 217u8, 56u8, 138u8, 227u8, 37u8, 120u8, 83u8, 116u8, + 228u8, 42u8, 111u8, 206u8, 210u8, 177u8, 235u8, 225u8, 98u8, + 172u8, 184u8, 87u8, 65u8, 77u8, 129u8, 7u8, 0u8, 232u8, + 139u8, 134u8, 1u8, 59u8, 19u8, + ], + ) + } + #[doc = "Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although"] + #[doc = "opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay"] + #[doc = "Chain's configured limits."] + #[doc = ""] + #[doc = "Expected use is when one of the `ParaId`s involved in the channel is governed by the"] + #[doc = "Relay Chain, e.g. a common good parachain."] + pub fn force_open_hrmp_channel( + &self, + sender: runtime_types::polkadot_parachain::primitives::Id, + recipient: runtime_types::polkadot_parachain::primitives::Id, + max_capacity: ::core::primitive::u32, + max_message_size: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Hrmp", + "force_open_hrmp_channel", + ForceOpenHrmpChannel { + sender, + recipient, + max_capacity, + max_message_size, + }, + [ + 145u8, 23u8, 215u8, 75u8, 94u8, 119u8, 205u8, 222u8, 186u8, + 149u8, 11u8, 172u8, 211u8, 158u8, 247u8, 21u8, 125u8, 144u8, + 91u8, 157u8, 94u8, 143u8, 188u8, 20u8, 98u8, 136u8, 165u8, + 70u8, 155u8, 14u8, 92u8, 58u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -28729,14 +27421,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Ownership acceptance has changed for an account."] - pub struct OwnershipAcceptanceChanged { - pub who: ::subxt::utils::AccountId32, - pub maybe_collection: ::core::option::Option<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for OwnershipAcceptanceChanged { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "OwnershipAcceptanceChanged"; + #[doc = "Open HRMP channel requested."] + #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] + pub struct OpenChannelRequested( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for OpenChannelRequested { + const PALLET: &'static str = "Hrmp"; + const EVENT: &'static str = "OpenChannelRequested"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28747,14 +27442,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Max supply has been set for a collection."] - pub struct CollectionMaxSupplySet { - pub collection: ::core::primitive::u32, - pub max_supply: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for CollectionMaxSupplySet { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "CollectionMaxSupplySet"; + #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] + #[doc = "`[by_parachain, channel_id]`"] + pub struct OpenChannelCanceled( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ); + impl ::subxt::events::StaticEvent for OpenChannelCanceled { + const PALLET: &'static str = "Hrmp"; + const EVENT: &'static str = "OpenChannelCanceled"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28765,17 +27461,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The price was set for the instance."] - pub struct ItemPriceSet { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::primitive::u128, - pub whitelisted_buyer: - ::core::option::Option<::subxt::utils::AccountId32>, - } - impl ::subxt::events::StaticEvent for ItemPriceSet { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ItemPriceSet"; + #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] + pub struct OpenChannelAccepted( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_parachain::primitives::Id, + ); + impl ::subxt::events::StaticEvent for OpenChannelAccepted { + const PALLET: &'static str = "Hrmp"; + const EVENT: &'static str = "OpenChannelAccepted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28786,14 +27479,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The price for the instance was removed."] - pub struct ItemPriceRemoved { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ItemPriceRemoved { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ItemPriceRemoved"; + #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] + pub struct ChannelClosed( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ); + impl ::subxt::events::StaticEvent for ChannelClosed { + const PALLET: &'static str = "Hrmp"; + const EVENT: &'static str = "ChannelClosed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -28804,598 +27497,788 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An item was bought."] - pub struct ItemBought { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::primitive::u128, - pub seller: ::subxt::utils::AccountId32, - pub buyer: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ItemBought { - const PALLET: &'static str = "Uniques"; - const EVENT: &'static str = "ItemBought"; + #[doc = "An HRMP channel was opened via Root origin."] + #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] + pub struct HrmpChannelForceOpened( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_parachain::primitives::Id, + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for HrmpChannelForceOpened { + const PALLET: &'static str = "Hrmp"; + const EVENT: &'static str = "HrmpChannelForceOpened"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Details of a collection."] - pub fn class( + #[doc = " The set of pending HRMP open channel requests."] + #[doc = ""] + #[doc = " The set is accompanied by a list for iteration."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests (& self , _0 : impl :: std :: borrow :: Borrow < runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId > ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpOpenChannelRequests", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, + 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, + 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, + 235u8, 74u8, 181u8, 169u8, + ], + ) + } + #[doc = " The set of pending HRMP open channel requests."] + #[doc = ""] + #[doc = " The set is accompanied by a list for iteration."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] pub fn hrmp_open_channel_requests_root (& self ,) -> :: subxt :: storage :: address :: Address :: < :: subxt :: storage :: address :: StaticStorageMapKey , runtime_types :: polkadot_runtime_parachains :: hrmp :: HrmpOpenChannelRequest , () , () , :: subxt :: storage :: address :: Yes >{ + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpOpenChannelRequests", + Vec::new(), + [ + 226u8, 115u8, 207u8, 13u8, 5u8, 81u8, 64u8, 161u8, 246u8, + 4u8, 17u8, 207u8, 210u8, 109u8, 91u8, 54u8, 28u8, 53u8, 35u8, + 74u8, 62u8, 91u8, 196u8, 236u8, 18u8, 70u8, 13u8, 86u8, + 235u8, 74u8, 181u8, 169u8, + ], + ) + } + pub fn hrmp_open_channel_requests_list( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::CollectionDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, (), + > { + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpOpenChannelRequestsList", + vec![], + [ + 187u8, 157u8, 7u8, 183u8, 88u8, 215u8, 128u8, 174u8, 244u8, + 130u8, 137u8, 13u8, 110u8, 126u8, 181u8, 165u8, 142u8, 69u8, + 75u8, 37u8, 37u8, 149u8, 46u8, 100u8, 140u8, 69u8, 234u8, + 171u8, 103u8, 136u8, 223u8, 193u8, + ], + ) + } + #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] + #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] + #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] + pub fn hrmp_open_channel_request_count( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::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::StaticStorageAddress::new( - "Uniques", - "Class", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpOpenChannelRequestCount", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 32u8, 21u8, 193u8, 165u8, 1u8, 239u8, 178u8, 63u8, 20u8, - 180u8, 240u8, 180u8, 62u8, 46u8, 37u8, 198u8, 10u8, 245u8, - 49u8, 64u8, 27u8, 217u8, 0u8, 251u8, 116u8, 50u8, 166u8, - 201u8, 108u8, 73u8, 233u8, 218u8, + 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, + 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, + 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, + 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, ], ) } - #[doc = " Details of a collection."] - pub fn class_root( + #[doc = " This mapping tracks how many open channel requests are initiated by a given sender para."] + #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has"] + #[doc = " `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`."] + pub fn hrmp_open_channel_request_count_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::CollectionDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "Class", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpOpenChannelRequestCount", Vec::new(), [ - 32u8, 21u8, 193u8, 165u8, 1u8, 239u8, 178u8, 63u8, 20u8, - 180u8, 240u8, 180u8, 62u8, 46u8, 37u8, 198u8, 10u8, 245u8, - 49u8, 64u8, 27u8, 217u8, 0u8, 251u8, 116u8, 50u8, 166u8, - 201u8, 108u8, 73u8, 233u8, 218u8, + 156u8, 87u8, 232u8, 34u8, 30u8, 237u8, 159u8, 78u8, 212u8, + 138u8, 140u8, 206u8, 191u8, 117u8, 209u8, 218u8, 251u8, + 146u8, 217u8, 56u8, 93u8, 15u8, 131u8, 64u8, 126u8, 253u8, + 126u8, 1u8, 12u8, 242u8, 176u8, 217u8, ], ) } - #[doc = " The collection, if any, of which an account is willing to take ownership."] - pub fn ownership_acceptance( + #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] + #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] + #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] + pub fn hrmp_accepted_channel_request_count( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::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::StaticStorageAddress::new( - "Uniques", - "OwnershipAcceptance", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpAcceptedChannelRequestCount", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, - 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, - 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, - 90u8, 51u8, 167u8, 189u8, 39u8, + 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, + 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, + 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, + 164u8, 161u8, 6u8, 15u8, 15u8, ], ) } - #[doc = " The collection, if any, of which an account is willing to take ownership."] - pub fn ownership_acceptance_root( + #[doc = " This mapping tracks how many open channel requests were accepted by a given recipient para."] + #[doc = " Invariant: `HrmpOpenChannelRequests` should contain the same number of items `(_, X)` with"] + #[doc = " `confirmed` set to true, as the number of `HrmpAcceptedChannelRequestCount` for `X`."] + pub fn hrmp_accepted_channel_request_count_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ::core::primitive::u32, (), - (), + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "OwnershipAcceptance", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpAcceptedChannelRequestCount", Vec::new(), [ - 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, - 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, - 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, - 90u8, 51u8, 167u8, 189u8, 39u8, + 93u8, 183u8, 17u8, 253u8, 119u8, 213u8, 106u8, 205u8, 17u8, + 10u8, 230u8, 242u8, 5u8, 223u8, 49u8, 235u8, 41u8, 221u8, + 80u8, 51u8, 153u8, 62u8, 191u8, 3u8, 120u8, 224u8, 46u8, + 164u8, 161u8, 6u8, 15u8, 15u8, ], ) } - #[doc = " The items held by any given account; set out this way so that items owned by a single"] - #[doc = " account can be enumerated."] - pub fn account( + #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] + #[doc = " change. Used for checking if a given channel is registered for closure."] + #[doc = ""] + #[doc = " The set is accompanied by a list for iteration."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] + pub fn hrmp_close_channel_requests( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - _2: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, (), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [83u8 , 188u8 , 8u8 , 123u8 , 84u8 , 224u8 , 52u8 , 18u8 , 81u8 , 207u8 , 139u8 , 149u8 , 209u8 , 246u8 , 211u8 , 132u8 , 63u8 , 86u8 , 145u8 , 33u8 , 4u8 , 252u8 , 90u8 , 88u8 , 89u8 , 145u8 , 147u8 , 164u8 , 223u8 , 162u8 , 119u8 , 161u8 ,]) + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpCloseChannelRequests", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, + 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, + 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, + 176u8, 134u8, 223u8, 39u8, 87u8, + ], + ) } - #[doc = " The items held by any given account; set out this way so that items owned by a single"] - #[doc = " account can be enumerated."] - pub fn account_root( + #[doc = " A set of pending HRMP close channel requests that are going to be closed during the session"] + #[doc = " change. Used for checking if a given channel is registered for closure."] + #[doc = ""] + #[doc = " The set is accompanied by a list for iteration."] + #[doc = ""] + #[doc = " Invariant:"] + #[doc = " - There are no channels that exists in list but not in the set and vice versa."] + pub fn hrmp_close_channel_requests_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, (), (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "Account", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpCloseChannelRequests", Vec::new(), [ - 83u8, 188u8, 8u8, 123u8, 84u8, 224u8, 52u8, 18u8, 81u8, - 207u8, 139u8, 149u8, 209u8, 246u8, 211u8, 132u8, 63u8, 86u8, - 145u8, 33u8, 4u8, 252u8, 90u8, 88u8, 89u8, 145u8, 147u8, - 164u8, 223u8, 162u8, 119u8, 161u8, + 125u8, 131u8, 1u8, 231u8, 19u8, 207u8, 229u8, 72u8, 150u8, + 100u8, 165u8, 215u8, 241u8, 165u8, 91u8, 35u8, 230u8, 148u8, + 127u8, 249u8, 128u8, 221u8, 167u8, 172u8, 67u8, 30u8, 177u8, + 176u8, 134u8, 223u8, 39u8, 87u8, ], ) } - #[doc = " The collections owned by any given account; set out this way so that collections owned by"] - #[doc = " a single account can be enumerated."] - pub fn class_account( + pub fn hrmp_close_channel_requests_list( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "ClassAccount" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [150u8 , 252u8 , 105u8 , 208u8 , 130u8 , 203u8 , 171u8 , 17u8 , 240u8 , 159u8 , 148u8 , 32u8 , 191u8 , 48u8 , 240u8 , 199u8 , 128u8 , 68u8 , 24u8 , 41u8 , 77u8 , 159u8 , 32u8 , 109u8 , 37u8 , 65u8 , 127u8 , 147u8 , 65u8 , 91u8 , 111u8 , 175u8 ,]) - } - #[doc = " The collections owned by any given account; set out this way so that collections owned by"] - #[doc = " a single account can be enumerated."] - pub fn class_account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "ClassAccount", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpCloseChannelRequestsList", + vec![], [ - 150u8, 252u8, 105u8, 208u8, 130u8, 203u8, 171u8, 17u8, 240u8, - 159u8, 148u8, 32u8, 191u8, 48u8, 240u8, 199u8, 128u8, 68u8, - 24u8, 41u8, 77u8, 159u8, 32u8, 109u8, 37u8, 65u8, 127u8, - 147u8, 65u8, 91u8, 111u8, 175u8, + 192u8, 165u8, 71u8, 70u8, 211u8, 233u8, 155u8, 146u8, 160u8, + 58u8, 103u8, 64u8, 123u8, 232u8, 157u8, 71u8, 199u8, 223u8, + 158u8, 5u8, 164u8, 93u8, 231u8, 153u8, 1u8, 63u8, 155u8, 4u8, + 138u8, 89u8, 178u8, 116u8, ], ) } - #[doc = " The items in existence and their ownership details."] - pub fn asset( + #[doc = " The HRMP watermark associated with each para."] + #[doc = " Invariant:"] + #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] + pub fn hrmp_watermarks( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::ItemDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "Asset" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [91u8 , 5u8 , 41u8 , 213u8 , 166u8 , 235u8 , 22u8 , 162u8 , 111u8 , 84u8 , 106u8 , 54u8 , 15u8 , 132u8 , 79u8 , 56u8 , 143u8 , 39u8 , 101u8 , 224u8 , 232u8 , 98u8 , 165u8 , 137u8 , 182u8 , 175u8 , 150u8 , 169u8 , 120u8 , 198u8 , 189u8 , 55u8 ,]) + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpWatermarks", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, + 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, + 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, + 19u8, 129u8, 51u8, 103u8, 155u8, + ], + ) } - #[doc = " The items in existence and their ownership details."] - pub fn asset_root( + #[doc = " The HRMP watermark associated with each para."] + #[doc = " Invariant:"] + #[doc = " - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session."] + pub fn hrmp_watermarks_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::ItemDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "Asset", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpWatermarks", Vec::new(), [ - 91u8, 5u8, 41u8, 213u8, 166u8, 235u8, 22u8, 162u8, 111u8, - 84u8, 106u8, 54u8, 15u8, 132u8, 79u8, 56u8, 143u8, 39u8, - 101u8, 224u8, 232u8, 98u8, 165u8, 137u8, 182u8, 175u8, 150u8, - 169u8, 120u8, 198u8, 189u8, 55u8, + 231u8, 195u8, 117u8, 35u8, 235u8, 18u8, 80u8, 28u8, 212u8, + 37u8, 253u8, 204u8, 71u8, 217u8, 12u8, 35u8, 219u8, 250u8, + 45u8, 83u8, 102u8, 236u8, 186u8, 149u8, 54u8, 31u8, 83u8, + 19u8, 129u8, 51u8, 103u8, 155u8, ], ) } - #[doc = " Metadata of a collection."] - pub fn class_metadata_of( + #[doc = " HRMP channel data associated with each para."] + #[doc = " Invariant:"] + #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] + pub fn hrmp_channels( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::CollectionMetadata< - ::core::primitive::u128, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "ClassMetadataOf", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannels", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 30u8, 185u8, 220u8, 71u8, 235u8, 255u8, 56u8, 170u8, 95u8, - 244u8, 64u8, 125u8, 173u8, 211u8, 208u8, 153u8, 179u8, 237u8, - 82u8, 45u8, 113u8, 6u8, 239u8, 245u8, 151u8, 224u8, 74u8, - 69u8, 47u8, 127u8, 163u8, 102u8, + 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, + 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, + 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, + 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, ], ) } - #[doc = " Metadata of a collection."] - pub fn class_metadata_of_root( + #[doc = " HRMP channel data associated with each para."] + #[doc = " Invariant:"] + #[doc = " - each participant in the channel should satisfy `Paras::is_valid_para(P)` within a session."] + pub fn hrmp_channels_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::CollectionMetadata< - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_parachains::hrmp::HrmpChannel, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "ClassMetadataOf", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannels", Vec::new(), [ - 30u8, 185u8, 220u8, 71u8, 235u8, 255u8, 56u8, 170u8, 95u8, - 244u8, 64u8, 125u8, 173u8, 211u8, 208u8, 153u8, 179u8, 237u8, - 82u8, 45u8, 113u8, 6u8, 239u8, 245u8, 151u8, 224u8, 74u8, - 69u8, 47u8, 127u8, 163u8, 102u8, + 224u8, 252u8, 187u8, 122u8, 179u8, 193u8, 227u8, 250u8, + 255u8, 216u8, 107u8, 26u8, 224u8, 16u8, 178u8, 111u8, 77u8, + 237u8, 177u8, 148u8, 22u8, 17u8, 213u8, 99u8, 194u8, 140u8, + 217u8, 211u8, 151u8, 51u8, 66u8, 169u8, ], ) } - #[doc = " Metadata of an item."] - pub fn instance_metadata_of( + #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] + #[doc = " I.e."] + #[doc = ""] + #[doc = " (a) ingress index allows to find all the senders for a given recipient."] + #[doc = " (b) egress index allows to find all the recipients for a given sender."] + #[doc = ""] + #[doc = " Invariants:"] + #[doc = " - for each ingress index entry for `P` each item `I` in the index should present in"] + #[doc = " `HrmpChannels` as `(I, P)`."] + #[doc = " - for each egress index entry for `P` each item `E` in the index should present in"] + #[doc = " `HrmpChannels` as `(P, E)`."] + #[doc = " - there should be no other dangling channels in `HrmpChannels`."] + #[doc = " - the vectors are sorted."] + pub fn hrmp_ingress_channels_index( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::ItemMetadata< - ::core::primitive::u128, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "InstanceMetadataOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [53u8 , 239u8 , 109u8 , 42u8 , 253u8 , 16u8 , 125u8 , 128u8 , 52u8 , 166u8 , 174u8 , 60u8 , 17u8 , 144u8 , 226u8 , 83u8 , 199u8 , 35u8 , 195u8 , 77u8 , 57u8 , 13u8 , 128u8 , 49u8 , 47u8 , 115u8 , 239u8 , 33u8 , 33u8 , 127u8 , 154u8 , 247u8 ,]) + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpIngressChannelsIndex", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, + 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, + 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, + 175u8, 234u8, 0u8, 101u8, 99u8, + ], + ) } - #[doc = " Metadata of an item."] - pub fn instance_metadata_of_root( + #[doc = " Ingress/egress indexes allow to find all the senders and receivers given the opposite side."] + #[doc = " I.e."] + #[doc = ""] + #[doc = " (a) ingress index allows to find all the senders for a given recipient."] + #[doc = " (b) egress index allows to find all the recipients for a given sender."] + #[doc = ""] + #[doc = " Invariants:"] + #[doc = " - for each ingress index entry for `P` each item `I` in the index should present in"] + #[doc = " `HrmpChannels` as `(I, P)`."] + #[doc = " - for each egress index entry for `P` each item `E` in the index should present in"] + #[doc = " `HrmpChannels` as `(P, E)`."] + #[doc = " - there should be no other dangling channels in `HrmpChannels`."] + #[doc = " - the vectors are sorted."] + pub fn hrmp_ingress_channels_index_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_uniques::types::ItemMetadata< - ::core::primitive::u128, - >, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "InstanceMetadataOf", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpIngressChannelsIndex", Vec::new(), [ - 53u8, 239u8, 109u8, 42u8, 253u8, 16u8, 125u8, 128u8, 52u8, - 166u8, 174u8, 60u8, 17u8, 144u8, 226u8, 83u8, 199u8, 35u8, - 195u8, 77u8, 57u8, 13u8, 128u8, 49u8, 47u8, 115u8, 239u8, - 33u8, 33u8, 127u8, 154u8, 247u8, + 58u8, 193u8, 212u8, 225u8, 48u8, 195u8, 119u8, 15u8, 61u8, + 166u8, 249u8, 1u8, 118u8, 67u8, 253u8, 40u8, 58u8, 220u8, + 124u8, 152u8, 4u8, 16u8, 155u8, 151u8, 195u8, 15u8, 205u8, + 175u8, 234u8, 0u8, 101u8, 99u8, ], ) } - #[doc = " Attributes of a collection."] - pub fn attribute( + pub fn hrmp_egress_channels_index( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - ::core::option::Option<::core::primitive::u32>, - >, - _2: impl ::std::borrow::Borrow< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::core::primitive::u128, - ), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "Attribute" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [101u8 , 37u8 , 8u8 , 243u8 , 33u8 , 252u8 , 251u8 , 102u8 , 206u8 , 223u8 , 64u8 , 117u8 , 252u8 , 22u8 , 122u8 , 201u8 , 99u8 , 126u8 , 64u8 , 208u8 , 136u8 , 97u8 , 244u8 , 139u8 , 17u8 , 112u8 , 67u8 , 70u8 , 148u8 , 164u8 , 167u8 , 188u8 ,]) + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpEgressChannelsIndex", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, + 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, + 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, + 236u8, 211u8, 32u8, 177u8, 88u8, + ], + ) } - #[doc = " Attributes of a collection."] - pub fn attribute_root( + pub fn hrmp_egress_channels_index_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::core::primitive::u128, - ), - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "Attribute", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpEgressChannelsIndex", Vec::new(), [ - 101u8, 37u8, 8u8, 243u8, 33u8, 252u8, 251u8, 102u8, 206u8, - 223u8, 64u8, 117u8, 252u8, 22u8, 122u8, 201u8, 99u8, 126u8, - 64u8, 208u8, 136u8, 97u8, 244u8, 139u8, 17u8, 112u8, 67u8, - 70u8, 148u8, 164u8, 167u8, 188u8, + 9u8, 242u8, 41u8, 234u8, 85u8, 193u8, 232u8, 245u8, 254u8, + 26u8, 240u8, 113u8, 184u8, 151u8, 150u8, 44u8, 43u8, 98u8, + 84u8, 209u8, 145u8, 175u8, 128u8, 68u8, 183u8, 112u8, 171u8, + 236u8, 211u8, 32u8, 177u8, 88u8, ], ) } - #[doc = " Price of an asset instance."] - pub fn item_price_of( + #[doc = " Storage for the messages for each channel."] + #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] + pub fn hrmp_channel_contents( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - ::core::primitive::u128, - ::core::option::Option<::subxt::utils::AccountId32>, - ), + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, + >, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Uniques" , "ItemPriceOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [63u8 , 143u8 , 204u8 , 99u8 , 128u8 , 218u8 , 233u8 , 140u8 , 216u8 , 44u8 , 248u8 , 111u8 , 204u8 , 40u8 , 248u8 , 249u8 , 24u8 , 130u8 , 50u8 , 255u8 , 30u8 , 42u8 , 220u8 , 136u8 , 228u8 , 64u8 , 158u8 , 195u8 , 233u8 , 105u8 , 137u8 , 216u8 ,]) + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannelContents", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, + 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, + 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, + 150u8, 193u8, 90u8, 196u8, 225u8, + ], + ) } - #[doc = " Price of an asset instance."] - pub fn item_price_of_root( + #[doc = " Storage for the messages for each channel."] + #[doc = " Invariant: cannot be non-empty if the corresponding channel in `HrmpChannels` is `None`."] + pub fn hrmp_channel_contents_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - ::core::primitive::u128, - ::core::option::Option<::subxt::utils::AccountId32>, - ), - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_core_primitives::InboundHrmpMessage< + ::core::primitive::u32, + >, + >, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "ItemPriceOf", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannelContents", Vec::new(), [ - 63u8, 143u8, 204u8, 99u8, 128u8, 218u8, 233u8, 140u8, 216u8, - 44u8, 248u8, 111u8, 204u8, 40u8, 248u8, 249u8, 24u8, 130u8, - 50u8, 255u8, 30u8, 42u8, 220u8, 136u8, 228u8, 64u8, 158u8, - 195u8, 233u8, 105u8, 137u8, 216u8, + 114u8, 86u8, 172u8, 88u8, 118u8, 243u8, 133u8, 147u8, 108u8, + 60u8, 128u8, 235u8, 45u8, 80u8, 225u8, 130u8, 89u8, 50u8, + 40u8, 118u8, 63u8, 3u8, 83u8, 222u8, 75u8, 167u8, 148u8, + 150u8, 193u8, 90u8, 196u8, 225u8, ], ) } - #[doc = " Keeps track of the number of items a collection might have."] - pub fn collection_max_supply( + #[doc = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] + #[doc = " the given block number for a given receiver. Invariants:"] + #[doc = " - The inner `Vec` is never empty."] + #[doc = " - The inner `Vec` cannot store two same `ParaId`."] + #[doc = " - The outer vector is sorted ascending by block number and cannot store two items with the"] + #[doc = " same block number."] + pub fn hrmp_channel_digests( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, + ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "CollectionMaxSupply", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannelDigests", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 86u8, 134u8, 143u8, 101u8, 154u8, 17u8, 75u8, 144u8, 113u8, - 61u8, 172u8, 98u8, 72u8, 224u8, 127u8, 136u8, 27u8, 129u8, - 56u8, 236u8, 141u8, 59u8, 174u8, 48u8, 29u8, 214u8, 36u8, - 121u8, 25u8, 141u8, 122u8, 196u8, + 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, + 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, + 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, + 132u8, 73u8, 133u8, 79u8, 104u8, ], ) } - #[doc = " Keeps track of the number of items a collection might have."] - pub fn collection_max_supply_root( + #[doc = " Maintains a mapping that can be used to answer the question: What paras sent a message at"] + #[doc = " the given block number for a given receiver. Invariants:"] + #[doc = " - The inner `Vec` is never empty."] + #[doc = " - The inner `Vec` cannot store two same `ParaId`."] + #[doc = " - The outer vector is sorted ascending by block number and cannot store two items with the"] + #[doc = " same block number."] + pub fn hrmp_channel_digests_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<( + ::core::primitive::u32, + ::std::vec::Vec< + runtime_types::polkadot_parachain::primitives::Id, + >, + )>, (), ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Uniques", - "CollectionMaxSupply", + ::subxt::storage::address::Address::new_static( + "Hrmp", + "HrmpChannelDigests", Vec::new(), [ - 86u8, 134u8, 143u8, 101u8, 154u8, 17u8, 75u8, 144u8, 113u8, - 61u8, 172u8, 98u8, 72u8, 224u8, 127u8, 136u8, 27u8, 129u8, - 56u8, 236u8, 141u8, 59u8, 174u8, 48u8, 29u8, 214u8, 36u8, - 121u8, 25u8, 141u8, 122u8, 196u8, + 205u8, 18u8, 60u8, 54u8, 123u8, 40u8, 160u8, 149u8, 174u8, + 45u8, 135u8, 213u8, 83u8, 44u8, 97u8, 243u8, 47u8, 200u8, + 156u8, 131u8, 15u8, 63u8, 170u8, 206u8, 101u8, 17u8, 244u8, + 132u8, 73u8, 133u8, 79u8, 104u8, ], ) } } } - pub mod constants { + } + pub mod para_session_info { + use super::root_mod; + use super::runtime_types; + pub mod storage { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The basic amount of funds that must be reserved for collection."] - pub fn collection_deposit( + pub struct StorageApi; + impl StorageApi { + #[doc = " Assignment keys for the current session."] + #[doc = " Note that this API is private due to it being prone to 'off-by-one' at session boundaries."] + #[doc = " When in doubt, use `Sessions` API instead."] + pub fn assignment_keys_unsafe( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "CollectionDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved for an item."] - pub fn item_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "ItemDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved when adding metadata to your item."] - pub fn metadata_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "MetadataDepositBase", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::assignment_app::Public, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "AssignmentKeysUnsafe", + 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, + 80u8, 24u8, 61u8, 132u8, 118u8, 225u8, 207u8, 75u8, 35u8, + 240u8, 209u8, 255u8, 19u8, 240u8, 114u8, 174u8, 86u8, 65u8, + 65u8, 52u8, 135u8, 232u8, 59u8, 208u8, 3u8, 107u8, 114u8, + 241u8, 14u8, 98u8, 40u8, 226u8, ], ) } - #[doc = " The basic amount of funds that must be reserved when adding an attribute to an item."] - pub fn attribute_deposit_base( + #[doc = " The earliest session for which previous session info is stored."] + pub fn earliest_stored_session( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "AttributeDepositBase", + ) -> ::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( + "ParaSessionInfo", + "EarliestStoredSession", + 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, + 25u8, 143u8, 246u8, 184u8, 35u8, 166u8, 140u8, 147u8, 171u8, + 5u8, 164u8, 159u8, 228u8, 21u8, 248u8, 236u8, 48u8, 210u8, + 133u8, 140u8, 171u8, 3u8, 85u8, 250u8, 160u8, 102u8, 95u8, + 46u8, 33u8, 81u8, 102u8, 241u8, ], ) } - #[doc = " The additional funds that must be reserved for the number of bytes store in metadata,"] - #[doc = " either \"normal\" metadata or attribute metadata."] - pub fn deposit_per_byte( + #[doc = " Session information in a rolling window."] + #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] + #[doc = " Does not have any entries before the session index in the first session change notification."] + pub fn sessions( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "DepositPerByte", + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::SessionInfo, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "Sessions", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, + 186u8, 220u8, 61u8, 52u8, 195u8, 40u8, 214u8, 113u8, 92u8, + 109u8, 221u8, 201u8, 122u8, 213u8, 124u8, 35u8, 244u8, 55u8, + 244u8, 168u8, 23u8, 0u8, 240u8, 109u8, 143u8, 90u8, 40u8, + 87u8, 127u8, 64u8, 100u8, 75u8, ], ) } - #[doc = " The maximum length of data stored on-chain."] - pub fn string_limit( + #[doc = " Session information in a rolling window."] + #[doc = " Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`."] + #[doc = " Does not have any entries before the session index in the first session change notification."] + pub fn sessions_root( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "StringLimit", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::SessionInfo, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "Sessions", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 186u8, 220u8, 61u8, 52u8, 195u8, 40u8, 214u8, 113u8, 92u8, + 109u8, 221u8, 201u8, 122u8, 213u8, 124u8, 35u8, 244u8, 55u8, + 244u8, 168u8, 23u8, 0u8, 240u8, 109u8, 143u8, 90u8, 40u8, + 87u8, 127u8, 64u8, 100u8, 75u8, ], ) } - #[doc = " The maximum length of an attribute key."] - pub fn key_limit( + #[doc = " The validator account keys of the validators actively participating in parachain consensus."] + pub fn account_keys( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "KeyLimit", + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::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( + "ParaSessionInfo", + "AccountKeys", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, + 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, + 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, + 215u8, 94u8, 124u8, 148u8, 142u8, ], ) } - #[doc = " The maximum length of an attribute value."] - pub fn value_limit( + #[doc = " The validator account keys of the validators actively participating in parachain consensus."] + pub fn account_keys_root( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Uniques", - "ValueLimit", + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::subxt::utils::AccountId32>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParaSessionInfo", + "AccountKeys", + Vec::new(), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, + 48u8, 179u8, 139u8, 15u8, 144u8, 71u8, 92u8, 160u8, 254u8, + 237u8, 98u8, 60u8, 254u8, 208u8, 201u8, 32u8, 79u8, 55u8, + 3u8, 33u8, 188u8, 134u8, 18u8, 151u8, 132u8, 40u8, 192u8, + 215u8, 94u8, 124u8, 148u8, 142u8, ], ) } } } } - pub mod nfts { + pub mod paras_disputes { use super::root_mod; use super::runtime_types; #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] @@ -29412,17 +28295,29 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Create { - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + pub struct ForceUnfreeze; + pub struct TransactionApi; + impl TransactionApi { + pub fn force_unfreeze(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "ParasDisputes", + "force_unfreeze", + ForceUnfreeze {}, + [ + 212u8, 211u8, 58u8, 159u8, 23u8, 220u8, 64u8, 175u8, 65u8, + 50u8, 192u8, 122u8, 113u8, 189u8, 74u8, 191u8, 48u8, 93u8, + 251u8, 50u8, 237u8, 240u8, 91u8, 139u8, 193u8, 114u8, 131u8, + 125u8, 124u8, 236u8, 191u8, 190u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = + runtime_types::polkadot_runtime_parachains::disputes::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29432,16 +28327,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCreate { - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + #[doc = "A dispute has been initiated. \\[candidate hash, dispute location\\]"] + pub struct DisputeInitiated( + pub runtime_types::polkadot_core_primitives::CandidateHash, + pub runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, + ); + impl ::subxt::events::StaticEvent for DisputeInitiated { + const PALLET: &'static str = "ParasDisputes"; + const EVENT: &'static str = "DisputeInitiated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29452,9 +28345,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Destroy { - pub collection: ::core::primitive::u32, - pub witness: runtime_types::pallet_nfts::types::DestroyWitness, + #[doc = "A dispute has concluded for or against a candidate."] + #[doc = "`\\[para id, candidate hash, dispute result\\]`"] + pub struct DisputeConcluded( + pub runtime_types::polkadot_core_primitives::CandidateHash, + pub runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, + ); + impl ::subxt::events::StaticEvent for DisputeConcluded { + const PALLET: &'static str = "ParasDisputes"; + const EVENT: &'static str = "DisputeConcluded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29465,20 +28364,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Mint { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub mint_to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub witness_data: ::core::option::Option< - runtime_types::pallet_nfts::types::MintWitness< - ::core::primitive::u32, - >, - >, + #[doc = "A dispute has timed out due to insufficient participation."] + #[doc = "`\\[para id, candidate hash\\]`"] + pub struct DisputeTimedOut( + pub runtime_types::polkadot_core_primitives::CandidateHash, + ); + impl ::subxt::events::StaticEvent for DisputeTimedOut { + const PALLET: &'static str = "ParasDisputes"; + const EVENT: &'static str = "DisputeTimedOut"; } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -29487,34 +28383,250 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceMint { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub mint_to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub item_config: runtime_types::pallet_nfts::types::ItemConfig, + #[doc = "A dispute has concluded with supermajority against a candidate."] + #[doc = "Block authors should no longer build on top of this head and should"] + #[doc = "instead revert the block at the given height. This should be the"] + #[doc = "number of the child of the last known valid block in the chain."] + pub struct Revert(pub ::core::primitive::u32); + impl ::subxt::events::StaticEvent for Revert { + const PALLET: &'static str = "ParasDisputes"; + const EVENT: &'static str = "Revert"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Burn { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub check_owner: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " The last pruned session, if any. All data stored by this module"] + #[doc = " references sessions."] + pub fn last_pruned_session( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "LastPrunedSession", + vec![], + [ + 125u8, 138u8, 99u8, 242u8, 9u8, 246u8, 215u8, 246u8, 141u8, + 6u8, 129u8, 87u8, 27u8, 58u8, 53u8, 121u8, 61u8, 119u8, 35u8, + 104u8, 33u8, 43u8, 179u8, 82u8, 244u8, 121u8, 174u8, 135u8, + 87u8, 119u8, 236u8, 105u8, + ], + ) + } + #[doc = " All ongoing or concluded disputes for the last several sessions."] + pub fn disputes( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_core_primitives::CandidateHash, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::DisputeState< ::core::primitive::u32, >, - >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "Disputes", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 192u8, 238u8, 255u8, 67u8, 169u8, 86u8, 99u8, 243u8, 228u8, + 88u8, 142u8, 138u8, 183u8, 117u8, 82u8, 22u8, 163u8, 30u8, + 175u8, 247u8, 50u8, 204u8, 12u8, 171u8, 57u8, 189u8, 151u8, + 191u8, 196u8, 89u8, 94u8, 165u8, + ], + ) + } + #[doc = " All ongoing or concluded disputes for the last several sessions."] + pub fn disputes_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_primitives::v2::DisputeState< + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "Disputes", + Vec::new(), + [ + 192u8, 238u8, 255u8, 67u8, 169u8, 86u8, 99u8, 243u8, 228u8, + 88u8, 142u8, 138u8, 183u8, 117u8, 82u8, 22u8, 163u8, 30u8, + 175u8, 247u8, 50u8, 204u8, 12u8, 171u8, 57u8, 189u8, 151u8, + 191u8, 196u8, 89u8, 94u8, 165u8, + ], + ) + } + #[doc = " All included blocks on the chain, as well as the block number in this chain that"] + #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] + pub fn included( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_core_primitives::CandidateHash, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "Included", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, + 80u8, 58u8, 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, + 123u8, 205u8, 4u8, 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, + 223u8, 204u8, 226u8, 74u8, 195u8, + ], + ) + } + #[doc = " All included blocks on the chain, as well as the block number in this chain that"] + #[doc = " should be reverted back to if the candidate is disputed and determined to be invalid."] + pub fn included_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "Included", + Vec::new(), + [ + 129u8, 50u8, 76u8, 60u8, 82u8, 106u8, 248u8, 164u8, 152u8, + 80u8, 58u8, 185u8, 211u8, 225u8, 122u8, 100u8, 234u8, 241u8, + 123u8, 205u8, 4u8, 8u8, 193u8, 116u8, 167u8, 158u8, 252u8, + 223u8, 204u8, 226u8, 74u8, 195u8, + ], + ) + } + #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] + #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] + #[doc = " fewer than `byzantine_threshold + 1` validators."] + #[doc = ""] + #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] + pub fn spam_slots( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u32>, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "SpamSlots", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, + 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, + 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, + 74u8, 138u8, 122u8, 251u8, 238u8, + ], + ) + } + #[doc = " Maps session indices to a vector indicating the number of potentially-spam disputes"] + #[doc = " each validator is participating in. Potentially-spam disputes are remote disputes which have"] + #[doc = " fewer than `byzantine_threshold + 1` validators."] + #[doc = ""] + #[doc = " The i'th entry of the vector corresponds to the i'th validator in the session."] + pub fn spam_slots_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec<::core::primitive::u32>, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "SpamSlots", + Vec::new(), + [ + 172u8, 23u8, 120u8, 188u8, 71u8, 248u8, 252u8, 41u8, 132u8, + 221u8, 98u8, 215u8, 33u8, 242u8, 168u8, 196u8, 90u8, 123u8, + 190u8, 27u8, 147u8, 6u8, 196u8, 175u8, 198u8, 216u8, 50u8, + 74u8, 138u8, 122u8, 251u8, 238u8, + ], + ) + } + #[doc = " Whether the chain is frozen. Starts as `None`. When this is `Some`,"] + #[doc = " the chain will not accept any new parachain blocks for backing or inclusion,"] + #[doc = " and its value indicates the last valid block number in the chain."] + #[doc = " It can only be set back to `None` by governance intervention."] + pub fn frozen( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::option::Option<::core::primitive::u32>, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "ParasDisputes", + "Frozen", + vec![], + [ + 133u8, 100u8, 86u8, 220u8, 180u8, 189u8, 65u8, 131u8, 64u8, + 56u8, 219u8, 47u8, 130u8, 167u8, 210u8, 125u8, 49u8, 7u8, + 153u8, 254u8, 20u8, 53u8, 218u8, 177u8, 122u8, 148u8, 16u8, + 198u8, 251u8, 50u8, 194u8, 128u8, + ], + ) + } } + } + } + pub mod registrar { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29524,13 +28636,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Transfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct Register { + pub id: runtime_types::polkadot_parachain::primitives::Id, + pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29541,9 +28651,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Redeposit { - pub collection: ::core::primitive::u32, - pub items: ::std::vec::Vec<::core::primitive::u32>, + pub struct ForceRegister { + pub who: ::subxt::utils::AccountId32, + pub deposit: ::core::primitive::u128, + pub id: runtime_types::polkadot_parachain::primitives::Id, + pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29554,9 +28668,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LockItemTransfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct Deregister { + pub id: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29567,9 +28680,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnlockItemTransfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct Swap { + pub id: runtime_types::polkadot_parachain::primitives::Id, + pub other: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29580,11 +28693,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LockCollection { - pub collection: ::core::primitive::u32, - pub lock_settings: runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::CollectionSetting, - >, + pub struct RemoveLock { + pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29595,13 +28705,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransferOwnership { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } + pub struct Reserve; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29611,20 +28715,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetTeam { - pub collection: ::core::primitive::u32, - pub issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct AddLock { + pub para: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29635,12 +28727,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCollectionOwner { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct ScheduleCodeUpgrade { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29651,14 +28741,241 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceCollectionConfig { - pub collection: ::core::primitive::u32, - pub config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + pub struct SetCurrentHead { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub new_head: runtime_types::polkadot_parachain::primitives::HeadData, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register head data and validation code for a reserved Para Id."] + #[doc = ""] + #[doc = "## Arguments"] + #[doc = "- `origin`: Must be called by a `Signed` origin."] + #[doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] + #[doc = "- `genesis_head`: The genesis head data of the parachain/thread."] + #[doc = "- `validation_code`: The initial validation code of the parachain/thread."] + #[doc = ""] + #[doc = "## Deposits/Fees"] + #[doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] + #[doc = "reserved previously for this para ID is accounted for."] + #[doc = ""] + #[doc = "## Events"] + #[doc = "The `Registered` event is emitted in case of success."] + pub fn register( + &self, + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "register", + Register { + id, + genesis_head, + validation_code, + }, + [ + 154u8, 84u8, 201u8, 125u8, 72u8, 69u8, 188u8, 42u8, 225u8, + 14u8, 136u8, 48u8, 78u8, 86u8, 99u8, 238u8, 252u8, 255u8, + 226u8, 219u8, 214u8, 17u8, 19u8, 9u8, 12u8, 13u8, 174u8, + 243u8, 37u8, 134u8, 76u8, 23u8, + ], + ) + } + #[doc = "Force the registration of a Para Id on the relay chain."] + #[doc = ""] + #[doc = "This function must be called by a Root origin."] + #[doc = ""] + #[doc = "The deposit taken can be specified for this registration. Any `ParaId`"] + #[doc = "can be registered, including sub-1000 IDs which are System Parachains."] + pub fn force_register( + &self, + who: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "force_register", + ForceRegister { + who, + deposit, + id, + genesis_head, + validation_code, + }, + [ + 59u8, 24u8, 236u8, 163u8, 53u8, 49u8, 92u8, 199u8, 38u8, + 76u8, 101u8, 73u8, 166u8, 105u8, 145u8, 55u8, 89u8, 30u8, + 30u8, 137u8, 151u8, 219u8, 116u8, 226u8, 168u8, 220u8, 222u8, + 6u8, 105u8, 91u8, 254u8, 216u8, + ], + ) + } + #[doc = "Deregister a Para Id, freeing all data and returning any deposit."] + #[doc = ""] + #[doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] + pub fn deregister( + &self, + id: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "deregister", + Deregister { id }, + [ + 137u8, 9u8, 146u8, 11u8, 126u8, 125u8, 186u8, 222u8, 246u8, + 199u8, 94u8, 229u8, 147u8, 245u8, 213u8, 51u8, 203u8, 181u8, + 78u8, 87u8, 18u8, 255u8, 79u8, 107u8, 234u8, 2u8, 21u8, + 212u8, 1u8, 73u8, 173u8, 253u8, + ], + ) + } + #[doc = "Swap a parachain with another parachain or parathread."] + #[doc = ""] + #[doc = "The origin must be Root, the `para` owner, or the `para` itself."] + #[doc = ""] + #[doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] + #[doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] + #[doc = ""] + #[doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] + #[doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] + #[doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] + #[doc = "and the auction deposit are switched."] + pub fn swap( + &self, + id: runtime_types::polkadot_parachain::primitives::Id, + other: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "swap", + Swap { id, other }, + [ + 238u8, 154u8, 249u8, 250u8, 57u8, 242u8, 47u8, 17u8, 50u8, + 70u8, 124u8, 189u8, 193u8, 137u8, 107u8, 138u8, 216u8, 137u8, + 160u8, 103u8, 192u8, 133u8, 7u8, 130u8, 41u8, 39u8, 47u8, + 139u8, 202u8, 7u8, 84u8, 214u8, + ], + ) + } + #[doc = "Remove a manager lock from a para. This will allow the manager of a"] + #[doc = "previously locked para to deregister or swap a para without using governance."] + #[doc = ""] + #[doc = "Can only be called by the Root origin or the parachain."] + pub fn remove_lock( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "remove_lock", + RemoveLock { para }, + [ + 93u8, 50u8, 223u8, 180u8, 185u8, 3u8, 225u8, 27u8, 233u8, + 205u8, 101u8, 86u8, 122u8, 19u8, 147u8, 8u8, 202u8, 151u8, + 80u8, 24u8, 196u8, 2u8, 88u8, 250u8, 184u8, 96u8, 158u8, + 70u8, 181u8, 201u8, 200u8, 213u8, + ], + ) + } + #[doc = "Reserve a Para Id on the relay chain."] + #[doc = ""] + #[doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] + #[doc = "The origin account is able to register head data and validation code using `register` to create"] + #[doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] + #[doc = ""] + #[doc = "## Arguments"] + #[doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] + #[doc = ""] + #[doc = "## Deposits/Fees"] + #[doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] + #[doc = ""] + #[doc = "## Events"] + #[doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] + pub fn reserve(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "reserve", + Reserve {}, + [ + 22u8, 210u8, 13u8, 54u8, 253u8, 13u8, 89u8, 174u8, 232u8, + 119u8, 148u8, 206u8, 130u8, 133u8, 199u8, 127u8, 201u8, + 205u8, 8u8, 213u8, 108u8, 93u8, 135u8, 88u8, 238u8, 171u8, + 31u8, 193u8, 23u8, 113u8, 106u8, 135u8, + ], + ) + } + #[doc = "Add a manager lock from a para. This will prevent the manager of a"] + #[doc = "para to deregister or swap a para."] + #[doc = ""] + #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] + pub fn add_lock( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "add_lock", + AddLock { para }, + [ + 99u8, 199u8, 192u8, 92u8, 180u8, 52u8, 86u8, 165u8, 249u8, + 60u8, 72u8, 79u8, 233u8, 5u8, 83u8, 194u8, 48u8, 83u8, 249u8, + 218u8, 141u8, 234u8, 232u8, 59u8, 9u8, 150u8, 147u8, 173u8, + 91u8, 154u8, 81u8, 17u8, + ], + ) + } + #[doc = "Schedule a parachain upgrade."] + #[doc = ""] + #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] + pub fn schedule_code_upgrade( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "schedule_code_upgrade", + ScheduleCodeUpgrade { para, new_code }, + [ + 67u8, 11u8, 148u8, 83u8, 36u8, 106u8, 97u8, 77u8, 79u8, + 114u8, 249u8, 218u8, 207u8, 89u8, 209u8, 120u8, 45u8, 101u8, + 69u8, 21u8, 61u8, 158u8, 90u8, 83u8, 29u8, 143u8, 55u8, 9u8, + 178u8, 75u8, 183u8, 25u8, + ], + ) + } + #[doc = "Set the parachain's current head."] + #[doc = ""] + #[doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] + pub fn set_current_head( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Registrar", + "set_current_head", + SetCurrentHead { para, new_head }, + [ + 103u8, 240u8, 206u8, 26u8, 120u8, 189u8, 94u8, 221u8, 174u8, + 225u8, 210u8, 176u8, 217u8, 18u8, 94u8, 216u8, 77u8, 205u8, + 86u8, 196u8, 121u8, 4u8, 230u8, 147u8, 19u8, 224u8, 38u8, + 254u8, 199u8, 254u8, 245u8, 110u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = + runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29668,14 +28985,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveTransfer { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub maybe_deadline: ::core::option::Option<::core::primitive::u32>, + pub struct Registered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub manager: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Registered { + const PALLET: &'static str = "Registrar"; + const EVENT: &'static str = "Registered"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29686,13 +29002,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelApproval { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct Deregistered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } + impl ::subxt::events::StaticEvent for Deregistered { + const PALLET: &'static str = "Registrar"; + const EVENT: &'static str = "Deregistered"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29703,10 +29018,201 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAllTransferApprovals { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct Reserved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub who: ::subxt::utils::AccountId32, + } + impl ::subxt::events::StaticEvent for Reserved { + const PALLET: &'static str = "Registrar"; + const EVENT: &'static str = "Reserved"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Pending swap operations."] + pub fn pending_swap( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Registrar", + "PendingSwap", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, + 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, + 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, + 159u8, 171u8, 123u8, 149u8, 174u8, + ], + ) + } + #[doc = " Pending swap operations."] + pub fn pending_swap_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::Id, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Registrar", + "PendingSwap", + Vec::new(), + [ + 121u8, 124u8, 4u8, 120u8, 173u8, 48u8, 227u8, 135u8, 72u8, + 74u8, 238u8, 230u8, 1u8, 175u8, 33u8, 241u8, 138u8, 82u8, + 217u8, 129u8, 138u8, 107u8, 59u8, 8u8, 205u8, 244u8, 192u8, + 159u8, 171u8, 123u8, 149u8, 174u8, + ], + ) + } + #[doc = " Amount held on deposit for each para and the original depositor."] + #[doc = ""] + #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] + #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] + pub fn paras( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Registrar", + "Paras", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, + 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, + 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, + 220u8, 240u8, 218u8, 124u8, 56u8, + ], + ) + } + #[doc = " Amount held on deposit for each para and the original depositor."] + #[doc = ""] + #[doc = " The given account ID is responsible for registering the code and initial head data, but may only do"] + #[doc = " so if it isn't yet registered. (After that, it's up to governance to do so.)"] + pub fn paras_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::paras_registrar::ParaInfo< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Registrar", + "Paras", + Vec::new(), + [ + 149u8, 3u8, 25u8, 145u8, 60u8, 126u8, 219u8, 71u8, 88u8, + 241u8, 122u8, 99u8, 134u8, 191u8, 60u8, 172u8, 230u8, 230u8, + 110u8, 31u8, 43u8, 6u8, 146u8, 161u8, 51u8, 21u8, 169u8, + 220u8, 240u8, 218u8, 124u8, 56u8, + ], + ) + } + #[doc = " The next free `ParaId`."] + pub fn next_free_para_id( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_parachain::primitives::Id, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Registrar", + "NextFreeParaId", + vec![], + [ + 139u8, 76u8, 36u8, 150u8, 237u8, 36u8, 143u8, 242u8, 252u8, + 29u8, 236u8, 168u8, 97u8, 50u8, 175u8, 120u8, 83u8, 118u8, + 205u8, 64u8, 95u8, 65u8, 7u8, 230u8, 171u8, 86u8, 189u8, + 205u8, 231u8, 211u8, 97u8, 29u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The deposit to be paid to run a parathread."] + #[doc = " This should include the cost for storing the genesis head and validation code."] + pub fn para_deposit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Registrar", + "ParaDeposit", + [ + 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 deposit to be paid per byte stored on chain."] + pub fn data_deposit_per_byte( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Registrar", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, + 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, + 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, + 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } } + } + } + pub mod slots { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29716,11 +29222,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LockItemProperties { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub lock_metadata: ::core::primitive::bool, - pub lock_attributes: ::core::primitive::bool, + pub struct ForceLease { + pub para: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + pub period_begin: ::core::primitive::u32, + pub period_count: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29731,7 +29238,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAttribute { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } + pub struct ClearAllLeases { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29741,17 +29250,107 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetAttribute { pub set_as : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + pub struct TriggerOnboard { + pub para: runtime_types::polkadot_parachain::primitives::Id, + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Just a connect into the `lease_out` call, in case Root wants to force some lease to happen"] + #[doc = "independently of any other on-chain mechanism to use it."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + pub fn force_lease( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Slots", + "force_lease", + ForceLease { + para, + leaser, + amount, + period_begin, + period_count, + }, + [ + 196u8, 2u8, 63u8, 229u8, 18u8, 134u8, 48u8, 4u8, 165u8, 46u8, + 173u8, 0u8, 189u8, 35u8, 99u8, 84u8, 103u8, 124u8, 233u8, + 246u8, 60u8, 172u8, 181u8, 205u8, 154u8, 164u8, 36u8, 178u8, + 60u8, 164u8, 166u8, 21u8, + ], + ) + } + #[doc = "Clear all leases for a Para Id, refunding any deposits back to the original owners."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + pub fn clear_all_leases( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Slots", + "clear_all_leases", + ClearAllLeases { para }, + [ + 16u8, 14u8, 185u8, 45u8, 149u8, 70u8, 177u8, 133u8, 130u8, + 173u8, 196u8, 244u8, 77u8, 63u8, 218u8, 64u8, 108u8, 83u8, + 84u8, 184u8, 175u8, 122u8, 36u8, 115u8, 146u8, 117u8, 132u8, + 82u8, 2u8, 144u8, 62u8, 179u8, + ], + ) + } + #[doc = "Try to onboard a parachain that has a lease for the current lease period."] + #[doc = ""] + #[doc = "This function can be useful if there was some state issue with a para that should"] + #[doc = "have onboarded, but was unable to. As long as they have a lease period, we can"] + #[doc = "let them onboard from here."] + #[doc = ""] + #[doc = "Origin must be signed, but can be called by anyone."] + pub fn trigger_onboard( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Slots", + "trigger_onboard", + TriggerOnboard { para }, + [ + 74u8, 158u8, 122u8, 37u8, 34u8, 62u8, 61u8, 218u8, 94u8, + 222u8, 1u8, 153u8, 131u8, 215u8, 157u8, 180u8, 98u8, 130u8, + 151u8, 179u8, 22u8, 120u8, 32u8, 207u8, 208u8, 46u8, 248u8, + 43u8, 154u8, 118u8, 106u8, 2u8, + ], + ) + } + } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_common::slots::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearAttribute { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } + #[doc = "A new `[lease_period]` is beginning."] + pub struct NewLeasePeriod { + pub lease_period: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for NewLeasePeriod { + const PALLET: &'static str = "Slots"; + const EVENT: &'static str = "NewLeasePeriod"; + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29761,14 +29360,164 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ApproveItemAttributes { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] + #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] + #[doc = "Second balance is the total amount reserved."] + pub struct Leased { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::utils::AccountId32, + pub period_begin: ::core::primitive::u32, + pub period_count: ::core::primitive::u32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Leased { + const PALLET: &'static str = "Slots"; + const EVENT: &'static str = "Leased"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] + #[doc = ""] + #[doc = " The actual amount locked on its behalf by any account at any time is the maximum of the second values"] + #[doc = " of the items in this list whose first value is the account."] + #[doc = ""] + #[doc = " The first item in the list is the amount locked for the current Lease Period. Following"] + #[doc = " items are for the subsequent lease periods."] + #[doc = ""] + #[doc = " The default value (an empty list) implies that the parachain no longer exists (or never"] + #[doc = " existed) as far as this pallet is concerned."] + #[doc = ""] + #[doc = " If a parachain doesn't exist *yet* but is scheduled to exist in the future, then it"] + #[doc = " will be left-padded with one or more `None`s to denote the fact that nothing is held on"] + #[doc = " deposit for the non-existent chain currently, but is held at some point in the future."] + #[doc = ""] + #[doc = " It is illegal for a `None` value to trail in the list."] + pub fn leases( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::utils::AccountId32, + ::core::primitive::u128, + )>, + >, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Slots", + "Leases", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, + 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, + 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, + 139u8, 11u8, 96u8, 147u8, + ], + ) + } + #[doc = " Amounts held on deposit for each (possibly future) leased parachain."] + #[doc = ""] + #[doc = " The actual amount locked on its behalf by any account at any time is the maximum of the second values"] + #[doc = " of the items in this list whose first value is the account."] + #[doc = ""] + #[doc = " The first item in the list is the amount locked for the current Lease Period. Following"] + #[doc = " items are for the subsequent lease periods."] + #[doc = ""] + #[doc = " The default value (an empty list) implies that the parachain no longer exists (or never"] + #[doc = " existed) as far as this pallet is concerned."] + #[doc = ""] + #[doc = " If a parachain doesn't exist *yet* but is scheduled to exist in the future, then it"] + #[doc = " will be left-padded with one or more `None`s to denote the fact that nothing is held on"] + #[doc = " deposit for the non-existent chain currently, but is held at some point in the future."] + #[doc = ""] + #[doc = " It is illegal for a `None` value to trail in the list."] + pub fn leases_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec< + ::core::option::Option<( + ::subxt::utils::AccountId32, + ::core::primitive::u128, + )>, + >, + (), + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Slots", + "Leases", + Vec::new(), + [ + 7u8, 104u8, 17u8, 66u8, 157u8, 89u8, 238u8, 38u8, 233u8, + 241u8, 110u8, 67u8, 132u8, 101u8, 243u8, 62u8, 73u8, 7u8, + 9u8, 172u8, 22u8, 51u8, 118u8, 87u8, 3u8, 224u8, 120u8, 88u8, + 139u8, 11u8, 96u8, 147u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The number of blocks over which a single period lasts."] + pub fn lease_period( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Slots", + "LeasePeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, + 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, + 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, + 90u8, 203u8, 100u8, 41u8, 145u8, + ], + ) + } + #[doc = " The number of blocks to offset each lease period by."] + pub fn lease_offset( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Slots", + "LeaseOffset", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 auctions { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29778,15 +29527,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelItemAttributesApproval { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub witness: - runtime_types::pallet_nfts::types::CancelAttributesApprovalWitness, + pub struct NewAuction { + #[codec(compact)] + pub duration: ::core::primitive::u32, + #[codec(compact)] + pub lease_period_index: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29797,12 +29542,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + pub struct Bid { + #[codec(compact)] + pub para: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub auction_index: ::core::primitive::u32, + #[codec(compact)] + pub first_slot: ::core::primitive::u32, + #[codec(compact)] + pub last_slot: ::core::primitive::u32, + #[codec(compact)] + pub amount: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29813,10 +29563,98 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearMetadata { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct CancelAuction; + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Create a new auction."] + #[doc = ""] + #[doc = "This can only happen when there isn't already an auction in progress and may only be"] + #[doc = "called by the root origin. Accepts the `duration` of this auction and the"] + #[doc = "`lease_period_index` of the initial lease period of the four that are to be auctioned."] + pub fn new_auction( + &self, + duration: ::core::primitive::u32, + lease_period_index: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Auctions", + "new_auction", + NewAuction { + duration, + lease_period_index, + }, + [ + 171u8, 40u8, 200u8, 164u8, 213u8, 10u8, 145u8, 164u8, 212u8, + 14u8, 117u8, 215u8, 248u8, 59u8, 34u8, 79u8, 50u8, 176u8, + 164u8, 143u8, 92u8, 82u8, 207u8, 37u8, 103u8, 252u8, 255u8, + 142u8, 239u8, 134u8, 114u8, 151u8, + ], + ) + } + #[doc = "Make a new bid from an account (including a parachain account) for deploying a new"] + #[doc = "parachain."] + #[doc = ""] + #[doc = "Multiple simultaneous bids from the same bidder are allowed only as long as all active"] + #[doc = "bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted."] + #[doc = ""] + #[doc = "- `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and"] + #[doc = "funded by) the same account."] + #[doc = "- `auction_index` is the index of the auction to bid on. Should just be the present"] + #[doc = "value of `AuctionCounter`."] + #[doc = "- `first_slot` is the first lease period index of the range to bid on. This is the"] + #[doc = "absolute lease period index value, not an auction-specific offset."] + #[doc = "- `last_slot` is the last lease period index of the range to bid on. This is the"] + #[doc = "absolute lease period index value, not an auction-specific offset."] + #[doc = "- `amount` is the amount to bid to be held as deposit for the parachain should the"] + #[doc = "bid win. This amount is held throughout the range."] + pub fn bid( + &self, + para: runtime_types::polkadot_parachain::primitives::Id, + auction_index: ::core::primitive::u32, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + amount: ::core::primitive::u128, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Auctions", + "bid", + Bid { + para, + auction_index, + first_slot, + last_slot, + amount, + }, + [ + 243u8, 233u8, 248u8, 221u8, 239u8, 59u8, 65u8, 63u8, 125u8, + 129u8, 202u8, 165u8, 30u8, 228u8, 32u8, 73u8, 225u8, 38u8, + 128u8, 98u8, 102u8, 46u8, 203u8, 32u8, 70u8, 74u8, 136u8, + 163u8, 83u8, 211u8, 227u8, 139u8, + ], + ) + } + #[doc = "Cancel an in-progress auction."] + #[doc = ""] + #[doc = "Can only be called by Root origin."] + pub fn cancel_auction(&self) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Auctions", + "cancel_auction", + CancelAuction {}, + [ + 182u8, 223u8, 178u8, 136u8, 1u8, 115u8, 229u8, 78u8, 166u8, + 128u8, 28u8, 106u8, 6u8, 248u8, 46u8, 55u8, 110u8, 120u8, + 213u8, 11u8, 90u8, 217u8, 42u8, 120u8, 47u8, 83u8, 126u8, + 216u8, 236u8, 251u8, 255u8, 50u8, + ], + ) + } } + } + #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] + pub type Event = runtime_types::polkadot_runtime_common::auctions::pallet::Event; + pub mod events { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29826,11 +29664,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCollectionMetadata { - pub collection: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + #[doc = "An auction started. Provides its index and the block number where it will begin to"] + #[doc = "close and the first lease period of the quadruplet that is auctioned."] + pub struct AuctionStarted { + pub auction_index: ::core::primitive::u32, + pub lease_period: ::core::primitive::u32, + pub ending: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AuctionStarted { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "AuctionStarted"; } #[derive( :: subxt :: ext :: codec :: CompactAs, @@ -29842,8 +29685,33 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClearCollectionMetadata { - pub collection: ::core::primitive::u32, + #[doc = "An auction ended. All funds become unreserved."] + pub struct AuctionClosed { + pub auction_index: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for AuctionClosed { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "AuctionClosed"; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] + #[doc = "Second is the total."] + pub struct Reserved { + pub bidder: ::subxt::utils::AccountId32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Reserved { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "Reserved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29854,8 +29722,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetAcceptOwnership { - pub maybe_collection: ::core::option::Option<::core::primitive::u32>, + #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] + pub struct Unreserved { + pub bidder: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for Unreserved { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "Unreserved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29866,9 +29740,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetCollectionMaxSupply { - pub collection: ::core::primitive::u32, - pub max_supply: ::core::primitive::u32, + #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] + #[doc = "but no parachain slot has been leased."] + pub struct ReserveConfiscated { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::utils::AccountId32, + pub amount: ::core::primitive::u128, + } + impl ::subxt::events::StaticEvent for ReserveConfiscated { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "ReserveConfiscated"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29879,13 +29760,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdateMintSettings { - pub collection: ::core::primitive::u32, - pub mint_settings: runtime_types::pallet_nfts::types::MintSettings< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, + #[doc = "A new bid has been accepted as the current winner."] + pub struct BidAccepted { + pub bidder: ::subxt::utils::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + pub first_slot: ::core::primitive::u32, + pub last_slot: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for BidAccepted { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "BidAccepted"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29896,17 +29781,261 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetPrice { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::option::Option<::core::primitive::u128>, - pub whitelisted_buyer: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] + pub struct WinningOffset { + pub auction_index: ::core::primitive::u32, + pub block_number: ::core::primitive::u32, + } + impl ::subxt::events::StaticEvent for WinningOffset { + const PALLET: &'static str = "Auctions"; + const EVENT: &'static str = "WinningOffset"; + } + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of auctions started so far."] + pub fn auction_counter( + &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( + "Auctions", + "AuctionCounter", + vec![], + [ + 67u8, 247u8, 96u8, 152u8, 0u8, 224u8, 230u8, 98u8, 194u8, + 107u8, 3u8, 203u8, 51u8, 201u8, 149u8, 22u8, 184u8, 80u8, + 251u8, 239u8, 253u8, 19u8, 58u8, 192u8, 65u8, 96u8, 189u8, + 54u8, 175u8, 130u8, 143u8, 181u8, + ], + ) + } + #[doc = " Information relating to the current auction, if there is one."] + #[doc = ""] + #[doc = " The first item in the tuple is the lease period index that the first of the four"] + #[doc = " contiguous lease periods on auction is for. The second is the block number when the"] + #[doc = " auction will \"begin to end\", i.e. the first block of the Ending Period of the auction."] + pub fn auction_info( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + (::core::primitive::u32, ::core::primitive::u32), + ::subxt::storage::address::Yes, + (), + (), + > { + ::subxt::storage::address::Address::new_static( + "Auctions", + "AuctionInfo", + vec![], + [ + 73u8, 216u8, 173u8, 230u8, 132u8, 78u8, 83u8, 62u8, 200u8, + 69u8, 17u8, 73u8, 57u8, 107u8, 160u8, 90u8, 147u8, 84u8, + 29u8, 110u8, 144u8, 215u8, 169u8, 110u8, 217u8, 77u8, 109u8, + 204u8, 1u8, 164u8, 95u8, 83u8, + ], + ) + } + #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] + #[doc = " (sub-)ranges."] + pub fn reserved_amounts( + &self, + _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, + _1: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, >, - >, + ) -> ::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( + "Auctions", + "ReservedAmounts", + vec![::subxt::storage::address::StaticStorageMapKey::new(&( + _0.borrow(), + _1.borrow(), + ))], + [ + 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, + 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, + 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, + 166u8, 55u8, 233u8, 93u8, 62u8, + ], + ) + } + #[doc = " Amounts currently reserved in the accounts of the bidders currently winning"] + #[doc = " (sub-)ranges."] + pub fn reserved_amounts_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u128, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Auctions", + "ReservedAmounts", + Vec::new(), + [ + 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, + 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, + 66u8, 188u8, 137u8, 111u8, 110u8, 152u8, 18u8, 233u8, 76u8, + 166u8, 55u8, 233u8, 93u8, 62u8, + ], + ) + } + #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] + #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] + #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] + pub fn winning( + &self, + _0: impl ::std::borrow::Borrow<::core::primitive::u32>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::option::Option<( + ::subxt::utils::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Auctions", + "Winning", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, + 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, + 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, + 30u8, 151u8, 147u8, 47u8, 205u8, + ], + ) + } + #[doc = " The winning bids for each of the 10 ranges at each sample in the final Ending Period of"] + #[doc = " the current auction. The map's key is the 0-based index into the Sample Size. The"] + #[doc = " first sample of the ending period is 0; the last is `Sample Size - 1`."] + pub fn winning_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + [::core::option::Option<( + ::subxt::utils::AccountId32, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u128, + )>; 36usize], + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Auctions", + "Winning", + Vec::new(), + [ + 63u8, 56u8, 143u8, 200u8, 12u8, 71u8, 187u8, 73u8, 215u8, + 93u8, 222u8, 102u8, 5u8, 113u8, 6u8, 170u8, 95u8, 228u8, + 28u8, 58u8, 109u8, 62u8, 3u8, 125u8, 211u8, 139u8, 194u8, + 30u8, 151u8, 147u8, 47u8, 205u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The number of blocks over which an auction may be retroactively ended."] + pub fn ending_period( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Auctions", + "EndingPeriod", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of each sample to take during the ending period."] + #[doc = ""] + #[doc = " `EndingPeriod` / `SampleLength` = Total # of Samples"] + pub fn sample_length( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Auctions", + "SampleLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 slot_range_count( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Auctions", + "SlotRangeCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 lease_periods_per_slot( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Auctions", + "LeasePeriodsPerSlot", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 crowdloan { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -29916,10 +30045,19 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BuyItem { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub bid_price: ::core::primitive::u128, + pub struct Create { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub cap: ::core::primitive::u128, + #[codec(compact)] + pub first_period: ::core::primitive::u32, + #[codec(compact)] + pub last_period: ::core::primitive::u32, + #[codec(compact)] + pub end: ::core::primitive::u32, + pub verifier: + ::core::option::Option, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29930,15 +30068,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PayTips { - pub tips: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_nfts::types::ItemTip< - ::core::primitive::u32, - ::core::primitive::u32, - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, + pub struct Contribute { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub value: ::core::primitive::u128, + pub signature: + ::core::option::Option, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29949,17 +30085,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CreateSwap { - pub offered_collection: ::core::primitive::u32, - pub offered_item: ::core::primitive::u32, - pub desired_collection: ::core::primitive::u32, - pub maybe_desired_item: ::core::option::Option<::core::primitive::u32>, - pub maybe_price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, - pub duration: ::core::primitive::u32, + pub struct Withdraw { + pub who: ::subxt::utils::AccountId32, + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29970,9 +30099,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelSwap { - pub offered_collection: ::core::primitive::u32, - pub offered_item: ::core::primitive::u32, + pub struct Refund { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -29983,1373 +30112,304 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimSwap { - pub send_collection: ::core::primitive::u32, - pub send_item: ::core::primitive::u32, - pub receive_collection: ::core::primitive::u32, - pub receive_item: ::core::primitive::u32, - pub witness_price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, + pub struct Dissolve { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Edit { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + pub cap: ::core::primitive::u128, + #[codec(compact)] + pub first_period: ::core::primitive::u32, + #[codec(compact)] + pub last_period: ::core::primitive::u32, + #[codec(compact)] + pub end: ::core::primitive::u32, + pub verifier: + ::core::option::Option, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AddMemo { + pub index: runtime_types::polkadot_parachain::primitives::Id, + pub memo: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Poke { + pub index: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ContributeAll { + #[codec(compact)] + pub index: runtime_types::polkadot_parachain::primitives::Id, + pub signature: + ::core::option::Option, } pub struct TransactionApi; impl TransactionApi { - #[doc = "Issue a new collection of non-fungible items from a public origin."] - #[doc = ""] - #[doc = "This new collection has no items initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must have sufficient funds free."] - #[doc = ""] - #[doc = "`ItemDeposit` funds of sender are reserved."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] - #[doc = "member of the collection's admin team."] + #[doc = "Create a new crowdloaning campaign for a parachain slot with the given lease period range."] #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] + #[doc = "This applies a lock to your parachain configuration, ensuring that it cannot be changed"] + #[doc = "by the parachain manager."] pub fn create( &self, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, + index: runtime_types::polkadot_parachain::primitives::Id, + cap: ::core::primitive::u128, + first_period: ::core::primitive::u32, + last_period: ::core::primitive::u32, + end: ::core::primitive::u32, + verifier: ::core::option::Option< + runtime_types::sp_runtime::MultiSigner, >, ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", + "Crowdloan", "create", - Create { admin, config }, + Create { + index, + cap, + first_period, + last_period, + end, + verifier, + }, [ - 39u8, 4u8, 38u8, 44u8, 147u8, 41u8, 137u8, 135u8, 131u8, - 186u8, 47u8, 61u8, 129u8, 151u8, 187u8, 234u8, 92u8, 11u8, - 75u8, 150u8, 166u8, 187u8, 114u8, 41u8, 74u8, 33u8, 200u8, - 13u8, 104u8, 73u8, 35u8, 58u8, + 78u8, 52u8, 156u8, 23u8, 104u8, 251u8, 20u8, 233u8, 42u8, + 231u8, 16u8, 192u8, 164u8, 68u8, 98u8, 129u8, 88u8, 126u8, + 123u8, 4u8, 210u8, 161u8, 190u8, 90u8, 67u8, 235u8, 74u8, + 184u8, 180u8, 197u8, 248u8, 238u8, ], ) } - #[doc = "Issue a new collection of non-fungible items from a privileged origin."] - #[doc = ""] - #[doc = "This new collection has no items initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] - #[doc = " permissions over this item, but may later change and configure the permissions using"] - #[doc = " `transfer_ownership` and `set_team`."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_create( + #[doc = "Contribute to a crowd sale. This will transfer some balance over to fund a parachain"] + #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] + pub fn contribute( &self, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, + index: runtime_types::polkadot_parachain::primitives::Id, + value: ::core::primitive::u128, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, >, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", - "force_create", - ForceCreate { owner, config }, + "Crowdloan", + "contribute", + Contribute { + index, + value, + signature, + }, [ - 90u8, 0u8, 154u8, 141u8, 23u8, 101u8, 243u8, 20u8, 255u8, - 61u8, 114u8, 183u8, 127u8, 92u8, 131u8, 14u8, 179u8, 96u8, - 133u8, 180u8, 69u8, 67u8, 133u8, 205u8, 167u8, 207u8, 173u8, - 56u8, 185u8, 241u8, 129u8, 74u8, + 159u8, 180u8, 248u8, 203u8, 128u8, 231u8, 28u8, 84u8, 14u8, + 214u8, 69u8, 217u8, 62u8, 201u8, 169u8, 160u8, 45u8, 160u8, + 125u8, 255u8, 95u8, 140u8, 58u8, 3u8, 224u8, 157u8, 199u8, + 229u8, 72u8, 40u8, 218u8, 55u8, ], ) } - #[doc = "Destroy a collection of fungible items."] + #[doc = "Withdraw full balance of a specific contributor."] #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] - #[doc = "owner of the `collection`."] + #[doc = "Origin must be signed, but can come from anyone."] #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to be destroyed."] - #[doc = "- `witness`: Information on the items minted in the collection. This must be"] - #[doc = "correct."] + #[doc = "The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement"] + #[doc = "flag must be set. For a fund to be ready for retirement, then:"] + #[doc = "- it must not already be in retirement;"] + #[doc = "- the amount of raised funds must be bigger than the _free_ balance of the account;"] + #[doc = "- and either:"] + #[doc = " - the block number must be at least `end`; or"] + #[doc = " - the current lease period must be greater than the fund's `last_period`."] #[doc = ""] - #[doc = "Emits `Destroyed` event when successful."] + #[doc = "In this case, the fund's retirement flag is set and its `end` is reset to the current block"] + #[doc = "number."] #[doc = ""] - #[doc = "Weight: `O(n + m)` where:"] - #[doc = "- `n = witness.items`"] - #[doc = "- `m = witness.item_metadatas`"] - #[doc = "- `a = witness.attributes`"] - pub fn destroy( + #[doc = "- `who`: The account whose contribution should be withdrawn."] + #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] + pub fn withdraw( &self, - collection: ::core::primitive::u32, - witness: runtime_types::pallet_nfts::types::DestroyWitness, - ) -> ::subxt::tx::Payload { + who: ::subxt::utils::AccountId32, + index: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", - "destroy", - Destroy { - collection, - witness, - }, + "Crowdloan", + "withdraw", + Withdraw { who, index }, [ - 194u8, 219u8, 14u8, 11u8, 254u8, 25u8, 217u8, 157u8, 117u8, - 236u8, 144u8, 148u8, 151u8, 141u8, 40u8, 60u8, 243u8, 241u8, - 140u8, 184u8, 45u8, 153u8, 33u8, 177u8, 248u8, 79u8, 67u8, - 249u8, 47u8, 244u8, 198u8, 138u8, + 147u8, 177u8, 116u8, 152u8, 9u8, 102u8, 4u8, 201u8, 204u8, + 145u8, 104u8, 226u8, 86u8, 211u8, 66u8, 109u8, 109u8, 139u8, + 229u8, 97u8, 215u8, 101u8, 255u8, 181u8, 121u8, 139u8, 165u8, + 169u8, 112u8, 173u8, 213u8, 121u8, ], ) } - #[doc = "Mint an item of a particular collection."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] + #[doc = "Automatically refund contributors of an ended crowdloan."] + #[doc = "Due to weight restrictions, this function may need to be called multiple"] + #[doc = "times to fully refund all users. We will refund `RemoveKeysLimit` users at a time."] #[doc = ""] - #[doc = "- `collection`: The collection of the item to be minted."] - #[doc = "- `item`: An identifier of the new item."] - #[doc = "- `mint_to`: Account into which the item will be minted."] - #[doc = "- `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned"] - #[doc = " item_id from that collection needs to be provided within the witness data object."] - #[doc = ""] - #[doc = "Note: the deposit will be taken from the `origin` and not the `owner` of the `item`."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn mint( + #[doc = "Origin must be signed, but can come from anyone."] + pub fn refund( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - mint_to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - witness_data: ::core::option::Option< - runtime_types::pallet_nfts::types::MintWitness< - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "mint", - Mint { - collection, - item, - mint_to, - witness_data, - }, + index: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Crowdloan", + "refund", + Refund { index }, [ - 242u8, 13u8, 249u8, 201u8, 133u8, 131u8, 113u8, 75u8, 214u8, - 186u8, 242u8, 24u8, 48u8, 50u8, 241u8, 168u8, 60u8, 18u8, - 132u8, 151u8, 84u8, 243u8, 93u8, 128u8, 215u8, 66u8, 14u8, - 218u8, 138u8, 88u8, 185u8, 56u8, + 223u8, 64u8, 5u8, 135u8, 15u8, 234u8, 60u8, 114u8, 199u8, + 216u8, 73u8, 165u8, 198u8, 34u8, 140u8, 142u8, 214u8, 254u8, + 203u8, 163u8, 224u8, 120u8, 104u8, 54u8, 12u8, 126u8, 72u8, + 147u8, 20u8, 180u8, 251u8, 208u8, ], ) } - #[doc = "Mint an item of a particular collection from a privileged origin."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] - #[doc = "Issuer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be minted."] - #[doc = "- `item`: An identifier of the new item."] - #[doc = "- `mint_to`: Account into which the item will be minted."] - #[doc = "- `item_config`: A config of the new item."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] + #[doc = "Remove a fund after the retirement period has ended and all funds have been returned."] + pub fn dissolve( + &self, + index: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Crowdloan", + "dissolve", + Dissolve { index }, + [ + 100u8, 67u8, 105u8, 3u8, 213u8, 149u8, 201u8, 146u8, 241u8, + 62u8, 31u8, 108u8, 58u8, 30u8, 241u8, 141u8, 134u8, 115u8, + 56u8, 131u8, 60u8, 75u8, 143u8, 227u8, 11u8, 32u8, 31u8, + 230u8, 165u8, 227u8, 170u8, 126u8, + ], + ) + } + #[doc = "Edit the configuration for an in-progress crowdloan."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_mint( + #[doc = "Can only be called by Root origin."] + pub fn edit( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - mint_to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + index: runtime_types::polkadot_parachain::primitives::Id, + cap: ::core::primitive::u128, + first_period: ::core::primitive::u32, + last_period: ::core::primitive::u32, + end: ::core::primitive::u32, + verifier: ::core::option::Option< + runtime_types::sp_runtime::MultiSigner, >, - item_config: runtime_types::pallet_nfts::types::ItemConfig, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "force_mint", - ForceMint { - collection, - item, - mint_to, - item_config, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "Crowdloan", + "edit", + Edit { + index, + cap, + first_period, + last_period, + end, + verifier, }, [ - 178u8, 21u8, 236u8, 7u8, 99u8, 52u8, 79u8, 176u8, 166u8, - 27u8, 167u8, 111u8, 15u8, 106u8, 139u8, 203u8, 173u8, 57u8, - 103u8, 167u8, 241u8, 196u8, 201u8, 16u8, 245u8, 68u8, 26u8, - 71u8, 152u8, 132u8, 107u8, 73u8, + 222u8, 124u8, 94u8, 221u8, 36u8, 183u8, 67u8, 114u8, 198u8, + 107u8, 154u8, 174u8, 142u8, 47u8, 3u8, 181u8, 72u8, 29u8, + 2u8, 83u8, 81u8, 47u8, 168u8, 142u8, 139u8, 63u8, 136u8, + 191u8, 41u8, 252u8, 221u8, 56u8, ], ) } - #[doc = "Destroy a single item."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be burned."] - #[doc = "- `item`: The item to be burned."] - #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] - #[doc = " item is owned by this value."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned."] + #[doc = "Add an optional memo to an existing crowdloan contribution."] #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: `check_owner.is_some()`."] - pub fn burn( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - check_owner: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "burn", - Burn { - collection, - item, - check_owner, - }, - [ - 215u8, 138u8, 65u8, 126u8, 201u8, 135u8, 73u8, 194u8, 2u8, - 196u8, 229u8, 103u8, 140u8, 74u8, 21u8, 144u8, 111u8, 99u8, - 200u8, 210u8, 191u8, 108u8, 220u8, 56u8, 64u8, 89u8, 216u8, - 181u8, 175u8, 57u8, 41u8, 173u8, - ], - ) - } - #[doc = "Move an item from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item to be transferred."] - #[doc = "- `item`: The item to be transferred."] - #[doc = "- `dest`: The account to receive ownership of the item."] - #[doc = ""] - #[doc = "Emits `Transferred`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "transfer", - Transfer { - collection, - item, - dest, - }, - [ - 223u8, 90u8, 63u8, 140u8, 84u8, 72u8, 67u8, 84u8, 225u8, - 84u8, 4u8, 197u8, 17u8, 53u8, 151u8, 209u8, 163u8, 114u8, - 253u8, 225u8, 44u8, 171u8, 240u8, 8u8, 112u8, 8u8, 20u8, - 25u8, 224u8, 131u8, 175u8, 40u8, - ], - ) - } - #[doc = "Re-evaluate the deposits on some items."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the items to be reevaluated."] - #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] - #[doc = ""] - #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] - #[doc = "in the case that the owner account does not have reservable funds to pay for a"] - #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] - #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] - #[doc = "so it's of little consequence."] - #[doc = ""] - #[doc = "It will still return an error in the case that the collection is unknown or the signer"] - #[doc = "is not permitted to call it."] - #[doc = ""] - #[doc = "Weight: `O(items.len())`"] - pub fn redeposit( - &self, - collection: ::core::primitive::u32, - items: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "redeposit", - Redeposit { collection, items }, - [ - 81u8, 142u8, 143u8, 126u8, 12u8, 71u8, 139u8, 28u8, 170u8, - 219u8, 195u8, 22u8, 146u8, 69u8, 202u8, 7u8, 202u8, 113u8, - 93u8, 187u8, 113u8, 16u8, 8u8, 76u8, 3u8, 124u8, 248u8, 38u8, - 17u8, 232u8, 120u8, 145u8, - ], - ) - } - #[doc = "Disallow further unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be changed."] - #[doc = "- `item`: The item to become non-transferable."] - #[doc = ""] - #[doc = "Emits `ItemTransferLocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn lock_item_transfer( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "lock_item_transfer", - LockItemTransfer { collection, item }, - [ - 234u8, 3u8, 222u8, 142u8, 68u8, 171u8, 104u8, 48u8, 216u8, - 153u8, 167u8, 77u8, 161u8, 153u8, 191u8, 245u8, 190u8, 228u8, - 255u8, 138u8, 215u8, 196u8, 189u8, 121u8, 251u8, 56u8, 158u8, - 157u8, 156u8, 189u8, 135u8, 16u8, - ], - ) - } - #[doc = "Re-allow unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be changed."] - #[doc = "- `item`: The item to become transferable."] - #[doc = ""] - #[doc = "Emits `ItemTransferUnlocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn unlock_item_transfer( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "unlock_item_transfer", - UnlockItemTransfer { collection, item }, - [ - 33u8, 30u8, 131u8, 204u8, 136u8, 8u8, 180u8, 37u8, 180u8, - 93u8, 79u8, 20u8, 113u8, 73u8, 213u8, 68u8, 158u8, 72u8, - 10u8, 46u8, 204u8, 109u8, 132u8, 127u8, 42u8, 78u8, 196u8, - 228u8, 84u8, 61u8, 139u8, 85u8, - ], - ) - } - #[doc = "Disallows specified settings for the whole collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be locked."] - #[doc = "- `lock_settings`: The settings to be locked."] - #[doc = ""] - #[doc = "Note: it's possible to only lock(set) the setting, but not to unset it."] - #[doc = "Emits `CollectionLocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn lock_collection( - &self, - collection: ::core::primitive::u32, - lock_settings: runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::CollectionSetting, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "lock_collection", - LockCollection { - collection, - lock_settings, - }, - [ - 116u8, 190u8, 188u8, 12u8, 163u8, 231u8, 39u8, 163u8, 83u8, - 109u8, 15u8, 248u8, 154u8, 19u8, 9u8, 27u8, 160u8, 66u8, - 105u8, 55u8, 164u8, 61u8, 8u8, 139u8, 210u8, 192u8, 116u8, - 44u8, 75u8, 4u8, 166u8, 215u8, - ], - ) - } - #[doc = "Change the Owner of a collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose owner should be changed."] - #[doc = "- `owner`: The new Owner of this collection. They must have called"] - #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn transfer_ownership( - &self, - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "transfer_ownership", - TransferOwnership { collection, owner }, - [ - 217u8, 228u8, 51u8, 96u8, 179u8, 215u8, 163u8, 137u8, 231u8, - 239u8, 181u8, 113u8, 48u8, 144u8, 91u8, 140u8, 50u8, 175u8, - 81u8, 251u8, 128u8, 208u8, 38u8, 246u8, 103u8, 219u8, 65u8, - 179u8, 153u8, 4u8, 154u8, 181u8, - ], - ) - } - #[doc = "Change the Issuer, Admin and Freezer of a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose team should be changed."] - #[doc = "- `issuer`: The new Issuer of this collection."] - #[doc = "- `admin`: The new Admin of this collection."] - #[doc = "- `freezer`: The new Freezer of this collection."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_team( - &self, - collection: ::core::primitive::u32, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_team", - SetTeam { - collection, - issuer, - admin, - freezer, - }, - [ - 34u8, 168u8, 70u8, 30u8, 29u8, 186u8, 131u8, 181u8, 132u8, - 63u8, 163u8, 22u8, 244u8, 41u8, 205u8, 234u8, 17u8, 238u8, - 54u8, 64u8, 158u8, 136u8, 50u8, 40u8, 242u8, 117u8, 111u8, - 211u8, 168u8, 156u8, 156u8, 27u8, - ], - ) - } - #[doc = "Change the Owner of a collection."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection."] - #[doc = "- `owner`: The new Owner of this collection."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_collection_owner( - &self, - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "force_collection_owner", - ForceCollectionOwner { collection, owner }, - [ - 170u8, 152u8, 48u8, 227u8, 138u8, 164u8, 130u8, 169u8, 175u8, - 227u8, 210u8, 90u8, 78u8, 126u8, 18u8, 171u8, 115u8, 42u8, - 102u8, 13u8, 221u8, 210u8, 188u8, 170u8, 230u8, 105u8, 40u8, - 124u8, 168u8, 127u8, 17u8, 53u8, - ], - ) - } - #[doc = "Change the config of a collection."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection."] - #[doc = "- `config`: The new config of this collection."] - #[doc = ""] - #[doc = "Emits `CollectionConfigChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_collection_config( - &self, - collection: ::core::primitive::u32, - config: runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "force_collection_config", - ForceCollectionConfig { collection, config }, - [ - 6u8, 58u8, 170u8, 231u8, 3u8, 28u8, 161u8, 69u8, 157u8, - 145u8, 67u8, 247u8, 153u8, 129u8, 105u8, 169u8, 227u8, 12u8, - 166u8, 11u8, 219u8, 186u8, 145u8, 102u8, 192u8, 36u8, 44u8, - 230u8, 213u8, 63u8, 240u8, 227u8, - ], - ) - } - #[doc = "Approve an item to be transferred by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] - #[doc = "- `item`: The item to be approved for delegated transfer."] - #[doc = "- `delegate`: The account to delegate permission to transfer the item."] - #[doc = "- `maybe_deadline`: Optional deadline for the approval. Specified by providing the"] - #[doc = "\tnumber of blocks after which the approval will expire"] - #[doc = ""] - #[doc = "Emits `TransferApproved` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn approve_transfer( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - maybe_deadline: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "approve_transfer", - ApproveTransfer { - collection, - item, - delegate, - maybe_deadline, - }, - [ - 203u8, 41u8, 60u8, 28u8, 226u8, 166u8, 64u8, 195u8, 219u8, - 2u8, 245u8, 4u8, 171u8, 221u8, 218u8, 209u8, 31u8, 160u8, - 142u8, 215u8, 93u8, 49u8, 174u8, 105u8, 117u8, 52u8, 166u8, - 177u8, 206u8, 189u8, 101u8, 113u8, - ], - ) - } - #[doc = "Cancel one of the transfer approvals for a specific item."] - #[doc = ""] - #[doc = "Origin must be either:"] - #[doc = "- the `Force` origin;"] - #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] - #[doc = "- `Signed` with the signer being the Owner of the `item`;"] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] - #[doc = "- `item`: The item of the collection of whose approval will be cancelled."] - #[doc = "- `delegate`: The account that is going to loose their approval."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn cancel_approval( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "cancel_approval", - CancelApproval { - collection, - item, - delegate, - }, - [ - 129u8, 99u8, 206u8, 28u8, 18u8, 72u8, 197u8, 126u8, 239u8, - 204u8, 219u8, 232u8, 160u8, 110u8, 206u8, 64u8, 162u8, 54u8, - 134u8, 7u8, 221u8, 61u8, 95u8, 23u8, 71u8, 10u8, 25u8, 244u8, - 14u8, 31u8, 179u8, 58u8, - ], - ) - } - #[doc = "Cancel all the approvals of a specific item."] - #[doc = ""] - #[doc = "Origin must be either:"] - #[doc = "- the `Force` origin;"] - #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] - #[doc = "- `Signed` with the signer being the Owner of the `item`;"] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item of whose approvals will be cleared."] - #[doc = "- `item`: The item of the collection of whose approvals will be cleared."] - #[doc = ""] - #[doc = "Emits `AllApprovalsCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_all_transfer_approvals( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Nfts", - "clear_all_transfer_approvals", - ClearAllTransferApprovals { collection, item }, - [ - 95u8, 218u8, 189u8, 248u8, 199u8, 163u8, 184u8, 65u8, 200u8, - 240u8, 134u8, 224u8, 12u8, 139u8, 222u8, 193u8, 78u8, 71u8, - 63u8, 57u8, 124u8, 249u8, 239u8, 188u8, 38u8, 15u8, 203u8, - 184u8, 243u8, 87u8, 17u8, 166u8, - ], - ) - } - #[doc = "Disallows changing the metadata or attributes of the item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection if the `item`."] - #[doc = "- `item`: An item to be locked."] - #[doc = "- `lock_metadata`: Specifies whether the metadata should be locked."] - #[doc = "- `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace"] - #[doc = " should be locked."] - #[doc = ""] - #[doc = "Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace"] - #[doc = "only. When the metadata or attributes are locked, it won't be possible the unlock them."] - #[doc = ""] - #[doc = "Emits `ItemPropertiesLocked`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn lock_item_properties( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - lock_metadata: ::core::primitive::bool, - lock_attributes: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "lock_item_properties", - LockItemProperties { - collection, - item, - lock_metadata, - lock_attributes, - }, - [ - 243u8, 23u8, 227u8, 8u8, 254u8, 177u8, 170u8, 38u8, 48u8, - 179u8, 166u8, 53u8, 131u8, 186u8, 211u8, 107u8, 186u8, 116u8, - 204u8, 188u8, 15u8, 206u8, 79u8, 136u8, 179u8, 141u8, 146u8, - 22u8, 156u8, 90u8, 21u8, 213u8, - ], - ) - } - #[doc = "Set an attribute for a collection or item."] - #[doc = ""] - #[doc = "Origin must be Signed and must conform to the namespace ruleset:"] - #[doc = "- `CollectionOwner` namespace could be modified by the `collection` owner only;"] - #[doc = "- `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`"] - #[doc = " should be set in that case;"] - #[doc = "- `Account(AccountId)` namespace could be modified only when the `origin` was given a"] - #[doc = " permission to do so;"] - #[doc = ""] - #[doc = "The funds of `origin` are reserved according to the formula:"] - #[doc = "`AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] - #[doc = "- `namespace`: Attribute's namespace."] - #[doc = "- `key`: The key of the attribute."] - #[doc = "- `value`: The value to which to set the attribute."] - #[doc = ""] - #[doc = "Emits `AttributeSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_attribute( - &self, - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_attribute", - SetAttribute { - collection, - maybe_item, - namespace, - key, - value, - }, - [ - 191u8, 30u8, 39u8, 37u8, 65u8, 243u8, 40u8, 67u8, 160u8, - 45u8, 63u8, 196u8, 221u8, 105u8, 159u8, 211u8, 198u8, 125u8, - 14u8, 233u8, 59u8, 208u8, 197u8, 137u8, 88u8, 101u8, 234u8, - 71u8, 102u8, 161u8, 219u8, 179u8, - ], - ) - } - #[doc = "Force-set an attribute for a collection or item."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "If the attribute already exists and it was set by another account, the deposit"] - #[doc = "will be returned to the previous owner."] - #[doc = ""] - #[doc = "- `set_as`: An optional owner of the attribute."] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] - #[doc = "- `namespace`: Attribute's namespace."] - #[doc = "- `key`: The key of the attribute."] - #[doc = "- `value`: The value to which to set the attribute."] - #[doc = ""] - #[doc = "Emits `AttributeSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn force_set_attribute( - &self, - set_as: ::core::option::Option<::subxt::utils::AccountId32>, - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "force_set_attribute", - ForceSetAttribute { - set_as, - collection, - maybe_item, - namespace, - key, - value, - }, - [ - 8u8, 111u8, 29u8, 35u8, 198u8, 9u8, 1u8, 219u8, 122u8, 60u8, - 134u8, 199u8, 254u8, 1u8, 85u8, 126u8, 58u8, 137u8, 243u8, - 228u8, 252u8, 143u8, 95u8, 8u8, 251u8, 3u8, 86u8, 11u8, 40u8, - 87u8, 138u8, 230u8, - ], - ) - } - #[doc = "Clear an attribute for a collection or item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "attribute."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] - #[doc = "- `namespace`: Attribute's namespace."] - #[doc = "- `key`: The key of the attribute."] - #[doc = ""] - #[doc = "Emits `AttributeCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_attribute( - &self, - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 >, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "clear_attribute", - ClearAttribute { - collection, - maybe_item, - namespace, - key, - }, - [ - 110u8, 144u8, 255u8, 153u8, 138u8, 39u8, 100u8, 38u8, 242u8, - 147u8, 177u8, 103u8, 167u8, 154u8, 46u8, 57u8, 16u8, 82u8, - 153u8, 228u8, 3u8, 161u8, 198u8, 61u8, 73u8, 28u8, 93u8, - 216u8, 120u8, 194u8, 183u8, 220u8, - ], - ) - } - #[doc = "Approve item's attributes to be changed by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and must be an owner of the `item`."] - #[doc = ""] - #[doc = "- `collection`: A collection of the item."] - #[doc = "- `item`: The item that holds attributes."] - #[doc = "- `delegate`: The account to delegate permission to change attributes of the item."] - #[doc = ""] - #[doc = "Emits `ItemAttributesApprovalAdded` on success."] - pub fn approve_item_attributes( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "approve_item_attributes", - ApproveItemAttributes { - collection, - item, - delegate, - }, - [ - 194u8, 174u8, 249u8, 37u8, 88u8, 207u8, 198u8, 238u8, 83u8, - 11u8, 170u8, 0u8, 56u8, 5u8, 64u8, 138u8, 30u8, 184u8, 71u8, - 79u8, 178u8, 189u8, 125u8, 249u8, 141u8, 173u8, 164u8, 109u8, - 192u8, 0u8, 179u8, 67u8, - ], - ) - } - #[doc = "Cancel the previously provided approval to change item's attributes."] - #[doc = "All the previously set attributes by the `delegate` will be removed."] - #[doc = ""] - #[doc = "Origin must be Signed and must be an owner of the `item`."] - #[doc = ""] - #[doc = "- `collection`: Collection that the item is contained within."] - #[doc = "- `item`: The item that holds attributes."] - #[doc = "- `delegate`: The previously approved account to remove."] - #[doc = ""] - #[doc = "Emits `ItemAttributesApprovalRemoved` on success."] - pub fn cancel_item_attributes_approval( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - witness : runtime_types :: pallet_nfts :: types :: CancelAttributesApprovalWitness, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Nfts", - "cancel_item_attributes_approval", - CancelItemAttributesApproval { - collection, - item, - delegate, - witness, - }, - [ - 237u8, 139u8, 12u8, 197u8, 94u8, 100u8, 182u8, 14u8, 202u8, - 190u8, 87u8, 148u8, 61u8, 240u8, 8u8, 197u8, 28u8, 18u8, - 85u8, 86u8, 215u8, 201u8, 54u8, 187u8, 141u8, 68u8, 156u8, - 231u8, 15u8, 219u8, 234u8, 26u8, - ], - ) - } - #[doc = "Set the metadata for an item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `item`: The identifier of the item whose metadata to set."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = ""] - #[doc = "Emits `ItemMetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_metadata( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_metadata", - SetMetadata { - collection, - item, - data, - }, - [ - 45u8, 223u8, 215u8, 10u8, 235u8, 165u8, 61u8, 151u8, 170u8, - 176u8, 34u8, 182u8, 95u8, 218u8, 7u8, 115u8, 99u8, 241u8, - 221u8, 190u8, 211u8, 24u8, 44u8, 121u8, 79u8, 93u8, 37u8, - 154u8, 155u8, 205u8, 176u8, 158u8, - ], - ) - } - #[doc = "Clear the metadata for an item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `item`: The identifier of the item whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `ItemMetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_metadata( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "clear_metadata", - ClearMetadata { collection, item }, - [ - 113u8, 75u8, 211u8, 250u8, 129u8, 61u8, 231u8, 204u8, 141u8, - 151u8, 65u8, 108u8, 230u8, 68u8, 51u8, 165u8, 126u8, 211u8, - 51u8, 33u8, 9u8, 47u8, 50u8, 71u8, 123u8, 71u8, 43u8, 162u8, - 76u8, 1u8, 90u8, 222u8, - ], - ) - } - #[doc = "Set the metadata for a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the item whose metadata to update."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn set_collection_metadata( - &self, - collection: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_collection_metadata", - SetCollectionMetadata { collection, data }, - [ - 32u8, 118u8, 96u8, 38u8, 27u8, 73u8, 98u8, 37u8, 105u8, 42u8, - 127u8, 130u8, 202u8, 159u8, 214u8, 72u8, 127u8, 178u8, 5u8, - 184u8, 217u8, 59u8, 205u8, 120u8, 161u8, 177u8, 186u8, 204u8, - 117u8, 111u8, 5u8, 10u8, - ], - ) - } - #[doc = "Clear the metadata for a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn clear_collection_metadata( - &self, - collection: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Nfts", - "clear_collection_metadata", - ClearCollectionMetadata { collection }, - [ - 218u8, 108u8, 43u8, 96u8, 85u8, 130u8, 198u8, 167u8, 28u8, - 4u8, 151u8, 185u8, 162u8, 123u8, 120u8, 42u8, 72u8, 37u8, - 250u8, 135u8, 100u8, 37u8, 193u8, 232u8, 62u8, 91u8, 18u8, - 120u8, 241u8, 47u8, 73u8, 209u8, - ], - ) - } - #[doc = "Set (or reset) the acceptance of ownership for a particular account."] - #[doc = ""] - #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] - #[doc = "provider reference."] - #[doc = ""] - #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] - #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] - #[doc = " ownership transferal."] - #[doc = ""] - #[doc = "Emits `OwnershipAcceptanceChanged`."] - pub fn set_accept_ownership( - &self, - maybe_collection: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_accept_ownership", - SetAcceptOwnership { maybe_collection }, - [ - 171u8, 174u8, 217u8, 70u8, 115u8, 1u8, 231u8, 149u8, 223u8, - 227u8, 6u8, 226u8, 190u8, 144u8, 101u8, 21u8, 147u8, 243u8, - 123u8, 228u8, 42u8, 27u8, 126u8, 58u8, 31u8, 233u8, 54u8, - 157u8, 193u8, 212u8, 114u8, 232u8, - ], - ) - } - #[doc = "Set the maximum number of items a collection could have."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to change."] - #[doc = "- `max_supply`: The maximum number of items a collection could have."] - #[doc = ""] - #[doc = "Emits `CollectionMaxSupplySet` event when successful."] - pub fn set_collection_max_supply( - &self, - collection: ::core::primitive::u32, - max_supply: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_collection_max_supply", - SetCollectionMaxSupply { - collection, - max_supply, - }, - [ - 116u8, 134u8, 93u8, 228u8, 6u8, 198u8, 26u8, 168u8, 154u8, - 137u8, 0u8, 151u8, 1u8, 187u8, 36u8, 154u8, 62u8, 193u8, - 250u8, 83u8, 41u8, 135u8, 187u8, 4u8, 132u8, 234u8, 207u8, - 127u8, 153u8, 157u8, 76u8, 80u8, - ], - ) - } - #[doc = "Update mint settings."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to change."] - #[doc = "- `mint_settings`: The new mint settings."] - #[doc = ""] - #[doc = "Emits `CollectionMintSettingsUpdated` event when successful."] - pub fn update_mint_settings( - &self, - collection: ::core::primitive::u32, - mint_settings: runtime_types::pallet_nfts::types::MintSettings< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "update_mint_settings", - UpdateMintSettings { - collection, - mint_settings, - }, - [ - 194u8, 13u8, 39u8, 21u8, 179u8, 228u8, 251u8, 99u8, 247u8, - 10u8, 0u8, 247u8, 69u8, 226u8, 191u8, 143u8, 182u8, 128u8, - 112u8, 142u8, 138u8, 99u8, 197u8, 62u8, 246u8, 150u8, 184u8, - 172u8, 100u8, 238u8, 236u8, 236u8, - ], - ) - } - #[doc = "Set (or reset) the price for an item."] - #[doc = ""] - #[doc = "Origin must be Signed and must be the owner of the asset `item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item to set the price for."] - #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] - #[doc = "- `buyer`: Restricts the buy operation to a specific account."] - #[doc = ""] - #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] - #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] - pub fn set_price( - &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - price: ::core::option::Option<::core::primitive::u128>, - whitelisted_buyer: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "set_price", - SetPrice { - collection, - item, - price, - whitelisted_buyer, - }, - [ - 159u8, 178u8, 134u8, 144u8, 165u8, 80u8, 141u8, 253u8, 194u8, - 11u8, 8u8, 215u8, 7u8, 82u8, 138u8, 62u8, 81u8, 178u8, 75u8, - 84u8, 97u8, 175u8, 161u8, 97u8, 125u8, 175u8, 70u8, 247u8, - 209u8, 132u8, 48u8, 196u8, - ], - ) - } - #[doc = "Allows to buy an item if it's up for sale."] - #[doc = ""] - #[doc = "Origin must be Signed and must not be the owner of the `item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item the sender wants to buy."] - #[doc = "- `bid_price`: The price the sender is willing to pay."] - #[doc = ""] - #[doc = "Emits `ItemBought` on success."] - pub fn buy_item( + #[doc = "Origin must be Signed, and the user must have contributed to the crowdloan."] + pub fn add_memo( &self, - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - bid_price: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { + index: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", - "buy_item", - BuyItem { - collection, - item, - bid_price, - }, + "Crowdloan", + "add_memo", + AddMemo { index, memo }, [ - 79u8, 39u8, 106u8, 21u8, 227u8, 244u8, 7u8, 107u8, 125u8, - 114u8, 24u8, 254u8, 208u8, 67u8, 31u8, 123u8, 134u8, 29u8, - 94u8, 243u8, 164u8, 137u8, 191u8, 71u8, 17u8, 170u8, 226u8, - 172u8, 233u8, 198u8, 226u8, 33u8, + 104u8, 199u8, 143u8, 251u8, 28u8, 49u8, 144u8, 186u8, 83u8, + 108u8, 26u8, 127u8, 22u8, 141u8, 48u8, 62u8, 194u8, 193u8, + 97u8, 10u8, 84u8, 89u8, 236u8, 191u8, 40u8, 8u8, 1u8, 250u8, + 112u8, 165u8, 221u8, 112u8, ], ) } - #[doc = "Allows to pay the tips."] + #[doc = "Poke the fund into `NewRaise`"] #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `tips`: Tips array."] - #[doc = ""] - #[doc = "Emits `TipSent` on every tip transfer."] - pub fn pay_tips( + #[doc = "Origin must be Signed, and the fund has non-zero raise."] + pub fn poke( &self, - tips: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_nfts::types::ItemTip< - ::core::primitive::u32, - ::core::primitive::u32, - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, - >, - ) -> ::subxt::tx::Payload { + index: runtime_types::polkadot_parachain::primitives::Id, + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", - "pay_tips", - PayTips { tips }, + "Crowdloan", + "poke", + Poke { index }, [ - 139u8, 37u8, 187u8, 31u8, 201u8, 46u8, 235u8, 234u8, 117u8, - 184u8, 146u8, 246u8, 127u8, 116u8, 180u8, 166u8, 69u8, 43u8, - 152u8, 109u8, 10u8, 43u8, 67u8, 92u8, 118u8, 242u8, 217u8, - 166u8, 35u8, 73u8, 148u8, 226u8, + 118u8, 60u8, 131u8, 17u8, 27u8, 153u8, 57u8, 24u8, 191u8, + 211u8, 101u8, 123u8, 34u8, 145u8, 193u8, 113u8, 244u8, 162u8, + 148u8, 143u8, 81u8, 86u8, 136u8, 23u8, 48u8, 185u8, 52u8, + 60u8, 216u8, 243u8, 63u8, 102u8, ], ) } - #[doc = "Register a new atomic swap, declaring an intention to send an `item` in exchange for"] - #[doc = "`desired_item` from origin to target on the current blockchain."] - #[doc = "The target can execute the swap during the specified `duration` of blocks (if set)."] - #[doc = "Additionally, the price could be set for the desired `item`."] - #[doc = ""] - #[doc = "Origin must be Signed and must be an owner of the `item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item an owner wants to give."] - #[doc = "- `desired_collection`: The collection of the desired item."] - #[doc = "- `desired_item`: The desired item an owner wants to receive."] - #[doc = "- `maybe_price`: The price an owner is willing to pay or receive for the desired `item`."] - #[doc = "- `duration`: A deadline for the swap. Specified by providing the number of blocks"] - #[doc = "\tafter which the swap will expire."] - #[doc = ""] - #[doc = "Emits `SwapCreated` on success."] - pub fn create_swap( + #[doc = "Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain"] + #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] + pub fn contribute_all( &self, - offered_collection: ::core::primitive::u32, - offered_item: ::core::primitive::u32, - desired_collection: ::core::primitive::u32, - maybe_desired_item: ::core::option::Option<::core::primitive::u32>, - maybe_price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, + index: runtime_types::polkadot_parachain::primitives::Id, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, >, - duration: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "create_swap", - CreateSwap { - offered_collection, - offered_item, - desired_collection, - maybe_desired_item, - maybe_price, - duration, - }, - [ - 71u8, 97u8, 120u8, 17u8, 181u8, 119u8, 135u8, 247u8, 45u8, - 11u8, 240u8, 111u8, 120u8, 47u8, 66u8, 66u8, 104u8, 248u8, - 224u8, 129u8, 153u8, 148u8, 233u8, 20u8, 105u8, 169u8, 54u8, - 191u8, 22u8, 169u8, 148u8, 31u8, - ], - ) - } - #[doc = "Cancel an atomic swap."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = "Origin must be an owner of the `item` if the deadline hasn't expired."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item an owner wants to give."] - #[doc = ""] - #[doc = "Emits `SwapCancelled` on success."] - pub fn cancel_swap( - &self, - offered_collection: ::core::primitive::u32, - offered_item: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { + ) -> ::subxt::tx::Payload { ::subxt::tx::Payload::new_static( - "Nfts", - "cancel_swap", - CancelSwap { - offered_collection, - offered_item, - }, - [ - 87u8, 2u8, 127u8, 158u8, 82u8, 37u8, 1u8, 140u8, 227u8, 31u8, - 131u8, 188u8, 250u8, 66u8, 147u8, 211u8, 65u8, 6u8, 251u8, - 60u8, 82u8, 45u8, 217u8, 114u8, 204u8, 161u8, 25u8, 166u8, - 135u8, 7u8, 119u8, 91u8, - ], - ) - } - #[doc = "Claim an atomic swap."] - #[doc = "This method executes a pending swap, that was created by a counterpart before."] - #[doc = ""] - #[doc = "Origin must be Signed and must be an owner of the `item`."] - #[doc = ""] - #[doc = "- `send_collection`: The collection of the item to be sent."] - #[doc = "- `send_item`: The item to be sent."] - #[doc = "- `receive_collection`: The collection of the item to be received."] - #[doc = "- `receive_item`: The item to be received."] - #[doc = "- `witness_price`: A price that was previously agreed on."] - #[doc = ""] - #[doc = "Emits `SwapClaimed` on success."] - pub fn claim_swap( - &self, - send_collection: ::core::primitive::u32, - send_item: ::core::primitive::u32, - receive_collection: ::core::primitive::u32, - receive_item: ::core::primitive::u32, - witness_price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Nfts", - "claim_swap", - ClaimSwap { - send_collection, - send_item, - receive_collection, - receive_item, - witness_price, - }, + "Crowdloan", + "contribute_all", + ContributeAll { index, signature }, [ - 221u8, 120u8, 31u8, 254u8, 154u8, 243u8, 53u8, 56u8, 138u8, - 174u8, 83u8, 58u8, 78u8, 240u8, 177u8, 153u8, 1u8, 27u8, - 203u8, 147u8, 53u8, 24u8, 186u8, 196u8, 22u8, 161u8, 106u8, - 125u8, 166u8, 212u8, 116u8, 247u8, + 94u8, 61u8, 105u8, 107u8, 204u8, 18u8, 223u8, 242u8, 19u8, + 162u8, 205u8, 130u8, 203u8, 73u8, 42u8, 85u8, 208u8, 157u8, + 115u8, 112u8, 168u8, 10u8, 163u8, 80u8, 222u8, 71u8, 23u8, + 194u8, 142u8, 4u8, 82u8, 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_nfts::pallet::Event; + pub type Event = runtime_types::polkadot_runtime_common::crowdloan::pallet::Event; pub mod events { use super::runtime_types; #[derive( @@ -31361,14 +30421,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was created."] + #[doc = "Create a new crowdloaning campaign."] pub struct Created { - pub collection: ::core::primitive::u32, - pub creator: ::subxt::utils::AccountId32, - pub owner: ::subxt::utils::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "Nfts"; + const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Created"; } #[derive( @@ -31380,126 +30438,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was force-created."] - pub struct ForceCreated { - pub collection: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ForceCreated { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ForceCreated"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` was destroyed."] - pub struct Destroyed { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "Destroyed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was issued."] - pub struct Issued { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Issued { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "Issued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was transferred."] - pub struct Transferred { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub from: ::subxt::utils::AccountId32, - pub to: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Transferred { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "Transferred"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` was destroyed."] - pub struct Burned { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Burned { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "Burned"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` became non-transferable."] - pub struct ItemTransferLocked { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ItemTransferLocked { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemTransferLocked"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` became transferable."] - pub struct ItemTransferUnlocked { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + #[doc = "Contributed to a crowd sale."] + pub struct Contributed { + pub who: ::subxt::utils::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for ItemTransferUnlocked { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemTransferUnlocked"; + impl ::subxt::events::StaticEvent for Contributed { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "Contributed"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31510,19 +30457,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "`item` metadata or attributes were locked."] - pub struct ItemPropertiesLocked { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub lock_metadata: ::core::primitive::bool, - pub lock_attributes: ::core::primitive::bool, + #[doc = "Withdrew full balance of a contributor."] + pub struct Withdrew { + pub who: ::subxt::utils::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, } - impl ::subxt::events::StaticEvent for ItemPropertiesLocked { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemPropertiesLocked"; + impl ::subxt::events::StaticEvent for Withdrew { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "Withdrew"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31531,13 +30476,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some `collection` was locked."] - pub struct CollectionLocked { - pub collection: ::core::primitive::u32, + #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] + #[doc = "over child keys that still need to be killed."] + pub struct PartiallyRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::events::StaticEvent for CollectionLocked { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionLocked"; + impl ::subxt::events::StaticEvent for PartiallyRefunded { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "PartiallyRefunded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31548,14 +30494,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The owner changed."] - pub struct OwnerChanged { - pub collection: ::core::primitive::u32, - pub new_owner: ::subxt::utils::AccountId32, + #[doc = "All loans in a fund have been refunded."] + pub struct AllRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::events::StaticEvent for OwnerChanged { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "OwnerChanged"; + impl ::subxt::events::StaticEvent for AllRefunded { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "AllRefunded"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31566,16 +30511,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The management team changed."] - pub struct TeamChanged { - pub collection: ::core::primitive::u32, - pub issuer: ::subxt::utils::AccountId32, - pub admin: ::subxt::utils::AccountId32, - pub freezer: ::subxt::utils::AccountId32, + #[doc = "Fund is dissolved."] + pub struct Dissolved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::events::StaticEvent for TeamChanged { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "TeamChanged"; + impl ::subxt::events::StaticEvent for Dissolved { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "Dissolved"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31586,18 +30528,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] - #[doc = "a `delegate`."] - pub struct TransferApproved { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, - pub deadline: ::core::option::Option<::core::primitive::u32>, + #[doc = "The result of trying to submit a new bid to the Slots pallet."] + pub struct HandleBidResult { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } - impl ::subxt::events::StaticEvent for TransferApproved { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "TransferApproved"; + impl ::subxt::events::StaticEvent for HandleBidResult { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "HandleBidResult"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31608,17 +30547,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] - #[doc = "`collection` was cancelled by its `owner`."] - pub struct ApprovalCancelled { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, - pub delegate: ::subxt::utils::AccountId32, + #[doc = "The configuration to a crowdloan has been edited."] + pub struct Edited { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::events::StaticEvent for ApprovalCancelled { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ApprovalCancelled"; + impl ::subxt::events::StaticEvent for Edited { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "Edited"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31629,18 +30564,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "All approvals of an item got cancelled."] - pub struct AllApprovalsCancelled { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub owner: ::subxt::utils::AccountId32, + #[doc = "A memo has been updated."] + pub struct MemoUpdated { + pub who: ::subxt::utils::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub memo: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::events::StaticEvent for AllApprovalsCancelled { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "AllApprovalsCancelled"; + impl ::subxt::events::StaticEvent for MemoUpdated { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "MemoUpdated"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31649,36 +30583,213 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A `collection` has had its config changed by the `Force` origin."] - pub struct CollectionConfigChanged { - pub collection: ::core::primitive::u32, + #[doc = "A parachain has been moved to `NewRaise`"] + pub struct AddedToNewRaise { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, } - impl ::subxt::events::StaticEvent for CollectionConfigChanged { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionConfigChanged"; + impl ::subxt::events::StaticEvent for AddedToNewRaise { + const PALLET: &'static str = "Crowdloan"; + const EVENT: &'static str = "AddedToNewRaise"; } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New metadata has been set for a `collection`."] - pub struct CollectionMetadataSet { - pub collection: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, + } + pub mod storage { + use super::runtime_types; + pub struct StorageApi; + impl StorageApi { + #[doc = " Info on all of the funds."] + pub fn funds( + &self, + _0: impl ::std::borrow::Borrow< + runtime_types::polkadot_parachain::primitives::Id, + >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + ::subxt::storage::address::Yes, + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Crowdloan", + "Funds", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], + [ + 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, + 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, + 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, + 85u8, 179u8, 102u8, 53u8, 63u8, + ], + ) + } + #[doc = " Info on all of the funds."] + pub fn funds_root( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::polkadot_runtime_common::crowdloan::FundInfo< + ::subxt::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u32, + ::core::primitive::u32, + >, + (), + (), + ::subxt::storage::address::Yes, + > { + ::subxt::storage::address::Address::new_static( + "Crowdloan", + "Funds", + Vec::new(), + [ + 231u8, 126u8, 89u8, 84u8, 167u8, 23u8, 211u8, 70u8, 203u8, + 124u8, 20u8, 162u8, 112u8, 38u8, 201u8, 207u8, 82u8, 202u8, + 80u8, 228u8, 4u8, 41u8, 95u8, 190u8, 193u8, 185u8, 178u8, + 85u8, 179u8, 102u8, 53u8, 63u8, + ], + ) + } + #[doc = " The funds that have had additional contributions during the last block. This is used"] + #[doc = " in order to determine which funds should submit new or updated bids."] + pub fn new_raise( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::std::vec::Vec, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Crowdloan", + "NewRaise", + vec![], + [ + 8u8, 180u8, 9u8, 197u8, 254u8, 198u8, 89u8, 112u8, 29u8, + 153u8, 243u8, 196u8, 92u8, 204u8, 135u8, 232u8, 93u8, 239u8, + 147u8, 103u8, 130u8, 28u8, 128u8, 124u8, 4u8, 236u8, 29u8, + 248u8, 27u8, 165u8, 111u8, 147u8, + ], + ) + } + #[doc = " The number of auctions that have entered into their ending period so far."] + pub fn endings_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( + "Crowdloan", + "EndingsCount", + vec![], + [ + 12u8, 159u8, 166u8, 75u8, 192u8, 33u8, 21u8, 244u8, 149u8, + 200u8, 49u8, 54u8, 191u8, 174u8, 202u8, 86u8, 76u8, 115u8, + 189u8, 35u8, 192u8, 175u8, 156u8, 188u8, 41u8, 23u8, 92u8, + 36u8, 141u8, 235u8, 248u8, 143u8, + ], + ) + } + #[doc = " Tracker for the next available fund index"] + pub fn next_fund_index( + &self, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, + ::subxt::storage::address::Yes, + ::subxt::storage::address::Yes, + (), + > { + ::subxt::storage::address::Address::new_static( + "Crowdloan", + "NextFundIndex", + vec![], + [ + 1u8, 215u8, 164u8, 194u8, 231u8, 34u8, 207u8, 19u8, 149u8, + 187u8, 3u8, 176u8, 194u8, 240u8, 180u8, 169u8, 214u8, 194u8, + 202u8, 240u8, 209u8, 6u8, 244u8, 46u8, 54u8, 142u8, 61u8, + 220u8, 240u8, 96u8, 10u8, 168u8, + ], + ) + } } - impl ::subxt::events::StaticEvent for CollectionMetadataSet { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionMetadataSet"; + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b\"py/cfund\")`"] + pub fn pallet_id( + &self, + ) -> ::subxt::constants::StaticConstantAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt::constants::StaticConstantAddress::new( + "Crowdloan", + "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, + ], + ) + } + #[doc = " The minimum amount that may be contributed into a crowdloan. Should almost certainly be at"] + #[doc = " least `ExistentialDeposit`."] + pub fn min_contribution( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + { + ::subxt::constants::StaticConstantAddress::new( + "Crowdloan", + "MinContribution", + [ + 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 = " Max number of storage keys to remove per extrinsic call."] + pub fn remove_keys_limit( + &self, + ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> + { + ::subxt::constants::StaticConstantAddress::new( + "Crowdloan", + "RemoveKeysLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 xcm_pallet { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31687,13 +30798,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for a `collection`."] - pub struct CollectionMetadataCleared { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for CollectionMetadataCleared { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionMetadataCleared"; + pub struct Send { + pub dest: ::std::boxed::Box, + pub message: ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31704,17 +30811,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New metadata has been set for an item."] - pub struct ItemMetadataSet { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - impl ::subxt::events::StaticEvent for ItemMetadataSet { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemMetadataSet"; + pub struct TeleportAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31725,14 +30827,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Metadata has been cleared for an item."] - pub struct ItemMetadataCleared { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ItemMetadataCleared { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemMetadataCleared"; + pub struct ReserveTransferAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31743,14 +30843,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The deposit for a set of `item`s within a `collection` has been updated."] - pub struct Redeposited { - pub collection: ::core::primitive::u32, - pub successful_items: ::std::vec::Vec<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for Redeposited { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "Redeposited"; + pub struct Execute { + pub message: ::std::boxed::Box, + pub max_weight: ::core::primitive::u64, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31761,11 +30856,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "New attribute metadata has been set for a `collection` or `item`."] - pub struct AttributeSet { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } - impl ::subxt::events::StaticEvent for AttributeSet { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "AttributeSet"; + pub struct ForceXcmVersion { + pub location: ::std::boxed::Box< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + pub xcm_version: ::core::primitive::u32, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31776,11 +30871,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] - pub struct AttributeCleared { pub collection : :: core :: primitive :: u32 , pub maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , pub key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , pub namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } - impl ::subxt::events::StaticEvent for AttributeCleared { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "AttributeCleared"; + pub struct ForceDefaultXcmVersion { + pub maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31791,15 +30883,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new approval to modify item attributes was added."] - pub struct ItemAttributesApprovalAdded { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ItemAttributesApprovalAdded { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemAttributesApprovalAdded"; + pub struct ForceSubscribeVersionNotify { + pub location: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31810,15 +30896,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new approval to modify item attributes was removed."] - pub struct ItemAttributesApprovalRemoved { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub delegate: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for ItemAttributesApprovalRemoved { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemAttributesApprovalRemoved"; + pub struct ForceUnsubscribeVersionNotify { + pub location: + ::std::boxed::Box, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31829,14 +30909,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Ownership acceptance has changed for an account."] - pub struct OwnershipAcceptanceChanged { - pub who: ::subxt::utils::AccountId32, - pub maybe_collection: ::core::option::Option<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for OwnershipAcceptanceChanged { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "OwnershipAcceptanceChanged"; + pub struct LimitedReserveTransferAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + pub weight_limit: runtime_types::xcm::v2::WeightLimit, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31847,17 +30926,333 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Max supply has been set for a collection."] - pub struct CollectionMaxSupplySet { - pub collection: ::core::primitive::u32, - pub max_supply: ::core::primitive::u32, + pub struct LimitedTeleportAssets { + pub dest: ::std::boxed::Box, + pub beneficiary: + ::std::boxed::Box, + pub assets: ::std::boxed::Box, + pub fee_asset_item: ::core::primitive::u32, + pub weight_limit: runtime_types::xcm::v2::WeightLimit, } - impl ::subxt::events::StaticEvent for CollectionMaxSupplySet { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionMaxSupplySet"; + pub struct TransactionApi; + impl TransactionApi { + pub fn send( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + message: runtime_types::xcm::VersionedXcm, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "send", + Send { + dest: ::std::boxed::Box::new(dest), + message: ::std::boxed::Box::new(message), + }, + [ + 190u8, 88u8, 197u8, 248u8, 111u8, 198u8, 199u8, 206u8, 39u8, + 121u8, 23u8, 121u8, 93u8, 82u8, 22u8, 61u8, 96u8, 210u8, + 142u8, 249u8, 195u8, 78u8, 44u8, 8u8, 118u8, 120u8, 113u8, + 168u8, 99u8, 94u8, 232u8, 4u8, + ], + ) + } + #[doc = "Teleport some assets from the local chain to some destination chain."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] + #[doc = "with all fees taken as needed from the asset."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] + #[doc = " `dest` side. May not be empty."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + pub fn teleport_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "teleport_assets", + TeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }, + [ + 255u8, 5u8, 68u8, 38u8, 44u8, 181u8, 75u8, 221u8, 239u8, + 103u8, 88u8, 47u8, 136u8, 90u8, 253u8, 55u8, 0u8, 122u8, + 217u8, 126u8, 13u8, 77u8, 209u8, 41u8, 7u8, 35u8, 235u8, + 171u8, 150u8, 235u8, 202u8, 240u8, + ], + ) + } + #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] + #[doc = "chain and forward a notification XCM."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] + #[doc = "with all fees taken as needed from the asset."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] + #[doc = " `dest` side."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + pub fn reserve_transfer_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "reserve_transfer_assets", + ReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + }, + [ + 177u8, 160u8, 188u8, 106u8, 153u8, 135u8, 121u8, 12u8, 83u8, + 233u8, 43u8, 161u8, 133u8, 26u8, 104u8, 79u8, 113u8, 8u8, + 33u8, 128u8, 82u8, 62u8, 30u8, 46u8, 203u8, 199u8, 175u8, + 193u8, 55u8, 130u8, 206u8, 28u8, + ], + ) + } + #[doc = "Execute an XCM message from a local, signed, origin."] + #[doc = ""] + #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] + #[doc = "partially."] + #[doc = ""] + #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] + #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] + #[doc = "attempt will be made."] + #[doc = ""] + #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] + #[doc = "to completion; only that *some* of it was executed."] + pub fn execute( + &self, + message: runtime_types::xcm::VersionedXcm, + max_weight: ::core::primitive::u64, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "execute", + Execute { + message: ::std::boxed::Box::new(message), + max_weight, + }, + [ + 191u8, 177u8, 39u8, 21u8, 1u8, 110u8, 39u8, 58u8, 94u8, 27u8, + 44u8, 18u8, 253u8, 135u8, 100u8, 205u8, 0u8, 231u8, 68u8, + 247u8, 5u8, 140u8, 131u8, 184u8, 251u8, 197u8, 100u8, 113u8, + 253u8, 255u8, 120u8, 206u8, + ], + ) + } + #[doc = "Extoll that a particular destination can be communicated with through a particular"] + #[doc = "version of XCM."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The destination that is being described."] + #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] + pub fn force_xcm_version( + &self, + location: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm_version: ::core::primitive::u32, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "force_xcm_version", + ForceXcmVersion { + location: ::std::boxed::Box::new(location), + xcm_version, + }, + [ + 231u8, 106u8, 60u8, 226u8, 31u8, 25u8, 20u8, 115u8, 107u8, + 246u8, 248u8, 11u8, 71u8, 183u8, 93u8, 3u8, 219u8, 21u8, + 97u8, 188u8, 119u8, 121u8, 239u8, 72u8, 200u8, 81u8, 6u8, + 177u8, 111u8, 188u8, 168u8, 86u8, + ], + ) + } + #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] + #[doc = "version a destination can accept is unknown)."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] + pub fn force_default_xcm_version( + &self, + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "force_default_xcm_version", + ForceDefaultXcmVersion { maybe_xcm_version }, + [ + 38u8, 36u8, 59u8, 231u8, 18u8, 79u8, 76u8, 9u8, 200u8, 125u8, + 214u8, 166u8, 37u8, 99u8, 111u8, 161u8, 135u8, 2u8, 133u8, + 157u8, 165u8, 18u8, 152u8, 81u8, 209u8, 255u8, 137u8, 237u8, + 28u8, 126u8, 224u8, 141u8, + ], + ) + } + #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] + pub fn force_subscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "force_subscribe_version_notify", + ForceSubscribeVersionNotify { + location: ::std::boxed::Box::new(location), + }, + [ + 136u8, 216u8, 207u8, 51u8, 42u8, 153u8, 92u8, 70u8, 140u8, + 169u8, 172u8, 89u8, 69u8, 28u8, 200u8, 100u8, 209u8, 226u8, + 194u8, 240u8, 71u8, 38u8, 18u8, 6u8, 6u8, 83u8, 103u8, 254u8, + 248u8, 241u8, 62u8, 189u8, + ], + ) + } + #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] + #[doc = "version changes."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] + #[doc = " notifications which we no longer desire."] + pub fn force_unsubscribe_version_notify( + &self, + location: runtime_types::xcm::VersionedMultiLocation, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "force_unsubscribe_version_notify", + ForceUnsubscribeVersionNotify { + location: ::std::boxed::Box::new(location), + }, + [ + 51u8, 72u8, 5u8, 227u8, 251u8, 243u8, 199u8, 9u8, 8u8, 213u8, + 191u8, 52u8, 21u8, 215u8, 170u8, 6u8, 53u8, 242u8, 225u8, + 89u8, 150u8, 142u8, 104u8, 249u8, 225u8, 209u8, 142u8, 234u8, + 161u8, 100u8, 153u8, 120u8, + ], + ) + } + #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] + #[doc = "chain and forward a notification XCM."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] + #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] + #[doc = "at risk."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] + #[doc = " `dest` side."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] + pub fn limited_reserve_transfer_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "limited_reserve_transfer_assets", + LimitedReserveTransferAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }, + [ + 191u8, 81u8, 68u8, 116u8, 196u8, 125u8, 226u8, 154u8, 144u8, + 126u8, 159u8, 149u8, 17u8, 124u8, 205u8, 60u8, 249u8, 106u8, + 38u8, 251u8, 136u8, 128u8, 81u8, 201u8, 164u8, 242u8, 216u8, + 80u8, 21u8, 234u8, 20u8, 70u8, + ], + ) + } + #[doc = "Teleport some assets from the local chain to some destination chain."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] + #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] + #[doc = "at risk."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] + #[doc = " `dest` side. May not be empty."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] + pub fn limited_teleport_assets( + &self, + dest: runtime_types::xcm::VersionedMultiLocation, + beneficiary: runtime_types::xcm::VersionedMultiLocation, + assets: runtime_types::xcm::VersionedMultiAssets, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + ) -> ::subxt::tx::Payload { + ::subxt::tx::Payload::new_static( + "XcmPallet", + "limited_teleport_assets", + LimitedTeleportAssets { + dest: ::std::boxed::Box::new(dest), + beneficiary: ::std::boxed::Box::new(beneficiary), + assets: ::std::boxed::Box::new(assets), + fee_asset_item, + weight_limit, + }, + [ + 29u8, 31u8, 229u8, 83u8, 40u8, 60u8, 36u8, 185u8, 169u8, + 74u8, 30u8, 47u8, 118u8, 118u8, 22u8, 15u8, 246u8, 220u8, + 169u8, 135u8, 72u8, 154u8, 109u8, 192u8, 195u8, 58u8, 121u8, + 240u8, 166u8, 243u8, 29u8, 29u8, + ], + ) + } } + } + #[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_xcm::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, @@ -31866,16 +31261,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Mint settings for a collection had changed."] - pub struct CollectionMintSettingsUpdated { - pub collection: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for CollectionMintSettingsUpdated { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "CollectionMintSettingsUpdated"; + #[doc = "Execution of an XCM message was attempted."] + #[doc = ""] + #[doc = "\\[ outcome \\]"] + pub struct Attempted(pub runtime_types::xcm::v2::traits::Outcome); + impl ::subxt::events::StaticEvent for Attempted { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Attempted"; } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -31884,13 +31278,39 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Event gets emitted when the `NextCollectionId` gets incremented."] - pub struct NextCollectionIdIncremented { - pub next_id: ::core::primitive::u32, + #[doc = "A XCM message was sent."] + #[doc = ""] + #[doc = "\\[ origin, destination, message \\]"] + pub struct Sent( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::v2::Xcm, + ); + impl ::subxt::events::StaticEvent for Sent { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Sent"; } - impl ::subxt::events::StaticEvent for NextCollectionIdIncremented { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "NextCollectionIdIncremented"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Query response received which does not match a registered query. This may be because a"] + #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] + #[doc = "because the query timed out."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + pub struct UnexpectedResponse( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::events::StaticEvent for UnexpectedResponse { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "UnexpectedResponse"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31901,17 +31321,39 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The price was set for the item."] - pub struct ItemPriceSet { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::primitive::u128, - pub whitelisted_buyer: - ::core::option::Option<::subxt::utils::AccountId32>, + #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] + #[doc = "no registered notification call."] + #[doc = ""] + #[doc = "\\[ id, response \\]"] + pub struct ResponseReady( + pub ::core::primitive::u64, + pub runtime_types::xcm::v2::Response, + ); + impl ::subxt::events::StaticEvent for ResponseReady { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "ResponseReady"; } - impl ::subxt::events::StaticEvent for ItemPriceSet { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemPriceSet"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Query response has been received and query is removed. The registered notification has"] + #[doc = "been dispatched and executed successfully."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + pub struct Notified( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::events::StaticEvent for Notified { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "Notified"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31922,14 +31364,43 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The price for the item was removed."] - pub struct ItemPriceRemoved { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, + #[doc = "Query response has been received and query is removed. The registered notification could"] + #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] + #[doc = "originally budgeted by this runtime for the query result."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] + pub struct NotifyOverweight( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + pub runtime_types::sp_weights::weight_v2::Weight, + pub runtime_types::sp_weights::weight_v2::Weight, + ); + impl ::subxt::events::StaticEvent for NotifyOverweight { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyOverweight"; } - impl ::subxt::events::StaticEvent for ItemPriceRemoved { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemPriceRemoved"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Query response has been received and query is removed. There was a general error with"] + #[doc = "dispatching the notification call."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + pub struct NotifyDispatchError( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::events::StaticEvent for NotifyDispatchError { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyDispatchError"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31940,17 +31411,44 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An item was bought."] - pub struct ItemBought { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub price: ::core::primitive::u128, - pub seller: ::subxt::utils::AccountId32, - pub buyer: ::subxt::utils::AccountId32, + #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] + #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] + #[doc = "is not `(origin, QueryId, Response)`."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + pub struct NotifyDecodeFailed( + pub ::core::primitive::u64, + pub ::core::primitive::u8, + pub ::core::primitive::u8, + ); + impl ::subxt::events::StaticEvent for NotifyDecodeFailed { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyDecodeFailed"; } - impl ::subxt::events::StaticEvent for ItemBought { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "ItemBought"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Expected query response has been received but the origin location of the response does"] + #[doc = "not match that expected. The query remains registered for a later, valid, response to"] + #[doc = "be received and acted upon."] + #[doc = ""] + #[doc = "\\[ origin location, id, expected location \\]"] + pub struct InvalidResponder( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + pub ::core::option::Option< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + ); + impl ::subxt::events::StaticEvent for InvalidResponder { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidResponder"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31961,17 +31459,40 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A tip was sent."] - pub struct TipSent { - pub collection: ::core::primitive::u32, - pub item: ::core::primitive::u32, - pub sender: ::subxt::utils::AccountId32, - pub receiver: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, + #[doc = "Expected query response has been received but the expected origin location placed in"] + #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] + #[doc = ""] + #[doc = "This is unexpected (since a location placed in storage in a previously executing"] + #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] + #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] + #[doc = "needed."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + pub struct InvalidResponderVersion( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::events::StaticEvent for InvalidResponderVersion { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "InvalidResponderVersion"; } - impl ::subxt::events::StaticEvent for TipSent { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "TipSent"; + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Received query response has been read and removed."] + #[doc = ""] + #[doc = "\\[ id \\]"] + pub struct ResponseTaken(pub ::core::primitive::u64); + impl ::subxt::events::StaticEvent for ResponseTaken { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "ResponseTaken"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -31982,22 +31503,37 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An `item` swap intent was created."] - pub struct SwapCreated { - pub offered_collection: ::core::primitive::u32, - pub offered_item: ::core::primitive::u32, - pub desired_collection: ::core::primitive::u32, - pub desired_item: ::core::option::Option<::core::primitive::u32>, - pub price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, - pub deadline: ::core::primitive::u32, + #[doc = "Some assets have been placed in an asset trap."] + #[doc = ""] + #[doc = "\\[ hash, origin, assets \\]"] + pub struct AssetsTrapped( + pub ::subxt::utils::H256, + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::VersionedMultiAssets, + ); + impl ::subxt::events::StaticEvent for AssetsTrapped { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "AssetsTrapped"; } - impl ::subxt::events::StaticEvent for SwapCreated { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "SwapCreated"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "An XCM version change notification message has been attempted to be sent."] + #[doc = ""] + #[doc = "\\[ destination, result \\]"] + pub struct VersionChangeNotified( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for VersionChangeNotified { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "VersionChangeNotified"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32008,22 +31544,39 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The swap was cancelled."] - pub struct SwapCancelled { - pub offered_collection: ::core::primitive::u32, - pub offered_item: ::core::primitive::u32, - pub desired_collection: ::core::primitive::u32, - pub desired_item: ::core::option::Option<::core::primitive::u32>, - pub price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, - pub deadline: ::core::primitive::u32, + #[doc = "The supported version of a location has been changed. This might be through an"] + #[doc = "automatic notification or a manual intervention."] + #[doc = ""] + #[doc = "\\[ location, XCM version \\]"] + pub struct SupportedVersionChanged( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u32, + ); + impl ::subxt::events::StaticEvent for SupportedVersionChanged { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "SupportedVersionChanged"; } - impl ::subxt::events::StaticEvent for SwapCancelled { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "SwapCancelled"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "A given location which had a version change subscription was dropped owing to an error"] + #[doc = "sending the notification to it."] + #[doc = ""] + #[doc = "\\[ location, query ID, error \\]"] + pub struct NotifyTargetSendFail( + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub ::core::primitive::u64, + pub runtime_types::xcm::v2::traits::Error, + ); + impl ::subxt::events::StaticEvent for NotifyTargetSendFail { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyTargetSendFail"; } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32034,874 +31587,418 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The swap has been claimed."] - pub struct SwapClaimed { - pub sent_collection: ::core::primitive::u32, - pub sent_item: ::core::primitive::u32, - pub sent_item_owner: ::subxt::utils::AccountId32, - pub received_collection: ::core::primitive::u32, - pub received_item: ::core::primitive::u32, - pub received_item_owner: ::subxt::utils::AccountId32, - pub price: ::core::option::Option< - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - >, - pub deadline: ::core::primitive::u32, + #[doc = "A given location which had a version change subscription was dropped owing to an error"] + #[doc = "migrating the location to our new XCM format."] + #[doc = ""] + #[doc = "\\[ location, query ID \\]"] + pub struct NotifyTargetMigrationFail( + pub runtime_types::xcm::VersionedMultiLocation, + pub ::core::primitive::u64, + ); + impl ::subxt::events::StaticEvent for NotifyTargetMigrationFail { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "NotifyTargetMigrationFail"; } - impl ::subxt::events::StaticEvent for SwapClaimed { - const PALLET: &'static str = "Nfts"; - const EVENT: &'static str = "SwapClaimed"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Some assets have been claimed from an asset trap"] + #[doc = ""] + #[doc = "\\[ hash, origin, assets \\]"] + pub struct AssetsClaimed( + pub ::subxt::utils::H256, + pub runtime_types::xcm::v1::multilocation::MultiLocation, + pub runtime_types::xcm::VersionedMultiAssets, + ); + impl ::subxt::events::StaticEvent for AssetsClaimed { + const PALLET: &'static str = "XcmPallet"; + const EVENT: &'static str = "AssetsClaimed"; } } pub mod storage { use super::runtime_types; pub struct StorageApi; impl StorageApi { - #[doc = " Details of a collection."] - pub fn collection( + #[doc = " The latest available query index."] + pub fn query_counter( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, ::subxt::storage::address::Yes, - (), ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "Collection", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 145u8, 183u8, 254u8, 29u8, 238u8, 211u8, 62u8, 231u8, 207u8, - 208u8, 244u8, 89u8, 247u8, 204u8, 29u8, 15u8, 30u8, 28u8, - 182u8, 28u8, 190u8, 236u8, 133u8, 125u8, 89u8, 46u8, 31u8, - 212u8, 86u8, 211u8, 108u8, 195u8, - ], - ) - } - #[doc = " Details of a collection."] - pub fn collection_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionDetails< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - >, (), - (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "Collection", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "QueryCounter", + vec![], [ - 145u8, 183u8, 254u8, 29u8, 238u8, 211u8, 62u8, 231u8, 207u8, - 208u8, 244u8, 89u8, 247u8, 204u8, 29u8, 15u8, 30u8, 28u8, - 182u8, 28u8, 190u8, 236u8, 133u8, 125u8, 89u8, 46u8, 31u8, - 212u8, 86u8, 211u8, 108u8, 195u8, + 137u8, 58u8, 184u8, 88u8, 247u8, 22u8, 151u8, 64u8, 50u8, + 77u8, 49u8, 10u8, 234u8, 84u8, 213u8, 156u8, 26u8, 200u8, + 214u8, 225u8, 125u8, 231u8, 42u8, 93u8, 159u8, 168u8, 86u8, + 201u8, 116u8, 153u8, 41u8, 127u8, ], ) } - #[doc = " The collection, if any, of which an account is willing to take ownership."] - pub fn ownership_acceptance( + #[doc = " The ongoing queries."] + pub fn queries( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, + _0: impl ::std::borrow::Borrow<::core::primitive::u64>, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, + >, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "OwnershipAcceptance", - vec![::subxt::storage::address::StorageMapKey::new( + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "Queries", + vec![::subxt::storage::address::StaticStorageMapKey::new( _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, )], [ - 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, - 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, - 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, - 90u8, 51u8, 167u8, 189u8, 39u8, + 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, + 231u8, 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, + 59u8, 44u8, 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, + 29u8, 71u8, 49u8, 248u8, 48u8, ], ) } - #[doc = " The collection, if any, of which an account is willing to take ownership."] - pub fn ownership_acceptance_root( + #[doc = " The ongoing queries."] + pub fn queries_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_xcm::pallet::QueryStatus< + ::core::primitive::u32, + >, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "OwnershipAcceptance", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "Queries", Vec::new(), [ - 166u8, 46u8, 6u8, 129u8, 145u8, 240u8, 8u8, 115u8, 232u8, - 123u8, 153u8, 254u8, 202u8, 128u8, 141u8, 17u8, 207u8, 218u8, - 201u8, 239u8, 220u8, 233u8, 22u8, 123u8, 126u8, 151u8, 67u8, - 90u8, 51u8, 167u8, 189u8, 39u8, + 251u8, 97u8, 131u8, 135u8, 93u8, 68u8, 156u8, 25u8, 181u8, + 231u8, 124u8, 93u8, 170u8, 114u8, 250u8, 177u8, 172u8, 51u8, + 59u8, 44u8, 148u8, 189u8, 199u8, 62u8, 118u8, 89u8, 75u8, + 29u8, 71u8, 49u8, 248u8, 48u8, ], ) } - #[doc = " The items held by any given account; set out this way so that items owned by a single"] - #[doc = " account can be enumerated."] - pub fn account( + #[doc = " The existing asset traps."] + #[doc = ""] + #[doc = " Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of"] + #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] + pub fn asset_traps( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - _2: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), + _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 :: StaticStorageAddress :: new ("Nfts" , "Account" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [83u8 , 188u8 , 8u8 , 123u8 , 84u8 , 224u8 , 52u8 , 18u8 , 81u8 , 207u8 , 139u8 , 149u8 , 209u8 , 246u8 , 211u8 , 132u8 , 63u8 , 86u8 , 145u8 , 33u8 , 4u8 , 252u8 , 90u8 , 88u8 , 89u8 , 145u8 , 147u8 , 164u8 , 223u8 , 162u8 , 119u8 , 161u8 ,]) - } - #[doc = " The items held by any given account; set out this way so that items owned by a single"] - #[doc = " account can be enumerated."] - pub fn account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - (), - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "Account", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "AssetTraps", + vec![::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + )], [ - 83u8, 188u8, 8u8, 123u8, 84u8, 224u8, 52u8, 18u8, 81u8, - 207u8, 139u8, 149u8, 209u8, 246u8, 211u8, 132u8, 63u8, 86u8, - 145u8, 33u8, 4u8, 252u8, 90u8, 88u8, 89u8, 145u8, 147u8, - 164u8, 223u8, 162u8, 119u8, 161u8, + 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, + 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, + 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, + 147u8, 44u8, 19u8, 239u8, ], ) } - #[doc = " The collections owned by any given account; set out this way so that collections owned by"] - #[doc = " a single account can be enumerated."] - pub fn collection_account( + #[doc = " The existing asset traps."] + #[doc = ""] + #[doc = " Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of"] + #[doc = " times this pair has been trapped (usually just 1 if it exists at all)."] + pub fn asset_traps_root( &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, (), ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "CollectionAccount" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [173u8 , 183u8 , 58u8 , 232u8 , 121u8 , 133u8 , 40u8 , 226u8 , 60u8 , 146u8 , 31u8 , 110u8 , 186u8 , 235u8 , 206u8 , 160u8 , 36u8 , 221u8 , 27u8 , 222u8 , 91u8 , 107u8 , 93u8 , 19u8 , 5u8 , 24u8 , 51u8 , 220u8 , 79u8 , 26u8 , 216u8 , 26u8 ,]) - } - #[doc = " The collections owned by any given account; set out this way so that collections owned by"] - #[doc = " a single account can be enumerated."] - pub fn collection_account_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - (), - (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionAccount", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "AssetTraps", Vec::new(), [ - 173u8, 183u8, 58u8, 232u8, 121u8, 133u8, 40u8, 226u8, 60u8, - 146u8, 31u8, 110u8, 186u8, 235u8, 206u8, 160u8, 36u8, 221u8, - 27u8, 222u8, 91u8, 107u8, 93u8, 19u8, 5u8, 24u8, 51u8, 220u8, - 79u8, 26u8, 216u8, 26u8, + 4u8, 185u8, 92u8, 4u8, 7u8, 71u8, 214u8, 1u8, 141u8, 59u8, + 87u8, 55u8, 149u8, 26u8, 125u8, 8u8, 88u8, 31u8, 240u8, + 138u8, 133u8, 28u8, 37u8, 131u8, 107u8, 218u8, 86u8, 152u8, + 147u8, 44u8, 19u8, 239u8, ], ) } - #[doc = " The items in existence and their ownership details."] - #[doc = " Stores collection roles as per account."] - pub fn collection_role_of( + #[doc = " Default version to encode XCM when latest version of destination is unknown. If `None`,"] + #[doc = " then the destinations whose XCM version is unknown are considered unreachable."] + pub fn safe_xcm_version( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::CollectionRole, - >, - ::subxt::storage::address::Yes, - (), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "CollectionRoleOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [220u8 , 76u8 , 45u8 , 235u8 , 74u8 , 231u8 , 161u8 , 241u8 , 235u8 , 154u8 , 69u8 , 168u8 , 62u8 , 45u8 , 234u8 , 106u8 , 17u8 , 17u8 , 152u8 , 220u8 , 144u8 , 67u8 , 159u8 , 137u8 , 39u8 , 130u8 , 169u8 , 111u8 , 109u8 , 195u8 , 9u8 , 96u8 ,]) - } - #[doc = " The items in existence and their ownership details."] - #[doc = " Stores collection roles as per account."] - pub fn collection_role_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::CollectionRole, - >, (), (), - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionRoleOf", - Vec::new(), - [ - 220u8, 76u8, 45u8, 235u8, 74u8, 231u8, 161u8, 241u8, 235u8, - 154u8, 69u8, 168u8, 62u8, 45u8, 234u8, 106u8, 17u8, 17u8, - 152u8, 220u8, 144u8, 67u8, 159u8, 137u8, 39u8, 130u8, 169u8, - 111u8, 109u8, 195u8, 9u8, 96u8, - ], - ) - } - #[doc = " The items in existence and their ownership details."] pub fn item (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > , _1 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_nfts :: types :: ItemDetails < :: subxt :: utils :: AccountId32 , runtime_types :: pallet_nfts :: types :: ItemDeposit < :: core :: primitive :: u128 , :: subxt :: utils :: AccountId32 > , runtime_types :: sp_core :: bounded :: bounded_btree_map :: BoundedBTreeMap < :: subxt :: utils :: AccountId32 , :: core :: option :: Option < :: core :: primitive :: u32 > > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{ - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "Item" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [159u8 , 81u8 , 47u8 , 170u8 , 54u8 , 246u8 , 176u8 , 130u8 , 225u8 , 246u8 , 29u8 , 6u8 , 214u8 , 178u8 , 133u8 , 248u8 , 248u8 , 1u8 , 237u8 , 171u8 , 64u8 , 2u8 , 83u8 , 107u8 , 225u8 , 36u8 , 30u8 , 194u8 , 185u8 , 218u8 , 245u8 , 62u8 ,]) - } - #[doc = " The items in existence and their ownership details."] pub fn item_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < runtime_types :: pallet_nfts :: types :: ItemDetails < :: subxt :: utils :: AccountId32 , runtime_types :: pallet_nfts :: types :: ItemDeposit < :: core :: primitive :: u128 , :: subxt :: utils :: AccountId32 > , runtime_types :: sp_core :: bounded :: bounded_btree_map :: BoundedBTreeMap < :: subxt :: utils :: AccountId32 , :: core :: option :: Option < :: core :: primitive :: u32 > > > , () , () , :: subxt :: storage :: address :: Yes >{ - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "Item", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "SafeXcmVersion", + vec![], [ - 159u8, 81u8, 47u8, 170u8, 54u8, 246u8, 176u8, 130u8, 225u8, - 246u8, 29u8, 6u8, 214u8, 178u8, 133u8, 248u8, 248u8, 1u8, - 237u8, 171u8, 64u8, 2u8, 83u8, 107u8, 225u8, 36u8, 30u8, - 194u8, 185u8, 218u8, 245u8, 62u8, + 1u8, 223u8, 218u8, 204u8, 222u8, 129u8, 137u8, 237u8, 197u8, + 142u8, 233u8, 66u8, 229u8, 153u8, 138u8, 222u8, 113u8, 164u8, + 135u8, 213u8, 233u8, 34u8, 24u8, 23u8, 215u8, 59u8, 40u8, + 188u8, 45u8, 244u8, 205u8, 199u8, ], ) } - #[doc = " Metadata of a collection."] - pub fn collection_metadata_of( + #[doc = " The Latest versions that we know various locations support."] + pub fn supported_version( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionMetadata< - ::core::primitive::u128, - >, + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionMetadataOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "SupportedVersion", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 174u8, 253u8, 204u8, 147u8, 93u8, 148u8, 155u8, 23u8, 38u8, - 174u8, 76u8, 126u8, 200u8, 105u8, 78u8, 38u8, 173u8, 92u8, - 153u8, 190u8, 200u8, 130u8, 172u8, 131u8, 96u8, 181u8, 133u8, - 163u8, 219u8, 113u8, 233u8, 135u8, + 112u8, 34u8, 251u8, 179u8, 217u8, 54u8, 125u8, 242u8, 190u8, + 8u8, 44u8, 14u8, 138u8, 76u8, 241u8, 95u8, 233u8, 96u8, + 141u8, 26u8, 151u8, 196u8, 219u8, 137u8, 165u8, 27u8, 87u8, + 128u8, 19u8, 35u8, 222u8, 202u8, ], ) } - #[doc = " Metadata of a collection."] - pub fn collection_metadata_of_root( + #[doc = " The Latest versions that we know various locations support."] + pub fn supported_version_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionMetadata< - ::core::primitive::u128, - >, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u32, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionMetadataOf", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "SupportedVersion", Vec::new(), [ - 174u8, 253u8, 204u8, 147u8, 93u8, 148u8, 155u8, 23u8, 38u8, - 174u8, 76u8, 126u8, 200u8, 105u8, 78u8, 38u8, 173u8, 92u8, - 153u8, 190u8, 200u8, 130u8, 172u8, 131u8, 96u8, 181u8, 133u8, - 163u8, 219u8, 113u8, 233u8, 135u8, + 112u8, 34u8, 251u8, 179u8, 217u8, 54u8, 125u8, 242u8, 190u8, + 8u8, 44u8, 14u8, 138u8, 76u8, 241u8, 95u8, 233u8, 96u8, + 141u8, 26u8, 151u8, 196u8, 219u8, 137u8, 165u8, 27u8, 87u8, + 128u8, 19u8, 35u8, 222u8, 202u8, ], ) } - #[doc = " Metadata of an item."] - pub fn item_metadata_of( + #[doc = " All locations that we have requested version notifications from."] + pub fn version_notifiers( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::ItemMetadata< - runtime_types::pallet_nfts::types::ItemMetadataDeposit< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - ::subxt::storage::address::Yes, - (), + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemMetadataOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [73u8 , 89u8 , 88u8 , 237u8 , 245u8 , 109u8 , 23u8 , 98u8 , 221u8 , 5u8 , 107u8 , 61u8 , 161u8 , 23u8 , 73u8 , 171u8 , 55u8 , 141u8 , 210u8 , 35u8 , 37u8 , 54u8 , 72u8 , 206u8 , 172u8 , 41u8 , 250u8 , 142u8 , 52u8 , 133u8 , 131u8 , 111u8 ,]) - } - #[doc = " Metadata of an item."] - pub fn item_metadata_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::ItemMetadata< - runtime_types::pallet_nfts::types::ItemMetadataDeposit< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - >, - (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "ItemMetadataOf", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "VersionNotifiers", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ - 73u8, 89u8, 88u8, 237u8, 245u8, 109u8, 23u8, 98u8, 221u8, - 5u8, 107u8, 61u8, 161u8, 23u8, 73u8, 171u8, 55u8, 141u8, - 210u8, 35u8, 37u8, 54u8, 72u8, 206u8, 172u8, 41u8, 250u8, - 142u8, 52u8, 133u8, 131u8, 111u8, + 233u8, 217u8, 119u8, 102u8, 41u8, 77u8, 198u8, 24u8, 161u8, + 22u8, 104u8, 149u8, 204u8, 128u8, 123u8, 166u8, 17u8, 36u8, + 202u8, 92u8, 190u8, 44u8, 73u8, 239u8, 88u8, 17u8, 92u8, + 41u8, 236u8, 80u8, 154u8, 10u8, ], ) } - #[doc = " Attributes of a collection."] - pub fn attribute( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow< - ::core::option::Option<::core::primitive::u32>, - >, - _2 : impl :: std :: borrow :: Borrow < runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > >, - _3: impl ::std::borrow::Borrow< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - runtime_types::pallet_nfts::types::AttributeDeposit< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - ), - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "Attribute" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_2 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_3 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [140u8 , 179u8 , 237u8 , 237u8 , 226u8 , 18u8 , 187u8 , 225u8 , 239u8 , 191u8 , 94u8 , 239u8 , 157u8 , 110u8 , 226u8 , 85u8 , 61u8 , 199u8 , 159u8 , 141u8 , 250u8 , 254u8 , 187u8 , 83u8 , 57u8 , 232u8 , 133u8 , 119u8 , 118u8 , 41u8 , 201u8 , 25u8 ,]) - } - #[doc = " Attributes of a collection."] - pub fn attribute_root( + #[doc = " All locations that we have requested version notifications from."] + pub fn version_notifiers_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - runtime_types::pallet_nfts::types::AttributeDeposit< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - >, - ), + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + ::core::primitive::u64, (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "Attribute", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "VersionNotifiers", Vec::new(), [ - 140u8, 179u8, 237u8, 237u8, 226u8, 18u8, 187u8, 225u8, 239u8, - 191u8, 94u8, 239u8, 157u8, 110u8, 226u8, 85u8, 61u8, 199u8, - 159u8, 141u8, 250u8, 254u8, 187u8, 83u8, 57u8, 232u8, 133u8, - 119u8, 118u8, 41u8, 201u8, 25u8, + 233u8, 217u8, 119u8, 102u8, 41u8, 77u8, 198u8, 24u8, 161u8, + 22u8, 104u8, 149u8, 204u8, 128u8, 123u8, 166u8, 17u8, 36u8, + 202u8, 92u8, 190u8, 44u8, 73u8, 239u8, 88u8, 17u8, 92u8, + 41u8, 236u8, 80u8, 154u8, 10u8, ], ) } - #[doc = " A price of an item."] - pub fn item_price_of( + #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] + #[doc = " of our versions we informed them of."] + pub fn version_notify_targets( &self, _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< + _1: impl ::std::borrow::Borrow, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( - ::core::primitive::u128, - ::core::option::Option<::subxt::utils::AccountId32>, + ::core::primitive::u64, + ::core::primitive::u64, + ::core::primitive::u32, ), ::subxt::storage::address::Yes, (), ::subxt::storage::address::Yes, > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemPriceOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [63u8 , 143u8 , 204u8 , 99u8 , 128u8 , 218u8 , 233u8 , 140u8 , 216u8 , 44u8 , 248u8 , 111u8 , 204u8 , 40u8 , 248u8 , 249u8 , 24u8 , 130u8 , 50u8 , 255u8 , 30u8 , 42u8 , 220u8 , 136u8 , 228u8 , 64u8 , 158u8 , 195u8 , 233u8 , 105u8 , 137u8 , 216u8 ,]) + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "VersionNotifyTargets", + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], + [ + 108u8, 104u8, 137u8, 191u8, 2u8, 2u8, 240u8, 174u8, 32u8, + 174u8, 150u8, 136u8, 33u8, 84u8, 30u8, 74u8, 95u8, 94u8, + 20u8, 112u8, 101u8, 204u8, 15u8, 47u8, 136u8, 56u8, 40u8, + 66u8, 1u8, 42u8, 16u8, 247u8, + ], + ) } - #[doc = " A price of an item."] - pub fn item_price_of_root( + #[doc = " The target locations that are subscribed to our version changes, as well as the most recent"] + #[doc = " of our versions we informed them of."] + pub fn version_notify_targets_root( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, ( - ::core::primitive::u128, - ::core::option::Option<::subxt::utils::AccountId32>, + ::core::primitive::u64, + ::core::primitive::u64, + ::core::primitive::u32, ), (), (), ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "ItemPriceOf", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "VersionNotifyTargets", Vec::new(), [ - 63u8, 143u8, 204u8, 99u8, 128u8, 218u8, 233u8, 140u8, 216u8, - 44u8, 248u8, 111u8, 204u8, 40u8, 248u8, 249u8, 24u8, 130u8, - 50u8, 255u8, 30u8, 42u8, 220u8, 136u8, 228u8, 64u8, 158u8, - 195u8, 233u8, 105u8, 137u8, 216u8, + 108u8, 104u8, 137u8, 191u8, 2u8, 2u8, 240u8, 174u8, 32u8, + 174u8, 150u8, 136u8, 33u8, 84u8, 30u8, 74u8, 95u8, 94u8, + 20u8, 112u8, 101u8, 204u8, 15u8, 47u8, 136u8, 56u8, 40u8, + 66u8, 1u8, 42u8, 16u8, 247u8, ], ) } - #[doc = " Item attribute approvals."] - pub fn item_attributes_approvals_of( + #[doc = " Destinations whose latest XCM version we would like to know. Duplicates not allowed, and"] + #[doc = " the `u32` counter is the number of times that a send to the destination has been attempted,"] + #[doc = " which is used as a prioritization."] + pub fn version_discovery_queue( &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u32, + )>, ::subxt::storage::address::Yes, ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemAttributesApprovalsOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [11u8 , 53u8 , 249u8 , 252u8 , 0u8 , 48u8 , 6u8 , 72u8 , 254u8 , 133u8 , 66u8 , 97u8 , 165u8 , 132u8 , 215u8 , 65u8 , 111u8 , 64u8 , 99u8 , 228u8 , 48u8 , 188u8 , 240u8 , 246u8 , 69u8 , 9u8 , 165u8 , 33u8 , 155u8 , 249u8 , 164u8 , 237u8 ,]) - } - #[doc = " Item attribute approvals."] - pub fn item_attributes_approvals_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_btree_set::BoundedBTreeSet< - ::subxt::utils::AccountId32, - >, (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "ItemAttributesApprovalsOf", - Vec::new(), + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "VersionDiscoveryQueue", + vec![], [ - 11u8, 53u8, 249u8, 252u8, 0u8, 48u8, 6u8, 72u8, 254u8, 133u8, - 66u8, 97u8, 165u8, 132u8, 215u8, 65u8, 111u8, 64u8, 99u8, - 228u8, 48u8, 188u8, 240u8, 246u8, 69u8, 9u8, 165u8, 33u8, - 155u8, 249u8, 164u8, 237u8, + 30u8, 163u8, 210u8, 133u8, 30u8, 63u8, 36u8, 9u8, 162u8, + 133u8, 99u8, 170u8, 34u8, 205u8, 27u8, 41u8, 226u8, 141u8, + 165u8, 151u8, 46u8, 140u8, 150u8, 242u8, 178u8, 88u8, 164u8, + 12u8, 129u8, 118u8, 25u8, 79u8, ], ) } - #[doc = " Stores the `CollectionId` that is going to be used for the next collection."] - #[doc = " This gets incremented whenever a new collection is created."] - pub fn next_collection_id( + #[doc = " The current migration's stage, if any."] + pub fn current_migration( &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, + ) -> ::subxt::storage::address::Address< + ::subxt::storage::address::StaticStorageMapKey, + runtime_types::pallet_xcm::pallet::VersionMigrationStage, ::subxt::storage::address::Yes, (), (), > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "NextCollectionId", + ::subxt::storage::address::Address::new_static( + "XcmPallet", + "CurrentMigration", vec![], [ - 247u8, 80u8, 254u8, 162u8, 36u8, 233u8, 151u8, 211u8, 1u8, - 156u8, 102u8, 9u8, 21u8, 175u8, 224u8, 254u8, 255u8, 73u8, - 26u8, 42u8, 112u8, 107u8, 159u8, 108u8, 25u8, 22u8, 84u8, - 113u8, 108u8, 18u8, 253u8, 66u8, - ], - ) - } - #[doc = " Handles all the pending swaps."] - pub fn pending_swap_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::PendingSwap< - ::core::primitive::u32, - ::core::primitive::u32, - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "PendingSwapOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [230u8 , 132u8 , 138u8 , 201u8 , 217u8 , 119u8 , 35u8 , 191u8 , 184u8 , 202u8 , 9u8 , 3u8 , 29u8 , 246u8 , 228u8 , 210u8 , 195u8 , 141u8 , 179u8 , 160u8 , 130u8 , 40u8 , 121u8 , 133u8 , 209u8 , 218u8 , 64u8 , 18u8 , 36u8 , 62u8 , 1u8 , 203u8 ,]) - } - #[doc = " Handles all the pending swaps."] - pub fn pending_swap_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::PendingSwap< - ::core::primitive::u32, - ::core::primitive::u32, - runtime_types::pallet_nfts::types::PriceWithDirection< - ::core::primitive::u128, - >, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "PendingSwapOf", - Vec::new(), - [ - 230u8, 132u8, 138u8, 201u8, 217u8, 119u8, 35u8, 191u8, 184u8, - 202u8, 9u8, 3u8, 29u8, 246u8, 228u8, 210u8, 195u8, 141u8, - 179u8, 160u8, 130u8, 40u8, 121u8, 133u8, 209u8, 218u8, 64u8, - 18u8, 36u8, 62u8, 1u8, 203u8, - ], - ) - } - #[doc = " Config of a collection."] - pub fn collection_config_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionConfigOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 65u8, 20u8, 107u8, 140u8, 134u8, 116u8, 78u8, 79u8, 217u8, - 215u8, 30u8, 185u8, 18u8, 87u8, 127u8, 59u8, 152u8, 94u8, - 144u8, 138u8, 24u8, 9u8, 250u8, 225u8, 7u8, 176u8, 31u8, - 75u8, 171u8, 24u8, 132u8, 168u8, - ], - ) - } - #[doc = " Config of a collection."] - pub fn collection_config_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::CollectionConfig< - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "CollectionConfigOf", - Vec::new(), - [ - 65u8, 20u8, 107u8, 140u8, 134u8, 116u8, 78u8, 79u8, 217u8, - 215u8, 30u8, 185u8, 18u8, 87u8, 127u8, 59u8, 152u8, 94u8, - 144u8, 138u8, 24u8, 9u8, 250u8, 225u8, 7u8, 176u8, 31u8, - 75u8, 171u8, 24u8, 132u8, 168u8, - ], - ) - } - #[doc = " Config of an item."] - pub fn item_config_of( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::ItemConfig, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("Nfts" , "ItemConfigOf" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [13u8 , 64u8 , 28u8 , 168u8 , 121u8 , 178u8 , 11u8 , 143u8 , 107u8 , 185u8 , 148u8 , 54u8 , 212u8 , 83u8 , 251u8 , 165u8 , 19u8 , 222u8 , 130u8 , 90u8 , 111u8 , 144u8 , 146u8 , 255u8 , 68u8 , 66u8 , 225u8 , 62u8 , 89u8 , 33u8 , 200u8 , 120u8 ,]) - } - #[doc = " Config of an item."] - pub fn item_config_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nfts::types::ItemConfig, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Nfts", - "ItemConfigOf", - Vec::new(), - [ - 13u8, 64u8, 28u8, 168u8, 121u8, 178u8, 11u8, 143u8, 107u8, - 185u8, 148u8, 54u8, 212u8, 83u8, 251u8, 165u8, 19u8, 222u8, - 130u8, 90u8, 111u8, 144u8, 146u8, 255u8, 68u8, 66u8, 225u8, - 62u8, 89u8, 33u8, 200u8, 120u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The basic amount of funds that must be reserved for collection."] - pub fn collection_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "CollectionDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved for an item."] - pub fn item_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "ItemDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved when adding metadata to your item."] - pub fn metadata_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "MetadataDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The basic amount of funds that must be reserved when adding an attribute to an item."] - pub fn attribute_deposit_base( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "AttributeDepositBase", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The additional funds that must be reserved for the number of bytes store in metadata,"] - #[doc = " either \"normal\" metadata or attribute metadata."] - pub fn deposit_per_byte( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "DepositPerByte", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum length of data stored on-chain."] - pub fn string_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "StringLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The maximum length of an attribute key."] - pub fn key_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "KeyLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of an attribute value."] - pub fn value_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "ValueLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 approvals an item could have."] - pub fn approvals_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "ApprovalsLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 attributes approvals an item could have."] - pub fn item_attributes_approvals_limit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "ItemAttributesApprovalsLimit", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 max number of tips a user could send."] - pub fn max_tips( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "MaxTips", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 max duration in blocks for deadlines."] - pub fn max_deadline_duration( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "MaxDeadlineDuration", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 = " Disables some of pallet's features."] - pub fn features( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::PalletFeature, - >, - > { - ::subxt::constants::StaticConstantAddress::new( - "Nfts", - "Features", - [ - 6u8, 4u8, 24u8, 100u8, 110u8, 86u8, 4u8, 252u8, 70u8, 43u8, - 169u8, 124u8, 204u8, 27u8, 252u8, 91u8, 99u8, 13u8, 149u8, - 202u8, 65u8, 211u8, 125u8, 108u8, 127u8, 4u8, 146u8, 163u8, - 41u8, 193u8, 25u8, 103u8, + 137u8, 144u8, 168u8, 185u8, 158u8, 90u8, 127u8, 243u8, 227u8, + 134u8, 150u8, 73u8, 15u8, 99u8, 23u8, 47u8, 68u8, 18u8, 39u8, + 16u8, 24u8, 43u8, 161u8, 56u8, 66u8, 111u8, 16u8, 7u8, 252u8, + 125u8, 100u8, 225u8, ], ) } } } } - pub mod transaction_storage { - use super::root_mod; + pub mod runtime_types { use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + pub mod finality_grandpa { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -32911,8 +32008,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Store { - pub data: ::std::vec::Vec<::core::primitive::u8>, + 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, @@ -32923,9 +32023,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Renew { - pub block: ::core::primitive::u32, - pub index: ::core::primitive::u32, + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -32936,123 +32036,162 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CheckProof { - pub proof: - runtime_types::sp_transaction_storage_proof::TransactionStorageProof, + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Index and store data off chain. Minimum data size is 1 bytes, maximum is"] - #[doc = "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`"] - #[doc = "is called. # "] - #[doc = "- n*log(n) of data size, as all data is pushed to an in-memory trie."] - #[doc = "Additionally contains a DB write."] - #[doc = "# "] - pub fn store( - &self, - data: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TransactionStorage", - "store", - Store { data }, - [ - 43u8, 208u8, 69u8, 186u8, 52u8, 197u8, 110u8, 180u8, 94u8, - 179u8, 108u8, 83u8, 54u8, 128u8, 76u8, 158u8, 198u8, 25u8, - 251u8, 31u8, 79u8, 228u8, 104u8, 120u8, 79u8, 187u8, 167u8, - 112u8, 133u8, 201u8, 208u8, 28u8, - ], - ) + } + 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, + Debug, + )] + #[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, } - #[doc = "Renew previously stored data. Parameters are the block number that contains"] - #[doc = "previous `store` or `renew` call and transaction index within that block."] - #[doc = "Transaction index is emitted in the `Stored` or `Renewed` event."] - #[doc = "Applies same fees as `store`."] - #[doc = "# "] - #[doc = "- Constant."] - #[doc = "# "] - pub fn renew( - &self, - block: ::core::primitive::u32, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TransactionStorage", - "renew", - Renew { block, index }, - [ - 72u8, 33u8, 43u8, 220u8, 210u8, 211u8, 107u8, 206u8, 156u8, - 0u8, 45u8, 233u8, 72u8, 154u8, 47u8, 176u8, 73u8, 116u8, - 93u8, 121u8, 197u8, 15u8, 166u8, 53u8, 101u8, 202u8, 21u8, - 208u8, 62u8, 115u8, 100u8, 66u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - #[doc = "Check storage proof for block number `block_number() - StoragePeriod`."] - #[doc = "If such block does not exist the proof is expected to be `None`."] - #[doc = "# "] - #[doc = "- Linear w.r.t the number of indexed transactions in the proved block for random"] - #[doc = " probing."] - #[doc = "There's a DB read for each transaction."] - #[doc = "Here we assume a maximum of 100 probed transactions."] - #[doc = "# "] - pub fn check_proof( - &self, - proof : runtime_types :: sp_transaction_storage_proof :: TransactionStorageProof, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "TransactionStorage", - "check_proof", - CheckProof { proof }, - [ - 102u8, 90u8, 179u8, 228u8, 197u8, 192u8, 53u8, 148u8, 7u8, - 97u8, 25u8, 243u8, 247u8, 161u8, 108u8, 197u8, 137u8, 219u8, - 154u8, 198u8, 4u8, 7u8, 47u8, 150u8, 156u8, 234u8, 20u8, - 51u8, 180u8, 134u8, 10u8, 19u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, } } - } - #[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_storage::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Stored data under specified index."] - pub struct Stored { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Stored { - const PALLET: &'static str = "TransactionStorage"; - const EVENT: &'static str = "Stored"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Renewed data under specified index."] - pub struct Renewed { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Renewed { - const PALLET: &'static str = "TransactionStorage"; - const EVENT: &'static str = "Renewed"; + 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, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, @@ -33063,231 +32202,327 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Storage proof was successfully checked."] - pub struct ProofChecked; - impl ::subxt::events::StaticEvent for ProofChecked { - const PALLET: &'static str = "TransactionStorage"; - const EVENT: &'static str = "ProofChecked"; - } + pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod storage { + pub mod frame_system { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Collection of transaction metadata by block number."] - pub fn transactions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_transaction_storage::TransactionInfo, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "Transactions", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 135u8, 204u8, 74u8, 229u8, 33u8, 97u8, 220u8, 224u8, 215u8, - 234u8, 152u8, 113u8, 14u8, 232u8, 161u8, 97u8, 235u8, 241u8, - 216u8, 115u8, 252u8, 15u8, 116u8, 110u8, 239u8, 105u8, 246u8, - 15u8, 154u8, 213u8, 163u8, 87u8, - ], - ) + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckGenesis; } - #[doc = " Collection of transaction metadata by block number."] - pub fn transactions_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_transaction_storage::TransactionInfo, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "Transactions", - Vec::new(), - [ - 135u8, 204u8, 74u8, 229u8, 33u8, 97u8, 220u8, 224u8, 215u8, - 234u8, 152u8, 113u8, 14u8, 232u8, 161u8, 97u8, 235u8, 241u8, - 216u8, 115u8, 252u8, 15u8, 116u8, 110u8, 239u8, 105u8, 246u8, - 15u8, 154u8, 213u8, 163u8, 87u8, - ], - ) + 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, + Debug, + )] + #[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, + ); } - #[doc = " Count indexed chunks for each block."] - pub fn chunk_count( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "ChunkCount", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 28u8, 45u8, 130u8, 130u8, 223u8, 108u8, 11u8, 246u8, 112u8, - 28u8, 132u8, 216u8, 71u8, 251u8, 141u8, 186u8, 179u8, 73u8, - 225u8, 87u8, 38u8, 182u8, 117u8, 213u8, 79u8, 107u8, 92u8, - 43u8, 167u8, 155u8, 213u8, 135u8, - ], - ) + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckNonZeroSender; } - #[doc = " Count indexed chunks for each block."] - pub fn chunk_count_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "ChunkCount", - Vec::new(), - [ - 28u8, 45u8, 130u8, 130u8, 223u8, 108u8, 11u8, 246u8, 112u8, - 28u8, 132u8, 216u8, 71u8, 251u8, 141u8, 186u8, 179u8, 73u8, - 225u8, 87u8, 38u8, 182u8, 117u8, 213u8, 79u8, 107u8, 92u8, - 43u8, 167u8, 155u8, 213u8, 135u8, - ], - ) + 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, + Debug, + )] + #[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); } - #[doc = " Storage fee per byte."] - pub fn byte_fee( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "ByteFee", - vec![], - [ - 175u8, 21u8, 92u8, 118u8, 196u8, 19u8, 87u8, 215u8, 167u8, - 205u8, 139u8, 138u8, 17u8, 164u8, 85u8, 191u8, 90u8, 206u8, - 35u8, 255u8, 50u8, 63u8, 0u8, 20u8, 222u8, 219u8, 77u8, - 220u8, 57u8, 143u8, 24u8, 185u8, - ], - ) + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckSpecVersion; } - #[doc = " Storage fee per transaction."] - pub fn entry_fee( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "EntryFee", - vec![], - [ - 66u8, 20u8, 76u8, 16u8, 189u8, 156u8, 164u8, 45u8, 163u8, - 66u8, 121u8, 196u8, 103u8, 131u8, 30u8, 188u8, 166u8, 46u8, - 142u8, 113u8, 38u8, 138u8, 109u8, 33u8, 59u8, 61u8, 239u8, - 4u8, 135u8, 76u8, 105u8, 137u8, - ], - ) + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckTxVersion; } - #[doc = " Storage period for data in blocks. Should match `sp_storage_proof::DEFAULT_STORAGE_PERIOD`"] - #[doc = " for block authoring."] - pub fn storage_period( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "StoragePeriod", - vec![], - [ - 10u8, 53u8, 101u8, 7u8, 28u8, 0u8, 14u8, 145u8, 138u8, 50u8, - 14u8, 182u8, 105u8, 25u8, 57u8, 166u8, 116u8, 232u8, 84u8, - 255u8, 71u8, 88u8, 85u8, 28u8, 21u8, 223u8, 119u8, 122u8, - 204u8, 44u8, 171u8, 118u8, - ], - ) + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CheckWeight; } - pub fn block_transactions( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_transaction_storage::TransactionInfo, + } + 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, + Debug, + )] + #[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, >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "BlockTransactions", - vec![], - [ - 238u8, 72u8, 1u8, 41u8, 254u8, 6u8, 252u8, 199u8, 151u8, - 11u8, 246u8, 236u8, 68u8, 18u8, 147u8, 235u8, 60u8, 178u8, - 21u8, 120u8, 216u8, 53u8, 83u8, 29u8, 132u8, 91u8, 14u8, - 120u8, 238u8, 88u8, 160u8, 208u8, - ], - ) } - #[doc = " Was the proof checked in this block?"] - pub fn proof_checked( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::bool, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "TransactionStorage", - "ProofChecked", - vec![], - [ - 120u8, 50u8, 236u8, 167u8, 184u8, 166u8, 35u8, 208u8, 129u8, - 112u8, 151u8, 218u8, 123u8, 60u8, 71u8, 12u8, 210u8, 162u8, - 52u8, 7u8, 192u8, 197u8, 117u8, 101u8, 102u8, 179u8, 62u8, - 240u8, 146u8, 249u8, 190u8, 18u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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< + runtime_types::sp_weights::weight_v2::Weight, + >, + pub max_total: ::core::option::Option< + runtime_types::sp_weights::weight_v2::Weight, + >, + pub reserved: ::core::option::Option< + runtime_types::sp_weights::weight_v2::Weight, + >, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "A dispatch that will fill the block weight up to the given ratio."] + fill_block { + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 1)] + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`"] + #[doc = "# "] + remark { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 2)] + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 3)] + #[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 = 4)] + #[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 = 5)] + #[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 = 6)] + #[doc = "Kill some items from storage."] + kill_storage { + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + }, + #[codec(index = 7)] + #[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 = 8)] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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, + }, } } - } - } - pub mod voter_list { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -33297,11 +32532,12 @@ pub mod api { )] #[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, - >, + 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, @@ -33312,76 +32548,11 @@ pub mod api { )] #[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, - >, - } - 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", - 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< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "VoterList", - "put_in_front_of", - PutInFrontOf { lighter }, - [ - 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, - ], - ) - } + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, } - } - #[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, @@ -33391,15 +32562,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Moved an account from one bag to another."] - pub struct Rebagged { - pub who: ::subxt::utils::AccountId32, - pub from: ::core::primitive::u64, - pub to: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for Rebagged { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "Rebagged"; + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -33410,274 +32576,75 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Updated the score of some account to the given amount."] - pub struct ScoreUpdated { - pub who: ::subxt::utils::AccountId32, - pub new_score: ::core::primitive::u64, - } - impl ::subxt::events::StaticEvent for ScoreUpdated { - const PALLET: &'static str = "VoterList"; - const EVENT: &'static str = "ScoreUpdated"; + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, } } - pub mod storage { + pub mod pallet_authorship { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " A single node, within some bag."] - #[doc = ""] - #[doc = " Nodes store links forward and back within their respective bags."] - pub fn list_nodes( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_bags_list::list::Node, - ::subxt::storage::address::Yes, - (), - ::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, - ], - ) + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Provide a set of uncles."] + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, } - #[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< - 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, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_list_nodes( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_bags_list::list::Bag, - ::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, - )], - [ - 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< - runtime_types::pallet_bags_list::list::Bag, - (), - (), - ::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, - ], - ) - } - } - } - 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::StaticConstantAddress< - ::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, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The uncle parent not in the chain."] + InvalidUncleParent, + #[codec(index = 1)] + #[doc = "Uncles already set in the block."] + UnclesAlreadySet, + #[codec(index = 2)] + #[doc = "Too many uncles."] + TooManyUncles, + #[codec(index = 3)] + #[doc = "The uncle is genesis."] + GenesisUncle, + #[codec(index = 4)] + #[doc = "The uncle is too high in chain."] + TooHighUncle, + #[codec(index = 5)] + #[doc = "The uncle is already included."] + UncleAlreadyIncluded, + #[codec(index = 6)] + #[doc = "The uncle isn't recent enough to be included."] + OldUncle, } } - } - } - pub mod state_trie_migration { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ControlAutoMigration { - pub maybe_config: ::core::option::Option< - runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ContinueMigrate { - pub limits: - runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, - pub real_size_upper: ::core::primitive::u32, - pub witness_task: - runtime_types::pallet_state_trie_migration::pallet::MigrationTask, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MigrateCustomTop { - pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub witness_size: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MigrateCustomChild { - pub root: ::std::vec::Vec<::core::primitive::u8>, - pub child_keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub total_size: ::core::primitive::u32, - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -33687,417 +32654,365 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetSignedMaxLimits { - pub limits: - runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ForceSetProgress { - pub progress_top: - runtime_types::pallet_state_trie_migration::pallet::Progress, - pub progress_child: - runtime_types::pallet_state_trie_migration::pallet::Progress, + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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 struct TransactionApi; - impl TransactionApi { - #[doc = "Control the automatic migration."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be [`Config::ControlOrigin`]."] - pub fn control_auto_migration( - &self, - maybe_config : :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "control_auto_migration", - ControlAutoMigration { maybe_config }, - [ - 162u8, 96u8, 125u8, 236u8, 212u8, 188u8, 150u8, 69u8, 75u8, - 40u8, 116u8, 249u8, 80u8, 248u8, 180u8, 38u8, 167u8, 228u8, - 116u8, 130u8, 201u8, 59u8, 27u8, 3u8, 24u8, 209u8, 40u8, 0u8, - 238u8, 100u8, 173u8, 128u8, - ], - ) + } + 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, + Debug, + )] + #[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>, } - #[doc = "Continue the migration for the given `limits`."] - #[doc = ""] - #[doc = "The dispatch origin of this call can be any signed account."] - #[doc = ""] - #[doc = "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,"] - #[doc = "Upon successful execution, the transaction fee is returned."] - #[doc = ""] - #[doc = "The (potentially over-estimated) of the byte length of all the data read must be"] - #[doc = "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing"] - #[doc = "that executing the current `MigrationTask` with the given `limits` will not exceed"] - #[doc = "`real_size_upper` bytes of read data."] - #[doc = ""] - #[doc = "The `witness_task` is merely a helper to prevent the caller from being slashed or"] - #[doc = "generally trigger a migration that they do not intend. This parameter is just a message"] - #[doc = "from caller, saying that they believed `witness_task` was the last state of the"] - #[doc = "migration, and they only wish for their transaction to do anything, if this assumption"] - #[doc = "holds. In case `witness_task` does not match, the transaction fails."] - #[doc = ""] - #[doc = "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the"] - #[doc = "recommended way of doing this is to pass a `limit` that only bounds `count`, as the"] - #[doc = "`size` limit can always be overwritten."] - pub fn continue_migrate( - &self, - limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, - real_size_upper: ::core::primitive::u32, - witness_task : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationTask, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "continue_migrate", - ContinueMigrate { - limits, - real_size_upper, - witness_task, - }, - [ - 13u8, 29u8, 35u8, 220u8, 79u8, 73u8, 159u8, 203u8, 121u8, - 137u8, 71u8, 108u8, 143u8, 95u8, 183u8, 127u8, 247u8, 1u8, - 63u8, 10u8, 69u8, 1u8, 196u8, 237u8, 175u8, 147u8, 252u8, - 168u8, 152u8, 217u8, 135u8, 109u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ListError { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotHeavier, + #[codec(index = 2)] + NotInSameBag, + #[codec(index = 3)] + NodeNotFound, } - #[doc = "Migrate the list of top keys by iterating each of them one by one."] - #[doc = ""] - #[doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] - #[doc = "should only be used in case any keys are leftover due to a bug."] - pub fn migrate_custom_top( - &self, - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - witness_size: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "migrate_custom_top", - MigrateCustomTop { keys, witness_size }, - [ - 186u8, 249u8, 25u8, 216u8, 251u8, 100u8, 32u8, 31u8, 174u8, - 158u8, 202u8, 41u8, 18u8, 130u8, 187u8, 105u8, 83u8, 125u8, - 131u8, 212u8, 98u8, 120u8, 152u8, 207u8, 208u8, 1u8, 183u8, - 181u8, 169u8, 129u8, 163u8, 161u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - #[doc = "Migrate the list of child keys by iterating each of them one by one."] - #[doc = ""] - #[doc = "All of the given child keys must be present under one `child_root`."] - #[doc = ""] - #[doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] - #[doc = "should only be used in case any keys are leftover due to a bug."] - pub fn migrate_custom_child( - &self, - root: ::std::vec::Vec<::core::primitive::u8>, - child_keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - total_size: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "migrate_custom_child", - MigrateCustomChild { - root, - child_keys, - total_size, - }, - [ - 79u8, 93u8, 66u8, 136u8, 84u8, 153u8, 42u8, 104u8, 242u8, - 99u8, 225u8, 125u8, 233u8, 196u8, 151u8, 160u8, 164u8, 228u8, - 36u8, 186u8, 12u8, 247u8, 118u8, 12u8, 96u8, 218u8, 38u8, - 120u8, 33u8, 147u8, 2u8, 214u8, - ], - ) + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, ()>, + }, + #[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, ()>, + }, } - #[doc = "Set the maximum limit of the signed migration."] - pub fn set_signed_max_limits( - &self, - limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "set_signed_max_limits", - SetSignedMaxLimits { limits }, - [ - 95u8, 185u8, 123u8, 100u8, 144u8, 68u8, 67u8, 101u8, 101u8, - 137u8, 229u8, 154u8, 172u8, 128u8, 4u8, 164u8, 230u8, 63u8, - 196u8, 243u8, 118u8, 187u8, 220u8, 168u8, 73u8, 51u8, 254u8, - 233u8, 214u8, 238u8, 16u8, 227u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "A error in the list interface implementation."] + List(runtime_types::pallet_bags_list::list::ListError), } - #[doc = "Forcefully set the progress the running migration."] - #[doc = ""] - #[doc = "This is only useful in one case: the next key to migrate is too big to be migrated with"] - #[doc = "a signed account, in a parachain context, and we simply want to skip it. A reasonable"] - #[doc = "example of this would be `:code:`, which is both very expensive to migrate, and commonly"] - #[doc = "used, so probably it is already migrated."] - #[doc = ""] - #[doc = "In case you mess things up, you can also, in principle, use this to reset the migration"] - #[doc = "process."] - pub fn force_set_progress( - &self, - progress_top : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, - progress_child : runtime_types :: pallet_state_trie_migration :: pallet :: Progress, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "StateTrieMigration", - "force_set_progress", - ForceSetProgress { - progress_top, - progress_child, - }, - [ - 29u8, 180u8, 184u8, 136u8, 24u8, 192u8, 64u8, 95u8, 243u8, - 171u8, 184u8, 20u8, 62u8, 5u8, 1u8, 25u8, 12u8, 105u8, 137u8, - 81u8, 161u8, 39u8, 215u8, 180u8, 225u8, 24u8, 122u8, 124u8, - 122u8, 183u8, 141u8, 224u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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, + }, } } } - #[doc = "Inner events of this pallet."] - pub type Event = runtime_types::pallet_state_trie_migration::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Given number of `(top, child)` keys were migrated respectively, with the given"] - #[doc = "`compute`."] - pub struct Migrated { - pub top: ::core::primitive::u32, - pub child: ::core::primitive::u32, - pub compute: - runtime_types::pallet_state_trie_migration::pallet::MigrationCompute, - } - impl ::subxt::events::StaticEvent for Migrated { - const PALLET: &'static str = "StateTrieMigration"; - const EVENT: &'static str = "Migrated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some account got slashed by the given amount."] - pub struct Slashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "StateTrieMigration"; - const EVENT: &'static str = "Slashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The auto migration task finished."] - pub struct AutoMigrationFinished; - impl ::subxt::events::StaticEvent for AutoMigrationFinished { - const PALLET: &'static str = "StateTrieMigration"; - const EVENT: &'static str = "AutoMigrationFinished"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Migration got halted due to an error or miss-configuration."] - pub struct Halted { - pub error: runtime_types::pallet_state_trie_migration::pallet::Error, - } - impl ::subxt::events::StaticEvent for Halted { - const PALLET: &'static str = "StateTrieMigration"; - const EVENT: &'static str = "Halted"; - } - } - pub mod storage { + pub mod pallet_balances { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Migration progress."] - #[doc = ""] - #[doc = " This stores the snapshot of the last migrated keys. It can be set into motion and move"] - #[doc = " forward by any of the means provided by this pallet."] - pub fn migration_process( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_state_trie_migration::pallet::MigrationTask, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "StateTrieMigration", - "MigrationProcess", - vec![], - [ - 151u8, 248u8, 89u8, 241u8, 228u8, 249u8, 59u8, 199u8, 21u8, - 95u8, 182u8, 95u8, 205u8, 226u8, 119u8, 123u8, 241u8, 60u8, - 242u8, 52u8, 113u8, 101u8, 170u8, 140u8, 66u8, 66u8, 248u8, - 130u8, 130u8, 140u8, 206u8, 202u8, - ], - ) - } - #[doc = " The limits that are imposed on automatic migrations."] - #[doc = ""] - #[doc = " If set to None, then no automatic migration happens."] pub fn auto_limits (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , () >{ - ::subxt::storage::address::StaticStorageAddress::new( - "StateTrieMigration", - "AutoLimits", - vec![], - [ - 214u8, 100u8, 160u8, 204u8, 4u8, 205u8, 205u8, 100u8, 60u8, - 127u8, 84u8, 243u8, 50u8, 164u8, 153u8, 1u8, 250u8, 123u8, - 134u8, 109u8, 115u8, 173u8, 102u8, 104u8, 18u8, 134u8, 43u8, - 3u8, 7u8, 26u8, 157u8, 39u8, - ], - ) - } - #[doc = " The maximum limits that the signed migration could use."] - #[doc = ""] - #[doc = " If not set, no signed submission is allowed."] - pub fn signed_migration_max_limits( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_state_trie_migration::pallet::MigrationLimits, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "StateTrieMigration", - "SignedMigrationMaxLimits", - vec![], - [ - 142u8, 87u8, 222u8, 135u8, 24u8, 133u8, 45u8, 18u8, 104u8, - 31u8, 147u8, 121u8, 17u8, 155u8, 64u8, 166u8, 209u8, 145u8, - 231u8, 65u8, 172u8, 104u8, 165u8, 19u8, 181u8, 240u8, 169u8, - 6u8, 249u8, 140u8, 63u8, 252u8, - ], - ) + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, ()>, + #[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, ()>, + #[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, ()>, + dest: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[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, ()>, + #[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, ()>, + 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, ()>, + amount: ::core::primitive::u128, + }, } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximal number of bytes that a key can have."] - #[doc = ""] - #[doc = " FRAME itself does not limit the key length."] - #[doc = " The concrete value must therefore depend on your storage usage."] - #[doc = " A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of"] - #[doc = " keys which are then hashed and concatenated, resulting in arbitrarily long keys."] - #[doc = ""] - #[doc = " Use the *state migration RPC* to retrieve the length of the longest key in your"] - #[doc = " storage: "] - #[doc = ""] - #[doc = " The migration will halt with a `Halted` event if this value is too small."] - #[doc = " Since there is no real penalty from over-estimating, it is advised to use a large"] - #[doc = " value. The default is 512 byte."] - #[doc = ""] - #[doc = " Some key lengths for reference:"] - #[doc = " - [`frame_support::storage::StorageValue`]: 32 byte"] - #[doc = " - [`frame_support::storage::StorageMap`]: 64 byte"] - #[doc = " - [`frame_support::storage::StorageDoubleMap`]: 96 byte"] - #[doc = ""] - #[doc = " For more info see"] - #[doc = " "] - pub fn max_key_len( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "StateTrieMigration", - "MaxKeyLen", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, } - } - } - } - pub mod child_bounties { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub value: ::core::primitive::u128, - pub description: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProposeCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - pub fee: ::core::primitive::u128, + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, @@ -34108,11 +33023,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AcceptCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub misc_frozen: _0, + pub fee_frozen: _0, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -34123,11 +33038,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnassignCurator { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + 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, @@ -34138,15 +33052,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AwardChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -34157,11 +33069,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub enum Releases { + #[codec(index = 0)] + V1_0_0, + #[codec(index = 1)] + V2_0_0, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -34172,353 +33084,263 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseChildBounty { - #[codec(compact)] - pub parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - pub child_bounty_id: ::core::primitive::u32, + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Add a new child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of parent"] - #[doc = "bounty and the parent bounty must be in \"active\" state."] - #[doc = ""] - #[doc = "Child-bounty gets added successfully & fund gets transferred from"] - #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] - #[doc = "funds, else the call fails."] - #[doc = ""] - #[doc = "Upper bound to maximum number of active child bounties that can be"] - #[doc = "added are managed via runtime trait config"] - #[doc = "[`Config::MaxActiveChildBountyCount`]."] - #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] - #[doc = "- `value`: Value for executing the proposal."] - #[doc = "- `description`: Text description for the child-bounty."] - pub fn add_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "add_child_bounty", - AddChildBounty { - parent_bounty_id, - value, - description, - }, - [ - 210u8, 156u8, 242u8, 121u8, 28u8, 214u8, 212u8, 203u8, 46u8, - 45u8, 110u8, 25u8, 33u8, 138u8, 136u8, 71u8, 23u8, 102u8, - 203u8, 122u8, 77u8, 162u8, 112u8, 133u8, 43u8, 73u8, 201u8, - 176u8, 102u8, 68u8, 188u8, 8u8, - ], - ) + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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::ApproveOrigin`."] + #[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::ApproveOrigin`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- O(1)."] + #[doc = "# "] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[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, ()>, + }, + #[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>, + }, } - #[doc = "Propose curator for funded child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be curator of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `curator`: Address of child-bounty curator."] - #[doc = "- `fee`: payment fee to child-bounty curator for execution."] - pub fn propose_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - fee: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "propose_curator", - ProposeCurator { - parent_bounty_id, - child_bounty_id, - curator, - fee, - }, - [ - 147u8, 32u8, 161u8, 72u8, 92u8, 246u8, 250u8, 138u8, 98u8, - 84u8, 229u8, 228u8, 217u8, 128u8, 168u8, 20u8, 73u8, 113u8, - 55u8, 207u8, 117u8, 52u8, 9u8, 139u8, 223u8, 149u8, 48u8, - 1u8, 8u8, 82u8, 133u8, 112u8, - ], - ) - } - #[doc = "Accept the curator role for the child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this"] - #[doc = "child-bounty."] - #[doc = ""] - #[doc = "A deposit will be reserved from the curator and refund upon"] - #[doc = "successful payout or cancellation."] - #[doc = ""] - #[doc = "Fee for curator is deducted from curator fee of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] - #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn accept_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "accept_curator", - AcceptCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 112u8, 175u8, 238u8, 54u8, 132u8, 20u8, 206u8, 59u8, 220u8, - 228u8, 207u8, 222u8, 132u8, 240u8, 188u8, 0u8, 210u8, 225u8, - 234u8, 142u8, 232u8, 53u8, 64u8, 89u8, 220u8, 29u8, 28u8, - 123u8, 125u8, 207u8, 10u8, 52u8, - ], - ) - } - #[doc = "Unassign curator from a child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] - #[doc = "the curator of the parent bounty, or any signed origin."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] - #[doc = "curator, parent bounty must be in active state, for this call to"] - #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] - #[doc = "this call irrespective of the parent bounty state."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin` or the"] - #[doc = "parent bounty curator, we assume that the child-bounty curator is"] - #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] - #[doc = "slashed."] - #[doc = ""] - #[doc = "If the origin is the child-bounty curator, we take this as a sign"] - #[doc = "that they are unable to do their job, and are willingly giving up."] - #[doc = "We could slash the deposit, but for now we allow them to unreserve"] - #[doc = "their deposit and exit without issue. (We may want to change this if"] - #[doc = "it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] - #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] - #[doc = "inactive state of child-bounty curator."] - #[doc = ""] - #[doc = "This allows anyone in the community to call out that a child-bounty"] - #[doc = "curator is not doing their due diligence, and we should pick a new"] - #[doc = "one. In this case the child-bounty curator deposit is slashed."] - #[doc = ""] - #[doc = "State of child-bounty is moved to Added state on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn unassign_curator( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "unassign_curator", - UnassignCurator { - parent_bounty_id, - child_bounty_id, - }, - [ - 228u8, 189u8, 46u8, 75u8, 121u8, 161u8, 150u8, 87u8, 207u8, - 86u8, 192u8, 50u8, 52u8, 61u8, 49u8, 88u8, 178u8, 182u8, - 89u8, 72u8, 203u8, 45u8, 41u8, 26u8, 149u8, 114u8, 154u8, - 169u8, 118u8, 128u8, 13u8, 211u8, - ], - ) - } - #[doc = "Award child-bounty to a beneficiary."] - #[doc = ""] - #[doc = "The beneficiary will be able to claim the funds after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the parent curator or"] - #[doc = "curator of this child-bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in active state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `beneficiary`: Beneficiary account."] - pub fn award_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "award_child_bounty", - AwardChildBounty { - parent_bounty_id, - child_bounty_id, - beneficiary, - }, - [ - 214u8, 25u8, 53u8, 19u8, 146u8, 11u8, 223u8, 173u8, 22u8, - 235u8, 27u8, 57u8, 90u8, 171u8, 161u8, 45u8, 102u8, 37u8, - 171u8, 110u8, 215u8, 151u8, 46u8, 136u8, 93u8, 7u8, 254u8, - 112u8, 47u8, 42u8, 144u8, 140u8, - ], - ) - } - #[doc = "Claim the payout from an awarded child-bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call may be any signed origin."] - #[doc = ""] - #[doc = "Call works independent of parent bounty state, No need for parent"] - #[doc = "bounty to be in active state."] - #[doc = ""] - #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] - #[doc = "paid & curator deposit is unreserved."] - #[doc = ""] - #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] - #[doc = "call. And instance of child-bounty is removed from the state on"] - #[doc = "successful call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn claim_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "claim_child_bounty", - ClaimChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 134u8, 243u8, 151u8, 228u8, 38u8, 174u8, 96u8, 140u8, 104u8, - 124u8, 166u8, 206u8, 126u8, 211u8, 17u8, 100u8, 172u8, 5u8, - 234u8, 171u8, 125u8, 2u8, 191u8, 163u8, 72u8, 29u8, 163u8, - 107u8, 65u8, 92u8, 41u8, 45u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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 = "Cancel a proposed or active child-bounty. Child-bounty account funds"] - #[doc = "are transferred to parent bounty account. The child-bounty curator"] - #[doc = "deposit may be unreserved if possible."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be either parent curator or"] - #[doc = "`T::RejectOrigin`."] - #[doc = ""] - #[doc = "If the state of child-bounty is `Active`, curator deposit is"] - #[doc = "unreserved."] - #[doc = ""] - #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] - #[doc = "returns `PendingPayout` error."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] - #[doc = "active state, for this child-bounty call to work. For origin"] - #[doc = "T::RejectOrigin execution is forced."] - #[doc = ""] - #[doc = "Instance of child-bounty is removed from the state on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - pub fn close_child_bounty( - &self, - parent_bounty_id: ::core::primitive::u32, - child_bounty_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ChildBounties", - "close_child_bounty", - CloseChildBounty { - parent_bounty_id, - child_bounty_id, - }, - [ - 40u8, 0u8, 235u8, 75u8, 36u8, 196u8, 29u8, 26u8, 30u8, 172u8, - 240u8, 44u8, 129u8, 243u8, 55u8, 211u8, 96u8, 159u8, 72u8, - 96u8, 142u8, 68u8, 41u8, 238u8, 157u8, 167u8, 90u8, 141u8, - 213u8, 249u8, 222u8, 22u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_child_bounties::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is added."] - pub struct Added { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Added { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Added"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is awarded to a beneficiary."] - pub struct Awarded { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Awarded { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Awarded"; - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -34528,16 +33350,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is claimed by beneficiary."] - pub struct Claimed { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - pub payout: ::core::primitive::u128, - pub beneficiary: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for Claimed { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Claimed"; + 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, @@ -34548,382 +33367,301 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A child-bounty is cancelled."] - pub struct Canceled { - pub index: ::core::primitive::u32, - pub child_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Canceled { - const PALLET: &'static str = "ChildBounties"; - const EVENT: &'static str = "Canceled"; + 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 storage { + pub mod pallet_child_bounties { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Number of total child bounties."] - pub fn child_bounty_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBountyCount", - vec![], - [ - 46u8, 10u8, 183u8, 160u8, 98u8, 215u8, 39u8, 253u8, 81u8, - 94u8, 114u8, 147u8, 115u8, 162u8, 33u8, 117u8, 160u8, 214u8, - 167u8, 7u8, 109u8, 143u8, 158u8, 1u8, 200u8, 205u8, 17u8, - 93u8, 89u8, 26u8, 30u8, 95u8, - ], - ) - } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ParentChildBounties", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, - 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, - 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, - 250u8, 77u8, 49u8, 76u8, 188u8, - ], - ) - } - #[doc = " Number of child bounties per parent bounty."] - #[doc = " Map of parent bounty index to number of child bounties."] - pub fn parent_child_bounties_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ParentChildBounties", - Vec::new(), - [ - 127u8, 161u8, 181u8, 79u8, 235u8, 196u8, 252u8, 162u8, 39u8, - 15u8, 251u8, 49u8, 125u8, 80u8, 101u8, 24u8, 234u8, 88u8, - 212u8, 126u8, 63u8, 63u8, 19u8, 75u8, 137u8, 125u8, 38u8, - 250u8, 77u8, 49u8, 76u8, 188u8, - ], - ) - } - #[doc = " Child bounties that have been added."] - pub fn child_bounties( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBounties", - 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, - ), - ], - [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, - 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, - 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, - 116u8, 219u8, 186u8, 165u8, 91u8, - ], - ) - } - #[doc = " Child bounties that have been added."] - pub fn child_bounties_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_child_bounties::ChildBounty< - ::subxt::utils::AccountId32, - ::core::primitive::u128, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBounties", - Vec::new(), - [ - 66u8, 132u8, 251u8, 223u8, 216u8, 52u8, 162u8, 150u8, 229u8, - 239u8, 219u8, 182u8, 211u8, 228u8, 181u8, 46u8, 243u8, 151u8, - 111u8, 235u8, 105u8, 40u8, 39u8, 10u8, 245u8, 113u8, 78u8, - 116u8, 219u8, 186u8, 165u8, 91u8, - ], - ) - } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBountyDescriptions", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, - 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, - 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, - 93u8, 207u8, 212u8, 141u8, 74u8, - ], - ) - } - #[doc = " The description of each child-bounty."] - pub fn child_bounty_descriptions_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildBountyDescriptions", - Vec::new(), - [ - 193u8, 200u8, 40u8, 30u8, 14u8, 71u8, 90u8, 42u8, 58u8, - 253u8, 225u8, 158u8, 172u8, 10u8, 45u8, 238u8, 36u8, 144u8, - 184u8, 153u8, 11u8, 157u8, 125u8, 220u8, 175u8, 31u8, 28u8, - 93u8, 207u8, 212u8, 141u8, 74u8, - ], - ) - } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildrenCuratorFees", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, - 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, - 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, - 211u8, 121u8, 168u8, 0u8, 216u8, - ], - ) - } - #[doc = " The cumulative child-bounty curator fee for each parent bounty."] - pub fn children_curator_fees_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ChildBounties", - "ChildrenCuratorFees", - Vec::new(), - [ - 174u8, 128u8, 86u8, 179u8, 133u8, 76u8, 98u8, 169u8, 234u8, - 166u8, 249u8, 214u8, 172u8, 171u8, 8u8, 161u8, 105u8, 69u8, - 148u8, 151u8, 35u8, 174u8, 118u8, 139u8, 101u8, 56u8, 85u8, - 211u8, 121u8, 168u8, 0u8, 216u8, - ], - ) + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + add_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + propose_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + curator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + accept_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + unassign_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + award_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + }, + #[codec(index = 5)] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + claim_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + close_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Maximum number of child bounties that can be added to a parent bounty."] - pub fn max_active_child_bounty_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ChildBounties", - "MaxActiveChildBountyCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The parent bounty is not in active state."] + ParentBountyNotActive, + #[codec(index = 1)] + #[doc = "The bounty balance is not enough to add new child-bounty."] + InsufficientBountyBalance, + #[codec(index = 2)] + #[doc = "Number of child bounties exceeds limit `MaxActiveChildBountyCount`."] + TooManyChildBounties, } - #[doc = " Minimum value for a child-bounty."] - pub fn child_bounty_value_minimum( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "ChildBounties", - "ChildBountyValueMinimum", - [ - 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, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 child-bounty is added."] + Added { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A child-bounty is awarded to a beneficiary."] + Awarded { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "A child-bounty is claimed by beneficiary."] + Claimed { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A child-bounty is cancelled."] + Canceled { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + }, } } - } - } - pub mod referenda { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub proposal_origin: - ::std::boxed::Box, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - pub enactment_moment: - runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlaceDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kill { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NudgeReferendum { - pub index: ::core::primitive::u32, - } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -34932,11 +33670,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OneFewerDeciding { - pub track: ::core::primitive::u16, + pub struct ChildBounty<_0, _1, _2> { + pub parent_bounty: _2, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub status: + runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -34945,269 +33687,358 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundSubmissionDeposit { - pub index: ::core::primitive::u32, + pub enum ChildBountyStatus<_0, _1> { + #[codec(index = 0)] + Added, + #[codec(index = 1)] + CuratorProposed { curator: _0 }, + #[codec(index = 2)] + Active { curator: _0 }, + #[codec(index = 3)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub fn submit( - &self, - proposal_origin: runtime_types::kitchensink_runtime::OriginCaller, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "submit", - Submit { - proposal_origin: ::std::boxed::Box::new(proposal_origin), - proposal, - enactment_moment, - }, - [ - 91u8, 158u8, 209u8, 182u8, 19u8, 184u8, 252u8, 30u8, 200u8, - 62u8, 92u8, 254u8, 200u8, 245u8, 134u8, 143u8, 135u8, 67u8, - 95u8, 107u8, 115u8, 109u8, 12u8, 48u8, 111u8, 239u8, 84u8, - 255u8, 23u8, 26u8, 140u8, 187u8, - ], - ) - } - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub fn place_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "place_decision_deposit", - PlaceDecisionDeposit { index }, - [ - 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, - 232u8, 119u8, 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, - 145u8, 159u8, 84u8, 111u8, 36u8, 4u8, 206u8, 5u8, 139u8, - 231u8, 11u8, 231u8, 6u8, 30u8, - ], - ) - } - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub fn refund_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "refund_decision_deposit", - RefundDecisionDeposit { index }, - [ - 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, - 93u8, 19u8, 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, - 244u8, 48u8, 202u8, 223u8, 201u8, 130u8, 112u8, 167u8, 29u8, - 207u8, 112u8, 181u8, 43u8, 93u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub fn cancel( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "cancel", - Cancel { index }, - [ - 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, - 235u8, 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, - 223u8, 50u8, 245u8, 101u8, 97u8, 39u8, 226u8, 4u8, 196u8, - 16u8, 66u8, 177u8, 178u8, 252u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub fn kill( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "kill", - Kill { index }, - [ - 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, - 141u8, 104u8, 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, - 84u8, 178u8, 246u8, 26u8, 113u8, 224u8, 157u8, 94u8, 16u8, - 14u8, 158u8, 80u8, 148u8, 198u8, - ], - ) - } - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub fn nudge_referendum( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "nudge_referendum", - NudgeReferendum { index }, - [ - 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, - 170u8, 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, - 7u8, 230u8, 243u8, 15u8, 206u8, 114u8, 8u8, 128u8, 46u8, - 150u8, 114u8, 241u8, 112u8, 97u8, - ], - ) + } + pub mod pallet_collective { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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< + runtime_types::polkadot_runtime::RuntimeCall, + >, + #[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< + runtime_types::polkadot_runtime::RuntimeCall, + >, + #[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, + }, } - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub fn one_fewer_deciding( - &self, - track: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Referenda", - "one_fewer_deciding", - OneFewerDeciding { track }, - [ - 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, - 110u8, 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, - 16u8, 143u8, 233u8, 137u8, 247u8, 138u8, 96u8, 32u8, 223u8, - 149u8, 52u8, 214u8, 195u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, } - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub fn refund_submission_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Referenda", - "refund_submission_deposit", - RefundSubmissionDeposit { index }, - [ - 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, - 92u8, 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, - 23u8, 132u8, 89u8, 19u8, 81u8, 238u8, 133u8, 243u8, 56u8, - 70u8, 143u8, 43u8, 176u8, 83u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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, + }, } } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_referenda::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been submitted."] - pub struct Submitted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - } - impl ::subxt::events::StaticEvent for Submitted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Submitted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The decision deposit has been placed."] - pub struct DecisionDepositPlaced { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DecisionDepositPlaced { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositPlaced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The decision deposit has been refunded."] - pub struct DecisionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DecisionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionDepositRefunded"; - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -35217,14 +34048,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A deposit has been slashaed."] - pub struct DepositSlashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DepositSlashed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DepositSlashed"; + 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, @@ -35235,501 +34065,711 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has moved into the deciding phase."] - pub struct DecisionStarted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for DecisionStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "DecisionStarted"; + 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, } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ConfirmStarted { - pub index: ::core::primitive::u32, + } + pub mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Conviction { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Locked1x, + #[codec(index = 2)] + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, + } } - impl ::subxt::events::StaticEvent for ConfirmStarted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmStarted"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ConfirmAborted { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ConfirmAborted { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "ConfirmAborted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has ended its confirmation phase and is ready for approval."] - pub struct Confirmed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for Confirmed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Confirmed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been approved and its proposal has been scheduled."] - pub struct Approved { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Approved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proposal has been rejected by referendum."] - pub struct Rejected { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for Rejected { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Rejected"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been timed out without being decided."] - pub struct TimedOut { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for TimedOut { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "TimedOut"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been cancelled."] - pub struct Cancelled { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for Cancelled { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Cancelled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been killed."] - pub struct Killed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - } - impl ::subxt::events::StaticEvent for Killed { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "Killed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The submission deposit has been refunded."] - pub struct SubmissionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { - const PALLET: &'static str = "Referenda"; - const EVENT: &'static str = "SubmissionDepositRefunded"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The next free referendum index, aka the number of referenda started so far."] - pub fn referendum_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "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, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::kitchensink_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_conviction_voting::types::Tally< - ::core::primitive::u128, - >, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "ReferendumInfoFor", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 25u8, 217u8, 0u8, 39u8, 178u8, 83u8, 21u8, 62u8, 224u8, - 149u8, 196u8, 86u8, 187u8, 173u8, 75u8, 17u8, 234u8, 126u8, - 202u8, 44u8, 196u8, 253u8, 214u8, 158u8, 119u8, 128u8, 69u8, - 239u8, 178u8, 51u8, 117u8, 16u8, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::kitchensink_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_conviction_voting::types::Tally< + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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::polkadot_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, >, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "ReferendumInfoFor", - Vec::new(), - [ - 25u8, 217u8, 0u8, 39u8, 178u8, 83u8, 21u8, 62u8, 224u8, - 149u8, 196u8, 86u8, 187u8, 173u8, 75u8, 17u8, 234u8, 126u8, - 202u8, 44u8, 196u8, 253u8, 214u8, 158u8, 119u8, 128u8, 69u8, - 239u8, 178u8, 51u8, 117u8, 16u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u128, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "TrackQueue", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, - 117u8, 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, - 244u8, 117u8, 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, - 202u8, 109u8, 39u8, 253u8, 240u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u128, - )>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "TrackQueue", - Vec::new(), - [ - 254u8, 82u8, 183u8, 246u8, 168u8, 87u8, 175u8, 224u8, 192u8, - 117u8, 129u8, 244u8, 18u8, 18u8, 249u8, 30u8, 51u8, 133u8, - 244u8, 117u8, 194u8, 174u8, 99u8, 51u8, 155u8, 76u8, 206u8, - 202u8, 109u8, 39u8, 253u8, 240u8, - ], - ) + }, + #[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::polkadot_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::polkadot_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::polkadot_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, ()>, + 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, ()>, + }, + #[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, ()>, + 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, + }, } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "DecidingCount", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, - 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, - 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, - 234u8, 177u8, 223u8, 63u8, 150u8, - ], - ) - } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Referenda", - "DecidingCount", - Vec::new(), - [ - 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, - 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, - 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, - 234u8, 177u8, 223u8, 63u8, 150u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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 constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] - pub fn submission_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Referenda", - "SubmissionDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, } - #[doc = " Maximum size of the referendum queue for a single track."] - pub fn max_queued( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Referenda", - "MaxQueued", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2> { + #[codec(index = 0)] + Ongoing( + runtime_types::pallet_democracy::types::ReferendumStatus< + _0, + _1, + _2, + >, + ), + #[codec(index = 1)] + Finished { + approved: ::core::primitive::bool, + end: _0, + }, } - #[doc = " The number of blocks after submission that a referendum must begin being decided by."] - #[doc = " Once this passes, then anyone may cancel the referendum."] - pub fn undeciding_timeout( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Referenda", - "UndecidingTimeout", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal: _1, + pub threshold: + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, } - #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] - #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] - #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] - pub fn alarm_interval( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Referenda", - "AlarmInterval", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, } - #[doc = " Information concerning the different referendum tracks."] - pub fn tracks( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::std::vec::Vec<( - ::core::primitive::u16, - runtime_types::pallet_referenda::types::TrackInfo< - ::core::primitive::u128, - ::core::primitive::u32, + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, + }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2> { + #[codec(index = 0)] + Direct { + votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), >, - )>, - > { - ::subxt::constants::StaticConstantAddress::new( - "Referenda", - "Tracks", - [ - 71u8, 253u8, 246u8, 54u8, 168u8, 190u8, 182u8, 15u8, 207u8, - 26u8, 50u8, 138u8, 212u8, 124u8, 13u8, 203u8, 27u8, 35u8, - 224u8, 1u8, 176u8, 192u8, 197u8, 220u8, 147u8, 94u8, 196u8, - 150u8, 125u8, 23u8, 48u8, 255u8, - ], - ) + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + #[codec(index = 1)] + Delegating { + balance: _0, + target: _1, + conviction: + runtime_types::pallet_democracy::conviction::Conviction, + delegations: + runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + } + } + pub mod vote_threshold { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VoteThreshold { + #[codec(index = 0)] + SuperMajorityApprove, + #[codec(index = 1)] + SuperMajorityAgainst, + #[codec(index = 2)] + SimpleMajority, } } } - } - pub mod remark { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + pub mod pallet_election_provider_multi_phase { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "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 :: polkadot_runtime :: NposCompactSolution16 > > , 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 :: polkadot_runtime :: NposCompactSolution16 > > , } , # [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, + Debug, + )] + #[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, + Debug, + )] + #[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 = "If the solution is signed, this means that it hasn't yet been processed. If the"] # [doc = "solution is unsigned, this means that it has also been processed."] # [doc = ""] # [doc = "The `bool` is `true` when a previous solution was ejected to make room for this one."] SolutionStored { compute : runtime_types :: pallet_election_provider_multi_phase :: ElectionCompute , 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 = "The signed phase of the given round has started."] SignedPhaseStarted { round : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The unsigned phase of the given round has started."] UnsignedPhaseStarted { round : :: core :: primitive :: u32 , } , } + } + 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, + Debug, + )] + #[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, @@ -35739,34 +34779,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Store { - pub remark: ::std::vec::Vec<::core::primitive::u8>, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Index and store data off chain."] - pub fn store( - &self, - remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Remark", - "store", - Store { remark }, - [ - 55u8, 111u8, 88u8, 127u8, 252u8, 241u8, 51u8, 152u8, 154u8, - 138u8, 228u8, 171u8, 59u8, 29u8, 135u8, 236u8, 227u8, 108u8, - 169u8, 205u8, 25u8, 96u8, 118u8, 73u8, 105u8, 132u8, 150u8, - 148u8, 94u8, 230u8, 66u8, 73u8, - ], - ) - } + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, } - } - #[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_remark::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -35776,25 +34800,30 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Stored data off chain."] - pub struct Stored { - pub sender: ::subxt::utils::AccountId32, - pub content_hash: ::subxt::utils::H256, + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, } - impl ::subxt::events::StaticEvent for Stored { - const PALLET: &'static str = "Remark"; - const EVENT: &'static str = "Stored"; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, } - } - } - pub mod root_testing { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -35804,54 +34833,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FillBlock { - pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - pub fn fill_block( - &self, - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RootTesting", - "fill_block", - FillBlock { ratio }, - [ - 48u8, 18u8, 205u8, 90u8, 222u8, 4u8, 20u8, 251u8, 173u8, - 76u8, 167u8, 4u8, 83u8, 203u8, 160u8, 89u8, 132u8, 218u8, - 191u8, 145u8, 130u8, 245u8, 177u8, 201u8, 169u8, 129u8, - 173u8, 105u8, 88u8, 45u8, 136u8, 191u8, - ], - ) - } - } - } - } - pub mod conviction_voting { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - #[codec(compact)] - pub poll_index: ::core::primitive::u32, - pub vote: runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >, + 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, @@ -35862,28 +34853,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegate { - pub class: ::core::primitive::u16, - pub to: ::subxt::utils::MultiAddress< + pub struct RoundSnapshot { + pub voters: ::std::vec::Vec<( ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub conviction: - runtime_types::pallet_conviction_voting::conviction::Conviction, - pub balance: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Undelegate { - pub class: ::core::primitive::u16, + ::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, @@ -35894,25 +34872,265 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Unlock { - pub class: ::core::primitive::u16, - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveVote { - pub class: ::core::option::Option<::core::primitive::u16>, - pub index: ::core::primitive::u32, + } + pub mod pallet_elections_phragmen { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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, ()>, + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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, @@ -35923,246 +35141,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveOtherVote { - pub target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub class: ::core::primitive::u16, - pub index: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] - #[doc = "otherwise it is a vote to keep the status quo."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `poll_index`: The index of the poll to vote for."] - #[doc = "- `vote`: The vote configuration."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] - pub fn vote( - &self, - poll_index: ::core::primitive::u32, - vote: runtime_types::pallet_conviction_voting::vote::AccountVote< - ::core::primitive::u128, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "vote", - Vote { poll_index, vote }, - [ - 255u8, 8u8, 191u8, 166u8, 7u8, 48u8, 227u8, 0u8, 34u8, 109u8, - 3u8, 172u8, 168u8, 37u8, 220u8, 229u8, 88u8, 61u8, 117u8, - 212u8, 131u8, 124u8, 74u8, 60u8, 83u8, 62u8, 193u8, 66u8, - 162u8, 121u8, 76u8, 180u8, - ], - ) - } - #[doc = "Delegate the voting power (with some given conviction) of the sending account for a"] - #[doc = "particular class of polls."] - #[doc = ""] - #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] - #[doc = "time appropriate for the conviction's lock period."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] - #[doc = " - be delegating already; or"] - #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] - #[doc = " through `reap_vote` or `unvote`)."] - #[doc = ""] - #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] - #[doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] - #[doc = " to this function are required."] - #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] - #[doc = " account is undelegated, the funds will be locked for the corresponding period."] - #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] - #[doc = " be more than the account's current balance."] - #[doc = ""] - #[doc = "Emits `Delegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub fn delegate( - &self, - class: ::core::primitive::u16, - to: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - conviction : runtime_types :: pallet_conviction_voting :: conviction :: Conviction, - balance: ::core::primitive::u128, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "delegate", - Delegate { - class, - to, - conviction, - balance, - }, - [ - 171u8, 252u8, 251u8, 36u8, 176u8, 75u8, 66u8, 106u8, 199u8, - 126u8, 94u8, 221u8, 146u8, 1u8, 172u8, 60u8, 160u8, 245u8, - 47u8, 98u8, 183u8, 66u8, 96u8, 19u8, 129u8, 163u8, 118u8, - 216u8, 54u8, 109u8, 190u8, 103u8, - ], - ) - } - #[doc = "Undelegate the voting power of the sending account for a particular class of polls."] - #[doc = ""] - #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] - #[doc = "of the conviction with which the delegation was issued has passed."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] - #[doc = "currently delegating."] - #[doc = ""] - #[doc = "- `class`: The class of polls to remove the delegation from."] - #[doc = ""] - #[doc = "Emits `Undelegated`."] - #[doc = ""] - #[doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] - #[doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] - pub fn undelegate( - &self, - class: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "undelegate", - Undelegate { class }, - [ - 0u8, 244u8, 151u8, 108u8, 96u8, 240u8, 126u8, 247u8, 29u8, - 33u8, 25u8, 34u8, 253u8, 207u8, 107u8, 227u8, 139u8, 64u8, - 184u8, 112u8, 246u8, 81u8, 201u8, 41u8, 32u8, 201u8, 194u8, - 201u8, 4u8, 170u8, 40u8, 83u8, - ], - ) - } - #[doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] - #[doc = "class."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `class`: The class of polls to unlock."] - #[doc = "- `target`: The account to remove the lock on."] - #[doc = ""] - #[doc = "Weight: `O(R)` with R number of vote of target."] - pub fn unlock( - &self, - class: ::core::primitive::u16, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "unlock", - Unlock { class, target }, - [ - 165u8, 17u8, 167u8, 109u8, 53u8, 26u8, 241u8, 236u8, 105u8, - 144u8, 12u8, 61u8, 100u8, 52u8, 54u8, 88u8, 203u8, 255u8, - 63u8, 215u8, 137u8, 156u8, 112u8, 243u8, 79u8, 136u8, 147u8, - 185u8, 102u8, 0u8, 57u8, 223u8, - ], - ) - } - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If:"] - #[doc = "- the poll was cancelled, or"] - #[doc = "- the poll is ongoing, or"] - #[doc = "- the poll has ended such that"] - #[doc = " - the vote of the account was in opposition to the result; or"] - #[doc = " - there was no conviction to the account's vote; or"] - #[doc = " - the account made a split vote"] - #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] - #[doc = "funds being available."] - #[doc = ""] - #[doc = "If, however, the poll has ended and:"] - #[doc = "- it finished corresponding to the vote of the account, and"] - #[doc = "- the account made a standard vote with conviction, and"] - #[doc = "- the lock period of the conviction is not over"] - #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] - #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] - #[doc = "of both the amount locked and the time is it locked for)."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] - #[doc = "registered for poll `index`."] - #[doc = ""] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] - #[doc = " which have finished or are cancelled, this must be `Some`."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_vote( - &self, - class: ::core::option::Option<::core::primitive::u16>, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "remove_vote", - RemoveVote { class, index }, - [ - 151u8, 255u8, 135u8, 195u8, 137u8, 27u8, 116u8, 193u8, 245u8, - 78u8, 38u8, 130u8, 233u8, 28u8, 235u8, 50u8, 144u8, 191u8, - 39u8, 68u8, 17u8, 214u8, 25u8, 2u8, 120u8, 14u8, 219u8, - 205u8, 59u8, 192u8, 125u8, 142u8, - ], - ) - } - #[doc = "Remove a vote for a poll."] - #[doc = ""] - #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] - #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] - #[doc = "either because the poll was cancelled, because the voter lost the poll or"] - #[doc = "because the conviction period is over."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] - #[doc = " `index`."] - #[doc = "- `index`: The index of poll of the vote to be removed."] - #[doc = "- `class`: The class of the poll."] - #[doc = ""] - #[doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] - #[doc = " Weight is calculated for the maximum number of vote."] - pub fn remove_other_vote( - &self, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - class: ::core::primitive::u16, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "ConvictionVoting", - "remove_other_vote", - RemoveOtherVote { - target, - class, - index, - }, - [ - 9u8, 219u8, 232u8, 254u8, 85u8, 1u8, 189u8, 186u8, 87u8, - 95u8, 27u8, 248u8, 14u8, 165u8, 86u8, 167u8, 230u8, 18u8, - 225u8, 151u8, 105u8, 169u8, 84u8, 254u8, 201u8, 122u8, 157u8, - 189u8, 40u8, 29u8, 107u8, 21u8, - ], - ) - } + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::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_conviction_voting::pallet::Event; - pub mod events { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -36172,14 +35158,10 @@ pub mod api { )] #[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. \\[who, target\\]"] - pub struct Delegated( - pub ::subxt::utils::AccountId32, - pub ::subxt::utils::AccountId32, - ); - impl ::subxt::events::StaticEvent for Delegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Delegated"; + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -36190,342 +35172,291 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An \\[account\\] has cancelled a previous delegation operation."] - pub struct Undelegated(pub ::subxt::utils::AccountId32); - impl ::subxt::events::StaticEvent for Undelegated { - const PALLET: &'static str = "ConvictionVoting"; - const EVENT: &'static str = "Undelegated"; + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, } } - pub mod storage { + pub mod pallet_fast_unstake { use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] - #[doc = " number of votes that we have recorded."] - pub fn voting_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - _1: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ConvictionVoting", - "VotingFor", - 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, - ), - ], - [ - 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, - 73u8, 153u8, 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, - 57u8, 121u8, 24u8, 241u8, 161u8, 150u8, 252u8, 133u8, 65u8, - 232u8, 21u8, 28u8, 25u8, 75u8, - ], - ) - } - #[doc = " All voting for a particular voter in a particular voting class. We store the balance for the"] - #[doc = " number of votes that we have recorded."] - pub fn voting_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_conviction_voting::vote::Voting< - ::core::primitive::u128, - ::subxt::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ConvictionVoting", - "VotingFor", - Vec::new(), - [ - 45u8, 18u8, 71u8, 145u8, 31u8, 220u8, 221u8, 51u8, 69u8, - 73u8, 153u8, 139u8, 46u8, 231u8, 122u8, 15u8, 98u8, 186u8, - 57u8, 121u8, 24u8, 241u8, 161u8, 150u8, 252u8, 133u8, 65u8, - 232u8, 21u8, 28u8, 25u8, 75u8, - ], - ) + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Register oneself for fast-unstake."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] + #[doc = "`staking::unbond`."] + #[doc = ""] + #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] + #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] + #[doc = "to be checked in further blocks."] + #[doc = ""] + #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] + #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] + #[doc = ""] + #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] + #[doc = "unstaked."] + #[doc = ""] + #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] + #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] + #[doc = "the chain's resources."] + register_fast_unstake, + #[codec(index = 1)] + #[doc = "Deregister oneself from the fast-unstake."] + #[doc = ""] + #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] + #[doc = ""] + #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] + #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] + #[doc = "`Staking::rebond`."] + deregister, + #[codec(index = 2)] + #[doc = "Control the operation of this pallet."] + #[doc = ""] + #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] + control { + unchecked_eras_to_check: ::core::primitive::u32, + }, } - #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] - #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] - #[doc = " this list."] - pub fn class_locks_for( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u16, - ::core::primitive::u128, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ConvictionVoting", - "ClassLocksFor", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, - 178u8, 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, - 42u8, 207u8, 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, - 56u8, 243u8, 117u8, 228u8, 145u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The provided Controller account was not found."] + #[doc = ""] + #[doc = "This means that the given account is not bonded."] + NotController, + #[codec(index = 1)] + #[doc = "The bonded account has already been queued."] + AlreadyQueued, + #[codec(index = 2)] + #[doc = "The bonded account has active unlocking chunks."] + NotFullyBonded, + #[codec(index = 3)] + #[doc = "The provided un-staker is not in the `Queue`."] + NotQueued, + #[codec(index = 4)] + #[doc = "The provided un-staker is already in Head, and cannot deregister."] + AlreadyHead, + #[codec(index = 5)] + #[doc = "The call is not allowed at this point because the pallet is not active."] + CallNotAllowed, } - #[doc = " The voting classes which have a non-zero lock requirement and the lock amounts which they"] - #[doc = " require. The actual amount locked on behalf of this pallet should always be the maximum of"] - #[doc = " this list."] - pub fn class_locks_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u16, - ::core::primitive::u128, - )>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "ConvictionVoting", - "ClassLocksFor", - Vec::new(), - [ - 65u8, 181u8, 225u8, 49u8, 35u8, 141u8, 185u8, 155u8, 124u8, - 178u8, 118u8, 51u8, 220u8, 232u8, 95u8, 24u8, 181u8, 135u8, - 42u8, 207u8, 103u8, 166u8, 244u8, 249u8, 106u8, 96u8, 177u8, - 56u8, 243u8, 117u8, 228u8, 145u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "The events of this pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A staker was unstaked."] + Unstaked { + stash: ::subxt::utils::AccountId32, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 1)] + #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] + Slashed { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Some internal error happened while migrating stash. They are removed as head as a"] + #[doc = "consequence."] + Errored { stash: ::subxt::utils::AccountId32 }, + #[codec(index = 3)] + #[doc = "An internal error happened. Operations will be paused now."] + InternalError, + #[codec(index = 4)] + #[doc = "A batch was partially checked for the given eras, but the process did not finish."] + BatchChecked { + eras: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 5)] + #[doc = "A batch was terminated."] + #[doc = ""] + #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] + #[doc = "of the batch. A new batch will be created upon next block."] + BatchFinished, } } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum number of concurrent votes an account may have."] - #[doc = ""] - #[doc = " Also used to compute weight, an overly large value can lead to extrinsics with large"] - #[doc = " weight estimation: see `delegate` for instance."] - pub fn max_votes( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ConvictionVoting", - "MaxVotes", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The minimum period of vote locking."] - #[doc = ""] - #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] - #[doc = " those successful voters are locked into the consequences that their votes entail."] - pub fn vote_locking_period( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "ConvictionVoting", - "VoteLockingPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UnstakeRequest { + pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + (::subxt::utils::AccountId32, ::core::primitive::u128), + >, + pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, } } } - } - pub mod whitelist { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; + pub mod pallet_grandpa { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WhitelistCall { - pub call_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveWhitelistedCall { - pub call_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchWhitelistedCall { - pub call_hash: ::subxt::utils::H256, - pub call_encoded_len: ::core::primitive::u32, - pub call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchWhitelistedCallWithPreimage { - pub call: - ::std::boxed::Box, - } - pub struct TransactionApi; - impl TransactionApi { - pub fn whitelist_call( - &self, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Whitelist", - "whitelist_call", - WhitelistCall { call_hash }, - [ - 21u8, 246u8, 244u8, 176u8, 163u8, 80u8, 45u8, 191u8, 3u8, - 180u8, 150u8, 66u8, 168u8, 3u8, 196u8, 129u8, 177u8, 104u8, - 48u8, 5u8, 201u8, 208u8, 226u8, 76u8, 148u8, 116u8, 206u8, - 119u8, 145u8, 78u8, 86u8, 41u8, - ], - ) - } - pub fn remove_whitelisted_call( - &self, - call_hash: ::subxt::utils::H256, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Whitelist", - "remove_whitelisted_call", - RemoveWhitelistedCall { call_hash }, - [ - 142u8, 227u8, 198u8, 110u8, 90u8, 127u8, 218u8, 117u8, 181u8, - 209u8, 210u8, 86u8, 133u8, 95u8, 244u8, 64u8, 50u8, 240u8, - 220u8, 50u8, 212u8, 106u8, 4u8, 189u8, 2u8, 72u8, 96u8, 52u8, - 187u8, 140u8, 144u8, 76u8, - ], - ) + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + }, } - pub fn dispatch_whitelisted_call( - &self, - call_hash: ::subxt::utils::H256, - call_encoded_len: ::core::primitive::u32, - call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Whitelist", - "dispatch_whitelisted_call", - DispatchWhitelistedCall { - call_hash, - call_encoded_len, - call_weight_witness, - }, - [ - 243u8, 130u8, 216u8, 251u8, 131u8, 220u8, 75u8, 210u8, 203u8, - 137u8, 174u8, 95u8, 134u8, 252u8, 76u8, 33u8, 230u8, 185u8, - 125u8, 15u8, 200u8, 85u8, 46u8, 43u8, 34u8, 205u8, 245u8, - 85u8, 46u8, 78u8, 245u8, 135u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, } - pub fn dispatch_whitelisted_call_with_preimage( - &self, - call: runtime_types::kitchensink_runtime::RuntimeCall, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Whitelist", - "dispatch_whitelisted_call_with_preimage", - DispatchWhitelistedCallWithPreimage { - call: ::std::boxed::Box::new(call), - }, - [ - 251u8, 158u8, 241u8, 179u8, 149u8, 78u8, 101u8, 191u8, 245u8, - 245u8, 197u8, 72u8, 11u8, 187u8, 65u8, 76u8, 255u8, 68u8, - 156u8, 63u8, 249u8, 4u8, 98u8, 163u8, 94u8, 67u8, 68u8, 17u8, - 97u8, 32u8, 101u8, 166u8, - ], - ) + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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, } } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_whitelist::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CallWhitelisted { - pub call_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for CallWhitelisted { - const PALLET: &'static str = "Whitelist"; - const EVENT: &'static str = "CallWhitelisted"; - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -36535,12 +35466,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WhitelistedCallRemoved { - pub call_hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for WhitelistedCallRemoved { - const PALLET: &'static str = "Whitelist"; - const EVENT: &'static str = "WhitelistedCallRemoved"; + 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, @@ -36551,13338 +35485,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct WhitelistedCallDispatched { - pub call_hash: ::subxt::utils::H256, - pub result: ::core::result::Result< - runtime_types::frame_support::dispatch::PostDispatchInfo, - runtime_types::sp_runtime::DispatchErrorWithPostInfo< - runtime_types::frame_support::dispatch::PostDispatchInfo, - >, - >, - } - impl ::subxt::events::StaticEvent for WhitelistedCallDispatched { - const PALLET: &'static str = "Whitelist"; - const EVENT: &'static str = "WhitelistedCallDispatched"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - pub fn whitelisted_call( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Whitelist", - "WhitelistedCall", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, - 70u8, 96u8, 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, - 221u8, 206u8, 41u8, 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, - 3u8, 112u8, 167u8, 196u8, 77u8, - ], - ) - } - pub fn whitelisted_call_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - (), - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Whitelist", - "WhitelistedCall", - Vec::new(), - [ - 251u8, 179u8, 58u8, 232u8, 231u8, 121u8, 89u8, 218u8, 90u8, - 70u8, 96u8, 132u8, 54u8, 41u8, 18u8, 129u8, 197u8, 122u8, - 221u8, 206u8, 41u8, 100u8, 200u8, 141u8, 71u8, 98u8, 3u8, - 3u8, 112u8, 167u8, 196u8, 77u8, - ], - ) - } + pub 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 alliance_motion { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMembers { - pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub prime: ::core::option::Option<::subxt::utils::AccountId32>, - pub old_count: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Execute { - pub proposal: - ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: - ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisapproveProposal { - pub proposal_hash: ::subxt::utils::H256, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Close { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[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( - "AllianceMotion", - "set_members", - SetMembers { - new_members, - prime, - old_count, - }, - [ - 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8, - 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8, - 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8, - 222u8, 90u8, 1u8, 2u8, 234u8, - ], - ) - } - #[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( - &self, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "AllianceMotion", - "execute", - Execute { - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 132u8, 244u8, 53u8, 230u8, 125u8, 53u8, 97u8, 53u8, 53u8, - 248u8, 234u8, 94u8, 208u8, 71u8, 65u8, 134u8, 33u8, 154u8, - 86u8, 193u8, 13u8, 170u8, 168u8, 246u8, 245u8, 189u8, 164u8, - 21u8, 24u8, 213u8, 28u8, 224u8, - ], - ) - } - #[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::kitchensink_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "AllianceMotion", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, - 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, - 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, - 94u8, 45u8, 11u8, 127u8, - ], - ) - } - #[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( - "AllianceMotion", - "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."] - #[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( - "AllianceMotion", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, - 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, - 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8, - 252u8, 244u8, 172u8, 60u8, 206u8, - ], - ) - } - #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] - #[doc = "state."] - #[doc = ""] - #[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( - "AllianceMotion", - "disapprove_proposal", - DisapproveProposal { proposal_hash }, - [ - 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8, - 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8, - 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8, - 164u8, 5u8, 194u8, 201u8, - ], - ) - } - #[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( - "AllianceMotion", - "close", - Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, - 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, - 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8, - 148u8, 206u8, 163u8, 154u8, 30u8, - ], - ) - } - } - } - #[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, - Debug, - )] - #[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 Proposed { - const PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Proposed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Voted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Approved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Disapproved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Executed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "MemberExecuted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 PALLET: &'static str = "AllianceMotion"; - const EVENT: &'static str = "Closed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The hashes of the active proposals."] - pub fn proposals( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::H256, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "Proposals", - vec![], - [ - 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8, - 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8, - 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8, - 220u8, 114u8, 217u8, 100u8, 27u8, - ], - ) - } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "ProposalOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Identity, - )], - [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, - ], - ) - } - #[doc = " Actual proposal for a given hash, if it's current."] - pub fn proposal_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::kitchensink_runtime::RuntimeCall, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "ProposalOf", - Vec::new(), - [ - 52u8, 127u8, 143u8, 111u8, 61u8, 61u8, 213u8, 104u8, 21u8, - 22u8, 101u8, 142u8, 136u8, 69u8, 70u8, 152u8, 60u8, 248u8, - 5u8, 202u8, 105u8, 177u8, 41u8, 75u8, 129u8, 81u8, 73u8, - 171u8, 51u8, 220u8, 127u8, 97u8, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::H256>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "Voting", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_collective::Votes< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "Voting", - Vec::new(), - [ - 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8, - 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8, - 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8, - 217u8, 240u8, 230u8, 107u8, 221u8, - ], - ) - } - #[doc = " Proposals so far."] - pub fn proposal_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "ProposalCount", - vec![], - [ - 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8, - 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8, - 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8, - 177u8, 127u8, 160u8, 34u8, 70u8, - ], - ) - } - #[doc = " The current members of the collective. This is stored sorted (just by value)."] - pub fn members( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::std::vec::Vec<::subxt::utils::AccountId32>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "Members", - vec![], - [ - 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8, - 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8, - 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8, - 71u8, 125u8, 56u8, 129u8, 222u8, - ], - ) - } - #[doc = " The prime member that helps determine the default vote behavior in case of absentations."] - pub fn prime( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "AllianceMotion", - "Prime", - vec![], - [ - 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8, - 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8, - 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8, - 158u8, 159u8, 217u8, 244u8, 158u8, - ], - ) - } - } - } - } - pub mod alliance { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Propose { - #[codec(compact)] - pub threshold: ::core::primitive::u32, - pub proposal: - ::std::boxed::Box, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub proposal: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - pub approve: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CloseOldWeight { - pub proposal_hash: ::subxt::utils::H256, - #[codec(compact)] - pub index: ::core::primitive::u32, - #[codec(compact)] - pub proposal_weight_bound: runtime_types::sp_weights::OldWeight, - #[codec(compact)] - pub length_bound: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InitMembers { - pub fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Disband { - pub witness: runtime_types::pallet_alliance::types::DisbandWitness, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetRule { - pub rule: runtime_types::pallet_alliance::types::Cid, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announce { - pub announcement: runtime_types::pallet_alliance::types::Cid, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveAnnouncement { - pub announcement: runtime_types::pallet_alliance::types::Cid, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct JoinAlliance; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NominateAlly { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ElevateAlly { - pub ally: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct GiveRetirementNotice; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Retire; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct KickMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddUnscrupulousItems { - pub items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveUnscrupulousItems { - pub items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AbdicateFellowStatus; - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Add a new proposal to be voted on."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - pub fn propose( - &self, - threshold: ::core::primitive::u32, - proposal: runtime_types::kitchensink_runtime::RuntimeCall, - length_bound: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "propose", - Propose { - threshold, - proposal: ::std::boxed::Box::new(proposal), - length_bound, - }, - [ - 190u8, 4u8, 26u8, 206u8, 110u8, 9u8, 27u8, 86u8, 207u8, 30u8, - 53u8, 10u8, 187u8, 230u8, 82u8, 83u8, 242u8, 195u8, 68u8, - 247u8, 57u8, 113u8, 230u8, 164u8, 163u8, 217u8, 8u8, 57u8, - 94u8, 45u8, 11u8, 127u8, - ], - ) - } - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - pub fn vote( - &self, - proposal: ::subxt::utils::H256, - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "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 = "Must be called by a Fellow."] - 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( - "Alliance", - "close_old_weight", - CloseOldWeight { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8, - 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8, - 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8, - 252u8, 244u8, 172u8, 60u8, 206u8, - ], - ) - } - #[doc = "Initialize the Alliance, onboard fellows and allies."] - #[doc = ""] - #[doc = "The Alliance must be empty, and the call must provide some founding members."] - #[doc = ""] - #[doc = "Must be called by the Root origin."] - pub fn init_members( - &self, - fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, - allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "init_members", - InitMembers { fellows, allies }, - [ - 182u8, 105u8, 49u8, 160u8, 26u8, 175u8, 215u8, 71u8, 58u8, - 176u8, 86u8, 29u8, 68u8, 186u8, 241u8, 47u8, 251u8, 136u8, - 123u8, 151u8, 246u8, 42u8, 232u8, 154u8, 210u8, 14u8, 165u8, - 104u8, 163u8, 140u8, 196u8, 164u8, - ], - ) - } - #[doc = "Disband the Alliance, remove all active members and unreserve deposits."] - #[doc = ""] - #[doc = "Witness data must be set."] - pub fn disband( - &self, - witness: runtime_types::pallet_alliance::types::DisbandWitness, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "disband", - Disband { witness }, - [ - 140u8, 243u8, 193u8, 235u8, 169u8, 181u8, 78u8, 54u8, 75u8, - 109u8, 70u8, 148u8, 49u8, 154u8, 225u8, 76u8, 65u8, 92u8, - 149u8, 53u8, 62u8, 106u8, 228u8, 172u8, 10u8, 189u8, 108u8, - 144u8, 195u8, 6u8, 250u8, 202u8, - ], - ) - } - #[doc = "Set a new IPFS CID to the alliance rule."] - pub fn set_rule( - &self, - rule: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "set_rule", - SetRule { rule }, - [ - 31u8, 78u8, 248u8, 0u8, 135u8, 28u8, 162u8, 57u8, 155u8, - 173u8, 159u8, 212u8, 213u8, 135u8, 191u8, 88u8, 161u8, 119u8, - 122u8, 52u8, 190u8, 214u8, 31u8, 10u8, 210u8, 231u8, 245u8, - 248u8, 49u8, 60u8, 236u8, 67u8, - ], - ) - } - #[doc = "Make an announcement of a new IPFS CID about alliance issues."] - pub fn announce( - &self, - announcement: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "announce", - Announce { announcement }, - [ - 197u8, 120u8, 117u8, 49u8, 53u8, 91u8, 207u8, 16u8, 31u8, - 250u8, 85u8, 0u8, 111u8, 24u8, 222u8, 255u8, 121u8, 191u8, - 98u8, 85u8, 45u8, 237u8, 106u8, 60u8, 142u8, 69u8, 125u8, - 1u8, 128u8, 190u8, 99u8, 14u8, - ], - ) - } - #[doc = "Remove an announcement."] - pub fn remove_announcement( - &self, - announcement: runtime_types::pallet_alliance::types::Cid, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "remove_announcement", - RemoveAnnouncement { announcement }, - [ - 7u8, 152u8, 0u8, 165u8, 149u8, 198u8, 155u8, 138u8, 187u8, - 125u8, 30u8, 240u8, 229u8, 216u8, 215u8, 40u8, 150u8, 232u8, - 76u8, 242u8, 98u8, 11u8, 145u8, 165u8, 253u8, 6u8, 208u8, - 136u8, 122u8, 122u8, 176u8, 107u8, - ], - ) - } - #[doc = "Submit oneself for candidacy. A fixed deposit is reserved."] - pub fn join_alliance( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "join_alliance", - JoinAlliance {}, - [ - 54u8, 110u8, 66u8, 7u8, 137u8, 10u8, 43u8, 147u8, 162u8, - 126u8, 85u8, 199u8, 167u8, 112u8, 27u8, 210u8, 42u8, 224u8, - 29u8, 118u8, 67u8, 77u8, 31u8, 133u8, 66u8, 24u8, 114u8, - 185u8, 109u8, 159u8, 183u8, 157u8, - ], - ) - } - #[doc = "A Fellow can nominate someone to join the alliance as an Ally. There is no deposit"] - #[doc = "required from the nominator or nominee."] - pub fn nominate_ally( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "nominate_ally", - NominateAlly { who }, - [ - 60u8, 213u8, 72u8, 150u8, 238u8, 14u8, 199u8, 171u8, 147u8, - 94u8, 169u8, 243u8, 40u8, 238u8, 132u8, 118u8, 66u8, 122u8, - 193u8, 195u8, 237u8, 59u8, 82u8, 248u8, 8u8, 151u8, 188u8, - 226u8, 167u8, 18u8, 228u8, 105u8, - ], - ) - } - #[doc = "Elevate an Ally to Fellow."] - pub fn elevate_ally( - &self, - ally: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "elevate_ally", - ElevateAlly { ally }, - [ - 235u8, 131u8, 98u8, 158u8, 30u8, 159u8, 195u8, 25u8, 41u8, - 162u8, 10u8, 148u8, 73u8, 210u8, 10u8, 190u8, 226u8, 109u8, - 193u8, 218u8, 12u8, 242u8, 172u8, 215u8, 56u8, 131u8, 31u8, - 210u8, 215u8, 198u8, 81u8, 74u8, - ], - ) - } - #[doc = "As a member, give a retirement notice and start a retirement period required to pass in"] - #[doc = "order to retire."] - pub fn give_retirement_notice( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "give_retirement_notice", - GiveRetirementNotice {}, - [ - 179u8, 19u8, 191u8, 72u8, 65u8, 196u8, 142u8, 253u8, 35u8, - 215u8, 175u8, 47u8, 14u8, 238u8, 153u8, 157u8, 20u8, 44u8, - 174u8, 91u8, 133u8, 42u8, 48u8, 44u8, 116u8, 53u8, 27u8, - 247u8, 198u8, 87u8, 50u8, 195u8, - ], - ) - } - #[doc = "As a member, retire from the Alliance and unreserve the deposit."] - #[doc = ""] - #[doc = "This can only be done once you have called `give_retirement_notice` and the"] - #[doc = "`RetirementPeriod` has passed."] - pub fn retire(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "retire", - Retire {}, - [ - 6u8, 231u8, 211u8, 120u8, 5u8, 242u8, 96u8, 98u8, 132u8, - 36u8, 217u8, 219u8, 22u8, 76u8, 196u8, 151u8, 140u8, 92u8, - 186u8, 138u8, 76u8, 219u8, 73u8, 242u8, 155u8, 169u8, 9u8, - 184u8, 76u8, 23u8, 71u8, 116u8, - ], - ) - } - #[doc = "Kick a member from the Alliance and slash its deposit."] - pub fn kick_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "kick_member", - KickMember { who }, - [ - 49u8, 234u8, 214u8, 238u8, 122u8, 243u8, 103u8, 51u8, 232u8, - 73u8, 207u8, 236u8, 126u8, 122u8, 60u8, 177u8, 130u8, 109u8, - 68u8, 44u8, 89u8, 46u8, 236u8, 226u8, 181u8, 200u8, 98u8, - 183u8, 245u8, 227u8, 27u8, 118u8, - ], - ) - } - #[doc = "Add accounts or websites to the list of unscrupulous items."] - pub fn add_unscrupulous_items( - &self, - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "add_unscrupulous_items", - AddUnscrupulousItems { items }, - [ - 222u8, 68u8, 94u8, 39u8, 39u8, 0u8, 161u8, 99u8, 42u8, 25u8, - 34u8, 150u8, 225u8, 133u8, 240u8, 91u8, 127u8, 68u8, 188u8, - 121u8, 126u8, 130u8, 1u8, 147u8, 73u8, 114u8, 34u8, 88u8, - 39u8, 97u8, 158u8, 197u8, - ], - ) - } - #[doc = "Deem some items no longer unscrupulous."] - pub fn remove_unscrupulous_items( - &self, - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "Alliance", - "remove_unscrupulous_items", - RemoveUnscrupulousItems { items }, - [ - 231u8, 184u8, 191u8, 126u8, 10u8, 183u8, 103u8, 127u8, 145u8, - 98u8, 57u8, 176u8, 124u8, 161u8, 129u8, 66u8, 100u8, 100u8, - 154u8, 155u8, 206u8, 42u8, 180u8, 62u8, 240u8, 33u8, 53u8, - 251u8, 46u8, 203u8, 42u8, 234u8, - ], - ) - } - #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - 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( - "Alliance", - "close", - Close { - proposal_hash, - index, - proposal_weight_bound, - length_bound, - }, - [ - 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8, - 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8, - 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8, - 148u8, 206u8, 163u8, 154u8, 30u8, - ], - ) - } - #[doc = "Abdicate one's position as a voting member and just be an Ally. May be used by Fellows"] - #[doc = "who do not want to leave the Alliance but do not have the capacity to participate"] - #[doc = "operationally for some time."] - pub fn abdicate_fellow_status( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "Alliance", - "abdicate_fellow_status", - AbdicateFellowStatus {}, - [ - 32u8, 251u8, 224u8, 133u8, 152u8, 60u8, 139u8, 40u8, 253u8, - 116u8, 170u8, 79u8, 149u8, 89u8, 27u8, 203u8, 160u8, 75u8, - 81u8, 144u8, 9u8, 98u8, 139u8, 215u8, 253u8, 193u8, 211u8, - 93u8, 208u8, 143u8, 41u8, 175u8, - ], - ) - } - } - } - #[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_alliance::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new rule has been set."] - pub struct NewRuleSet { - pub rule: runtime_types::pallet_alliance::types::Cid, - } - impl ::subxt::events::StaticEvent for NewRuleSet { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "NewRuleSet"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A new announcement has been proposed."] - pub struct Announced { - pub announcement: runtime_types::pallet_alliance::types::Cid, - } - impl ::subxt::events::StaticEvent for Announced { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "Announced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An on-chain announcement has been removed."] - pub struct AnnouncementRemoved { - pub announcement: runtime_types::pallet_alliance::types::Cid, - } - impl ::subxt::events::StaticEvent for AnnouncementRemoved { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "AnnouncementRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Some accounts have been initialized as members (fellows/allies)."] - pub struct MembersInitialized { - pub fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, - pub allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - impl ::subxt::events::StaticEvent for MembersInitialized { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "MembersInitialized"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An account has been added as an Ally and reserved its deposit."] - pub struct NewAllyJoined { - pub ally: ::subxt::utils::AccountId32, - pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, - pub reserved: ::core::option::Option<::core::primitive::u128>, - } - impl ::subxt::events::StaticEvent for NewAllyJoined { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "NewAllyJoined"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An ally has been elevated to Fellow."] - pub struct AllyElevated { - pub ally: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for AllyElevated { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "AllyElevated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member gave retirement notice and their retirement period started."] - pub struct MemberRetirementPeriodStarted { - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberRetirementPeriodStarted { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "MemberRetirementPeriodStarted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has retired with its deposit unreserved."] - pub struct MemberRetired { - pub member: ::subxt::utils::AccountId32, - pub unreserved: ::core::option::Option<::core::primitive::u128>, - } - impl ::subxt::events::StaticEvent for MemberRetired { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "MemberRetired"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has been kicked out with its deposit slashed."] - pub struct MemberKicked { - pub member: ::subxt::utils::AccountId32, - pub slashed: ::core::option::Option<::core::primitive::u128>, - } - impl ::subxt::events::StaticEvent for MemberKicked { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "MemberKicked"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Accounts or websites have been added into the list of unscrupulous items."] - pub struct UnscrupulousItemAdded { - pub items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - } - impl ::subxt::events::StaticEvent for UnscrupulousItemAdded { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "UnscrupulousItemAdded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Accounts or websites have been removed from the list of unscrupulous items."] - pub struct UnscrupulousItemRemoved { - pub items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - } - impl ::subxt::events::StaticEvent for UnscrupulousItemRemoved { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "UnscrupulousItemRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Alliance disbanded. Includes number deleted members and unreserved deposits."] - pub struct AllianceDisbanded { - pub fellow_members: ::core::primitive::u32, - pub ally_members: ::core::primitive::u32, - pub unreserved: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for AllianceDisbanded { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "AllianceDisbanded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A Fellow abdicated their voting rights. They are now an Ally."] - pub struct FellowAbdicated { - pub fellow: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for FellowAbdicated { - const PALLET: &'static str = "Alliance"; - const EVENT: &'static str = "FellowAbdicated"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The IPFS CID of the alliance rule."] - #[doc = " Fellows can propose a new rule with a super-majority."] - pub fn rule( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_alliance::types::Cid, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "Rule", - vec![], - [ - 132u8, 179u8, 91u8, 202u8, 26u8, 39u8, 178u8, 5u8, 221u8, - 59u8, 148u8, 116u8, 113u8, 55u8, 88u8, 104u8, 208u8, 165u8, - 100u8, 78u8, 123u8, 208u8, 191u8, 217u8, 36u8, 33u8, 103u8, - 11u8, 5u8, 161u8, 207u8, 170u8, - ], - ) - } - #[doc = " The current IPFS CIDs of any announcements."] - pub fn announcements( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::pallet_alliance::types::Cid, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "Announcements", - vec![], - [ - 217u8, 117u8, 75u8, 244u8, 196u8, 60u8, 185u8, 248u8, 13u8, - 121u8, 132u8, 36u8, 112u8, 233u8, 210u8, 170u8, 4u8, 247u8, - 109u8, 226u8, 211u8, 37u8, 117u8, 15u8, 214u8, 7u8, 100u8, - 0u8, 15u8, 0u8, 179u8, 96u8, - ], - ) - } - #[doc = " Maps members to their candidacy deposit."] - pub fn deposit_of( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "DepositOf", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 144u8, 38u8, 94u8, 133u8, 11u8, 36u8, 151u8, 247u8, 63u8, - 168u8, 80u8, 116u8, 39u8, 78u8, 240u8, 0u8, 11u8, 182u8, - 118u8, 208u8, 224u8, 184u8, 116u8, 51u8, 166u8, 133u8, 227u8, - 246u8, 92u8, 146u8, 175u8, 65u8, - ], - ) - } - #[doc = " Maps members to their candidacy deposit."] - pub fn deposit_of_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "DepositOf", - Vec::new(), - [ - 144u8, 38u8, 94u8, 133u8, 11u8, 36u8, 151u8, 247u8, 63u8, - 168u8, 80u8, 116u8, 39u8, 78u8, 240u8, 0u8, 11u8, 182u8, - 118u8, 208u8, 224u8, 184u8, 116u8, 51u8, 166u8, 133u8, 227u8, - 246u8, 92u8, 146u8, 175u8, 65u8, - ], - ) - } - #[doc = " Maps member type to members of each type."] - pub fn members( - &self, - _0: impl ::std::borrow::Borrow, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "Members", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 238u8, 61u8, 156u8, 136u8, 196u8, 188u8, 124u8, 182u8, 195u8, - 205u8, 210u8, 204u8, 73u8, 227u8, 32u8, 127u8, 124u8, 181u8, - 105u8, 59u8, 164u8, 180u8, 186u8, 222u8, 20u8, 129u8, 133u8, - 95u8, 87u8, 246u8, 155u8, 144u8, - ], - ) - } - #[doc = " Maps member type to members of each type."] - pub fn members_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "Members", - Vec::new(), - [ - 238u8, 61u8, 156u8, 136u8, 196u8, 188u8, 124u8, 182u8, 195u8, - 205u8, 210u8, 204u8, 73u8, 227u8, 32u8, 127u8, 124u8, 181u8, - 105u8, 59u8, 164u8, 180u8, 186u8, 222u8, 20u8, 129u8, 133u8, - 95u8, 87u8, 246u8, 155u8, 144u8, - ], - ) - } - #[doc = " A set of members who gave a retirement notice. They can retire after the end of retirement"] - #[doc = " period stored as a future block number."] - pub fn retiring_members( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "RetiringMembers", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 195u8, 185u8, 238u8, 11u8, 200u8, 34u8, 221u8, 178u8, 171u8, - 139u8, 211u8, 27u8, 109u8, 173u8, 203u8, 218u8, 147u8, 40u8, - 29u8, 226u8, 65u8, 77u8, 199u8, 81u8, 153u8, 145u8, 97u8, - 229u8, 54u8, 242u8, 12u8, 187u8, - ], - ) - } - #[doc = " A set of members who gave a retirement notice. They can retire after the end of retirement"] - #[doc = " period stored as a future block number."] - pub fn retiring_members_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "RetiringMembers", - Vec::new(), - [ - 195u8, 185u8, 238u8, 11u8, 200u8, 34u8, 221u8, 178u8, 171u8, - 139u8, 211u8, 27u8, 109u8, 173u8, 203u8, 218u8, 147u8, 40u8, - 29u8, 226u8, 65u8, 77u8, 199u8, 81u8, 153u8, 145u8, 97u8, - 229u8, 54u8, 242u8, 12u8, 187u8, - ], - ) - } - #[doc = " The current list of accounts deemed unscrupulous. These accounts non grata cannot submit"] - #[doc = " candidacy."] - pub fn unscrupulous_accounts( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::subxt::utils::AccountId32, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "UnscrupulousAccounts", - vec![], - [ - 5u8, 149u8, 47u8, 164u8, 130u8, 46u8, 136u8, 88u8, 153u8, - 77u8, 176u8, 127u8, 165u8, 163u8, 40u8, 117u8, 137u8, 67u8, - 72u8, 4u8, 151u8, 209u8, 172u8, 20u8, 64u8, 162u8, 48u8, - 199u8, 224u8, 85u8, 157u8, 44u8, - ], - ) - } - #[doc = " The current list of websites deemed unscrupulous."] - pub fn unscrupulous_websites( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "Alliance", - "UnscrupulousWebsites", - vec![], - [ - 231u8, 15u8, 27u8, 215u8, 117u8, 150u8, 199u8, 19u8, 209u8, - 43u8, 144u8, 212u8, 160u8, 32u8, 195u8, 26u8, 128u8, 3u8, - 151u8, 53u8, 230u8, 102u8, 44u8, 42u8, 205u8, 68u8, 175u8, - 206u8, 239u8, 236u8, 68u8, 160u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The maximum number of the unscrupulous items supported by the pallet."] - pub fn max_unscrupulous_items( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Alliance", - "MaxUnscrupulousItems", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 length of a website URL."] - pub fn max_website_url_length( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Alliance", - "MaxWebsiteUrlLength", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 deposit required for submitting candidacy."] - pub fn ally_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "Alliance", - "AllyDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " The maximum number of announcements."] - pub fn max_announcements_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Alliance", - "MaxAnnouncementsCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 members per member role."] - pub fn max_members_count( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "Alliance", - "MaxMembersCount", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - } - } - } - pub mod nomination_pools { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Join { - #[codec(compact)] - pub amount: ::core::primitive::u128, - pub pool_id: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BondExtra { - pub extra: runtime_types::pallet_nomination_pools::BondExtra< - ::core::primitive::u128, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ClaimPayout; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PoolWithdrawUnbonded { - pub pool_id: ::core::primitive::u32, - pub num_slashing_spans: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Nominate { - pub pool_id: ::core::primitive::u32, - pub validators: ::std::vec::Vec<::subxt::utils::AccountId32>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetState { - pub pool_id: ::core::primitive::u32, - pub state: runtime_types::pallet_nomination_pools::PoolState, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetMetadata { - pub pool_id: ::core::primitive::u32, - pub metadata: ::std::vec::Vec<::core::primitive::u8>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SetConfigs { - pub min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u128, - >, - pub max_pools: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members: runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - pub max_members_per_pool: - runtime_types::pallet_nomination_pools::ConfigOp< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UpdateRoles { - pub pool_id: ::core::primitive::u32, - pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< - ::subxt::utils::AccountId32, - >, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Chill { - pub pool_id: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] - #[doc = "pools account and immediately increases the pools bond."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "* An account can only be a member of a single pool."] - #[doc = "* An account cannot join the same pool multiple times."] - #[doc = "* This call will *not* dust the member account, so the member must have at least"] - #[doc = " `existential deposit + amount` in their account."] - #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] - pub fn join( - &self, - amount: ::core::primitive::u128, - pool_id: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "join", - Join { amount, pool_id }, - [ - 205u8, 66u8, 42u8, 72u8, 146u8, 148u8, 119u8, 162u8, 101u8, - 183u8, 46u8, 176u8, 221u8, 204u8, 197u8, 20u8, 75u8, 226u8, - 29u8, 118u8, 208u8, 60u8, 192u8, 247u8, 222u8, 100u8, 69u8, - 80u8, 172u8, 13u8, 69u8, 250u8, - ], - ) - } - #[doc = "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", - 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, - ], - ) - } - #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] - #[doc = "has accumulated since their last claimed payout (OR since joining if this is there first"] - #[doc = "time claiming rewards). The payout will be transferred to the member's account."] - #[doc = ""] - #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] - #[doc = "members in the pools stake. Rewards do not \"expire\"."] - pub fn claim_payout(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "NominationPools", - "claim_payout", - ClaimPayout {}, - [ - 128u8, 58u8, 138u8, 55u8, 64u8, 16u8, 129u8, 25u8, 211u8, - 229u8, 193u8, 115u8, 47u8, 45u8, 155u8, 221u8, 218u8, 1u8, - 222u8, 5u8, 236u8, 32u8, 88u8, 0u8, 198u8, 72u8, 196u8, - 181u8, 104u8, 16u8, 212u8, 29u8, - ], - ) - } - #[doc = "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", - Unbond { - member_account, - unbonding_points, - }, - [ - 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, - ], - ) - } - #[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", - PoolWithdrawUnbonded { - pool_id, - num_slashing_spans, - }, - [ - 152u8, 245u8, 131u8, 247u8, 106u8, 214u8, 154u8, 8u8, 7u8, - 210u8, 149u8, 218u8, 118u8, 46u8, 242u8, 182u8, 191u8, 119u8, - 28u8, 199u8, 36u8, 49u8, 219u8, 123u8, 58u8, 203u8, 211u8, - 226u8, 217u8, 36u8, 56u8, 0u8, - ], - ) - } - #[doc = "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", - WithdrawUnbonded { - member_account, - num_slashing_spans, - }, - [ - 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, - ], - ) - } - #[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", - Create { - amount, - root, - nominator, - state_toggler, - }, - [ - 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, - ], - ) - } - #[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", - CreateWithPoolId { - amount, - root, - nominator, - state_toggler, - pool_id, - }, - [ - 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, - ], - ) - } - #[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", - Nominate { - pool_id, - validators, - }, - [ - 10u8, 235u8, 64u8, 157u8, 36u8, 249u8, 186u8, 27u8, 79u8, - 172u8, 25u8, 3u8, 203u8, 19u8, 192u8, 182u8, 36u8, 103u8, - 13u8, 20u8, 89u8, 140u8, 159u8, 4u8, 132u8, 242u8, 192u8, - 146u8, 55u8, 251u8, 216u8, 255u8, - ], - ) - } - #[doc = "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", - SetState { pool_id, state }, - [ - 104u8, 40u8, 213u8, 88u8, 159u8, 115u8, 35u8, 249u8, 78u8, - 180u8, 99u8, 1u8, 225u8, 218u8, 192u8, 151u8, 25u8, 194u8, - 192u8, 187u8, 39u8, 170u8, 212u8, 125u8, 75u8, 250u8, 248u8, - 175u8, 159u8, 161u8, 151u8, 162u8, - ], - ) - } - #[doc = "Set a new metadata for the pool."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the 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", - SetMetadata { pool_id, metadata }, - [ - 156u8, 81u8, 170u8, 161u8, 34u8, 100u8, 183u8, 174u8, 5u8, - 81u8, 31u8, 76u8, 12u8, 42u8, 77u8, 1u8, 6u8, 26u8, 168u8, - 7u8, 8u8, 115u8, 158u8, 151u8, 30u8, 211u8, 52u8, 177u8, - 234u8, 87u8, 125u8, 127u8, - ], - ) - } - #[doc = "Update configurations for the nomination pools. The origin for this call must be"] - #[doc = "Root."] - #[doc = ""] - #[doc = "# Arguments"] - #[doc = ""] - #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] - #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] - #[doc = "* `max_pools` - Set [`MaxPools`]."] - #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] - #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] - 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", - SetConfigs { - min_join_bond, - min_create_bond, - max_pools, - max_members, - max_members_per_pool, - }, - [ - 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, - ], - ) - } - #[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", - UpdateRoles { - pool_id, - new_root, - new_nominator, - new_state_toggler, - }, - [ - 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, - ], - ) - } - #[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", - 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pool has been created."] - pub struct Created { - pub depositor: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Created { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Created"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has became bonded in a pool."] - pub struct Bonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub bonded: ::core::primitive::u128, - pub joined: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Bonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Bonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A 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 PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PaidOut"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has unbonded from their pool."] - #[doc = ""] - #[doc = "- `balance` is the corresponding balance of the number of points that has been"] - #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] - #[doc = " pool."] - #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] - #[doc = "dissolved into the corresponding unbonding pool."] - #[doc = "- `era` is the era in which the balance will be unbonded."] - #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] - #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] - #[doc = "requested to be unbonded."] - pub struct Unbonded { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - pub era: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Unbonded { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Unbonded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has withdrawn from their pool."] - #[doc = ""] - #[doc = "The given number of `points` have been dissolved in return of `balance`."] - #[doc = ""] - #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] - #[doc = "will be 1."] - pub struct Withdrawn { - pub member: ::subxt::utils::AccountId32, - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - pub points: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Withdrawn { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Withdrawn"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A pool has been destroyed."] - pub struct Destroyed { - pub pool_id: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Destroyed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "Destroyed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The state of a pool has changed"] - pub struct StateChanged { - pub pool_id: ::core::primitive::u32, - pub new_state: runtime_types::pallet_nomination_pools::PoolState, - } - impl ::subxt::events::StaticEvent for StateChanged { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "StateChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member has been removed from a pool."] - #[doc = ""] - #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] - pub struct MemberRemoved { - pub pool_id: ::core::primitive::u32, - pub member: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "MemberRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] - #[doc = "can never change."] - pub struct RolesUpdated { - pub root: ::core::option::Option<::subxt::utils::AccountId32>, - pub state_toggler: ::core::option::Option<::subxt::utils::AccountId32>, - pub nominator: ::core::option::Option<::subxt::utils::AccountId32>, - } - impl ::subxt::events::StaticEvent for RolesUpdated { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "RolesUpdated"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] - pub struct PoolSlashed { - pub pool_id: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for PoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "PoolSlashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] - pub struct UnbondingPoolSlashed { - pub pool_id: ::core::primitive::u32, - pub era: ::core::primitive::u32, - pub balance: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for UnbondingPoolSlashed { - const PALLET: &'static str = "NominationPools"; - const EVENT: &'static str = "UnbondingPoolSlashed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " Minimum amount to bond to join a pool."] - pub fn min_join_bond( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinJoinBond", - vec![], - [ - 125u8, 239u8, 45u8, 225u8, 74u8, 129u8, 247u8, 184u8, 205u8, - 58u8, 45u8, 186u8, 126u8, 170u8, 112u8, 120u8, 23u8, 190u8, - 247u8, 97u8, 131u8, 126u8, 215u8, 44u8, 147u8, 122u8, 132u8, - 212u8, 217u8, 84u8, 240u8, 91u8, - ], - ) - } - #[doc = " Minimum bond required to create a pool."] - #[doc = ""] - #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] - #[doc = " indication of \"skin in the game\"."] - #[doc = ""] - #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] - #[doc = " while all other accounts leave."] - pub fn min_create_bond( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MinCreateBond", - vec![], - [ - 31u8, 208u8, 240u8, 158u8, 23u8, 218u8, 212u8, 138u8, 92u8, - 210u8, 207u8, 170u8, 32u8, 60u8, 5u8, 21u8, 84u8, 162u8, 1u8, - 111u8, 181u8, 243u8, 24u8, 148u8, 193u8, 253u8, 248u8, 190u8, - 16u8, 222u8, 219u8, 67u8, - ], - ) - } - #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] - #[doc = " pools can exist."] - pub fn max_pools( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPools", - vec![], - [ - 216u8, 111u8, 68u8, 103u8, 33u8, 50u8, 109u8, 3u8, 176u8, - 195u8, 23u8, 73u8, 112u8, 138u8, 9u8, 194u8, 233u8, 73u8, - 68u8, 215u8, 162u8, 255u8, 217u8, 173u8, 141u8, 27u8, 72u8, - 199u8, 7u8, 240u8, 25u8, 34u8, - ], - ) - } - #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] - #[doc = " members are not bound on a system wide basis."] - pub fn max_pool_members( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembers", - vec![], - [ - 82u8, 217u8, 26u8, 234u8, 223u8, 241u8, 66u8, 182u8, 43u8, - 233u8, 59u8, 242u8, 202u8, 254u8, 69u8, 50u8, 254u8, 196u8, - 166u8, 89u8, 120u8, 87u8, 76u8, 148u8, 31u8, 197u8, 49u8, - 88u8, 206u8, 41u8, 242u8, 62u8, - ], - ) - } - #[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::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "MaxPoolMembersPerPool", - vec![], - [ - 93u8, 241u8, 16u8, 169u8, 138u8, 199u8, 128u8, 149u8, 65u8, - 30u8, 55u8, 11u8, 41u8, 252u8, 83u8, 250u8, 9u8, 33u8, 152u8, - 239u8, 195u8, 147u8, 16u8, 248u8, 180u8, 153u8, 88u8, 231u8, - 248u8, 169u8, 186u8, 48u8, - ], - ) - } - #[doc = " Active members."] - #[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::StaticStorageAddress< - 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, - )], - [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, - 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, - 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, - 31u8, 60u8, 120u8, 100u8, 249u8, - ], - ) - } - #[doc = " Active members."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn pool_members_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_nomination_pools::PoolMember, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "PoolMembers", - Vec::new(), - [ - 252u8, 236u8, 201u8, 127u8, 219u8, 1u8, 19u8, 144u8, 5u8, - 108u8, 70u8, 30u8, 177u8, 232u8, 253u8, 237u8, 211u8, 91u8, - 63u8, 62u8, 155u8, 151u8, 153u8, 165u8, 206u8, 53u8, 111u8, - 31u8, 60u8, 120u8, 100u8, 249u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_pool_members( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForPoolMembers", - vec![], - [ - 114u8, 126u8, 27u8, 138u8, 119u8, 44u8, 45u8, 129u8, 84u8, - 107u8, 171u8, 206u8, 117u8, 141u8, 20u8, 75u8, 229u8, 237u8, - 31u8, 229u8, 124u8, 190u8, 27u8, 124u8, 63u8, 59u8, 167u8, - 42u8, 62u8, 212u8, 160u8, 2u8, - ], - ) - } - #[doc = " Storage for bonded pools."] - pub fn bonded_pools( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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, - )], - [ - 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 = " Storage for bonded pools."] - pub fn bonded_pools_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForBondedPools", - vec![], - [ - 134u8, 94u8, 199u8, 73u8, 174u8, 253u8, 66u8, 242u8, 233u8, - 244u8, 140u8, 170u8, 242u8, 40u8, 41u8, 185u8, 183u8, 151u8, - 58u8, 111u8, 221u8, 225u8, 81u8, 71u8, 169u8, 219u8, 223u8, - 135u8, 8u8, 171u8, 180u8, 236u8, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_nomination_pools::RewardPool, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "RewardPools", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_nomination_pools::RewardPool, - (), - (), - ::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< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "CounterForRewardPools", - vec![], - [ - 209u8, 139u8, 212u8, 116u8, 210u8, 178u8, 213u8, 38u8, 75u8, - 23u8, 188u8, 57u8, 253u8, 213u8, 95u8, 118u8, 182u8, 250u8, - 45u8, 205u8, 17u8, 175u8, 17u8, 201u8, 234u8, 14u8, 98u8, - 49u8, 143u8, 135u8, 201u8, 81u8, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_nomination_pools::SubPools, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", - vec![::subxt::storage::address::StorageMapKey::new( - _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, - ], - ) - } - #[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::StaticStorageAddress< - runtime_types::pallet_nomination_pools::SubPools, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "NominationPools", - "SubPoolsStorage", - 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, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_sub_pools_storage( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::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, - ], - ) - } - #[doc = " Metadata for the pool."] - pub fn metadata( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - 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< - 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< - ::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< - ::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< - ::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< - ::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< - ::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< - runtime_types::frame_support::PalletId, - > { - ::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, - ], - ) - } - #[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<::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 ranked_polls { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Submit { - pub proposal_origin: - ::std::boxed::Box, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - pub enactment_moment: - runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PlaceDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundDecisionDeposit { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cancel { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Kill { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct NudgeReferendum { - pub index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OneFewerDeciding { - pub track: ::core::primitive::u16, - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RefundSubmissionDeposit { - pub index: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - pub fn submit( - &self, - proposal_origin: runtime_types::kitchensink_runtime::OriginCaller, - proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - enactment_moment : runtime_types :: frame_support :: traits :: schedule :: DispatchTime < :: core :: primitive :: u32 >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "submit", - Submit { - proposal_origin: ::std::boxed::Box::new(proposal_origin), - proposal, - enactment_moment, - }, - [ - 91u8, 158u8, 209u8, 182u8, 19u8, 184u8, 252u8, 30u8, 200u8, - 62u8, 92u8, 254u8, 200u8, 245u8, 134u8, 143u8, 135u8, 67u8, - 95u8, 107u8, 115u8, 109u8, 12u8, 48u8, 111u8, 239u8, 84u8, - 255u8, 23u8, 26u8, 140u8, 187u8, - ], - ) - } - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - pub fn place_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "place_decision_deposit", - PlaceDecisionDeposit { index }, - [ - 118u8, 227u8, 8u8, 55u8, 41u8, 171u8, 244u8, 40u8, 164u8, - 232u8, 119u8, 129u8, 139u8, 123u8, 77u8, 70u8, 219u8, 236u8, - 145u8, 159u8, 84u8, 111u8, 36u8, 4u8, 206u8, 5u8, 139u8, - 231u8, 11u8, 231u8, 6u8, 30u8, - ], - ) - } - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - pub fn refund_decision_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "refund_decision_deposit", - RefundDecisionDeposit { index }, - [ - 120u8, 116u8, 89u8, 51u8, 255u8, 76u8, 150u8, 74u8, 54u8, - 93u8, 19u8, 64u8, 13u8, 177u8, 144u8, 93u8, 132u8, 150u8, - 244u8, 48u8, 202u8, 223u8, 201u8, 130u8, 112u8, 167u8, 29u8, - 207u8, 112u8, 181u8, 43u8, 93u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - pub fn cancel( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "cancel", - Cancel { index }, - [ - 247u8, 55u8, 146u8, 211u8, 168u8, 140u8, 248u8, 217u8, 218u8, - 235u8, 25u8, 39u8, 47u8, 132u8, 134u8, 18u8, 239u8, 70u8, - 223u8, 50u8, 245u8, 101u8, 97u8, 39u8, 226u8, 4u8, 196u8, - 16u8, 66u8, 177u8, 178u8, 252u8, - ], - ) - } - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - pub fn kill( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "kill", - Kill { index }, - [ - 98u8, 109u8, 143u8, 42u8, 24u8, 80u8, 39u8, 243u8, 249u8, - 141u8, 104u8, 195u8, 29u8, 93u8, 149u8, 37u8, 27u8, 130u8, - 84u8, 178u8, 246u8, 26u8, 113u8, 224u8, 157u8, 94u8, 16u8, - 14u8, 158u8, 80u8, 148u8, 198u8, - ], - ) - } - #[doc = "Advance a referendum onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - pub fn nudge_referendum( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "nudge_referendum", - NudgeReferendum { index }, - [ - 60u8, 221u8, 153u8, 136u8, 107u8, 209u8, 59u8, 178u8, 208u8, - 170u8, 10u8, 225u8, 213u8, 170u8, 228u8, 64u8, 204u8, 166u8, - 7u8, 230u8, 243u8, 15u8, 206u8, 114u8, 8u8, 128u8, 46u8, - 150u8, 114u8, 241u8, 112u8, 97u8, - ], - ) - } - #[doc = "Advance a track onto its next logical state. Only used internally."] - #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] - #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - pub fn one_fewer_deciding( - &self, - track: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "one_fewer_deciding", - OneFewerDeciding { track }, - [ - 239u8, 43u8, 70u8, 73u8, 77u8, 28u8, 75u8, 62u8, 29u8, 67u8, - 110u8, 120u8, 234u8, 236u8, 126u8, 99u8, 46u8, 183u8, 169u8, - 16u8, 143u8, 233u8, 137u8, 247u8, 138u8, 96u8, 32u8, 223u8, - 149u8, 52u8, 214u8, 195u8, - ], - ) - } - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `SubmissionDepositRefunded`."] - pub fn refund_submission_deposit( - &self, - index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload - { - ::subxt::tx::Payload::new_static( - "RankedPolls", - "refund_submission_deposit", - RefundSubmissionDeposit { index }, - [ - 101u8, 147u8, 237u8, 27u8, 220u8, 116u8, 73u8, 131u8, 191u8, - 92u8, 134u8, 31u8, 175u8, 172u8, 129u8, 225u8, 91u8, 33u8, - 23u8, 132u8, 89u8, 19u8, 81u8, 238u8, 133u8, 243u8, 56u8, - 70u8, 143u8, 43u8, 176u8, 83u8, - ], - ) - } - } - } - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub type Event = runtime_types::pallet_referenda::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been submitted."] - pub struct Submitted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - } - impl ::subxt::events::StaticEvent for Submitted { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Submitted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The decision deposit has been placed."] - pub struct DecisionDepositPlaced { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DecisionDepositPlaced { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "DecisionDepositPlaced"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The decision deposit has been refunded."] - pub struct DecisionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DecisionDepositRefunded { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "DecisionDepositRefunded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A deposit has been slashaed."] - pub struct DepositSlashed { - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for DepositSlashed { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "DepositSlashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has moved into the deciding phase."] - pub struct DecisionStarted { - pub index: ::core::primitive::u32, - pub track: ::core::primitive::u16, - pub proposal: runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for DecisionStarted { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "DecisionStarted"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ConfirmStarted { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ConfirmStarted { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "ConfirmStarted"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ConfirmAborted { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for ConfirmAborted { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "ConfirmAborted"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has ended its confirmation phase and is ready for approval."] - pub struct Confirmed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for Confirmed { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Confirmed"; - } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been approved and its proposal has been scheduled."] - pub struct Approved { - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for Approved { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Approved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A proposal has been rejected by referendum."] - pub struct Rejected { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for Rejected { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Rejected"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been timed out without being decided."] - pub struct TimedOut { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for TimedOut { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "TimedOut"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been cancelled."] - pub struct Cancelled { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for Cancelled { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Cancelled"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A referendum has been killed."] - pub struct Killed { - pub index: ::core::primitive::u32, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for Killed { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "Killed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The submission deposit has been refunded."] - pub struct SubmissionDepositRefunded { - pub index: ::core::primitive::u32, - pub who: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for SubmissionDepositRefunded { - const PALLET: &'static str = "RankedPolls"; - const EVENT: &'static str = "SubmissionDepositRefunded"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The next free referendum index, aka the number of referenda started so far."] - pub fn referendum_count( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "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, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::kitchensink_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_ranked_collective::Tally, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "ReferendumInfoFor", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 128u8, 64u8, 140u8, 106u8, 75u8, 20u8, 189u8, 69u8, 252u8, - 236u8, 182u8, 172u8, 253u8, 97u8, 170u8, 219u8, 220u8, 136u8, - 0u8, 231u8, 212u8, 97u8, 82u8, 41u8, 156u8, 142u8, 33u8, - 208u8, 70u8, 185u8, 182u8, 244u8, - ], - ) - } - #[doc = " Information concerning any given referendum."] - pub fn referendum_info_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_referenda::types::ReferendumInfo< - ::core::primitive::u16, - runtime_types::kitchensink_runtime::OriginCaller, - ::core::primitive::u32, - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - ::core::primitive::u128, - runtime_types::pallet_ranked_collective::Tally, - ::subxt::utils::AccountId32, - (::core::primitive::u32, ::core::primitive::u32), - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "ReferendumInfoFor", - Vec::new(), - [ - 128u8, 64u8, 140u8, 106u8, 75u8, 20u8, 189u8, 69u8, 252u8, - 236u8, 182u8, 172u8, 253u8, 97u8, 170u8, 219u8, 220u8, 136u8, - 0u8, 231u8, 212u8, 97u8, 82u8, 41u8, 156u8, 142u8, 33u8, - 208u8, 70u8, 185u8, 182u8, 244u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "TrackQueue", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 250u8, 6u8, 4u8, 145u8, 233u8, 136u8, 58u8, 26u8, 252u8, - 117u8, 90u8, 85u8, 189u8, 21u8, 196u8, 201u8, 108u8, 23u8, - 161u8, 157u8, 149u8, 70u8, 77u8, 137u8, 159u8, 246u8, 244u8, - 45u8, 134u8, 36u8, 231u8, 254u8, - ], - ) - } - #[doc = " The sorted list of referenda ready to be decided but not yet being decided, ordered by"] - #[doc = " conviction-weighted approvals."] - #[doc = ""] - #[doc = " This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`."] - pub fn track_queue_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - ::core::primitive::u32, - )>, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "TrackQueue", - Vec::new(), - [ - 250u8, 6u8, 4u8, 145u8, 233u8, 136u8, 58u8, 26u8, 252u8, - 117u8, 90u8, 85u8, 189u8, 21u8, 196u8, 201u8, 108u8, 23u8, - 161u8, 157u8, 149u8, 70u8, 77u8, 137u8, 159u8, 246u8, 244u8, - 45u8, 134u8, 36u8, 231u8, 254u8, - ], - ) - } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "DecidingCount", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, - 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, - 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, - 234u8, 177u8, 223u8, 63u8, 150u8, - ], - ) - } - #[doc = " The number of referenda being decided currently."] - pub fn deciding_count_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedPolls", - "DecidingCount", - Vec::new(), - [ - 101u8, 153u8, 200u8, 225u8, 229u8, 227u8, 232u8, 26u8, 98u8, - 60u8, 60u8, 94u8, 204u8, 195u8, 193u8, 69u8, 50u8, 72u8, - 31u8, 250u8, 224u8, 179u8, 139u8, 207u8, 19u8, 156u8, 67u8, - 234u8, 177u8, 223u8, 63u8, 150u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] - pub fn submission_deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "RankedPolls", - "SubmissionDeposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - #[doc = " Maximum size of the referendum queue for a single track."] - pub fn max_queued( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "RankedPolls", - "MaxQueued", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " The number of blocks after submission that a referendum must begin being decided by."] - #[doc = " Once this passes, then anyone may cancel the referendum."] - pub fn undeciding_timeout( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "RankedPolls", - "UndecidingTimeout", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " Quantization level for the referendum wakeup scheduler. A higher number will result in"] - #[doc = " fewer storage reads/writes needed for smaller voters, but also result in delays to the"] - #[doc = " automatic referendum status changes. Explicit servicing instructions are unaffected."] - pub fn alarm_interval( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "RankedPolls", - "AlarmInterval", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, - 157u8, 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, - 98u8, 68u8, 9u8, 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, - 90u8, 203u8, 100u8, 41u8, 145u8, - ], - ) - } - #[doc = " Information concerning the different referendum tracks."] - pub fn tracks( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::std::vec::Vec<( - ::core::primitive::u16, - runtime_types::pallet_referenda::types::TrackInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - )>, - > { - ::subxt::constants::StaticConstantAddress::new( - "RankedPolls", - "Tracks", - [ - 71u8, 253u8, 246u8, 54u8, 168u8, 190u8, 182u8, 15u8, 207u8, - 26u8, 50u8, 138u8, 212u8, 124u8, 13u8, 203u8, 27u8, 35u8, - 224u8, 1u8, 176u8, 192u8, 197u8, 220u8, 147u8, 94u8, 196u8, - 150u8, 125u8, 23u8, 48u8, 255u8, - ], - ) - } - } - } - } - pub mod ranked_collective { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AddMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PromoteMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DemoteMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RemoveMember { - pub who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - pub min_rank: ::core::primitive::u16, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote { - pub poll: ::core::primitive::u32, - pub aye: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CleanupPoll { - pub poll_index: ::core::primitive::u32, - pub max: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Introduce a new member."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of non-member which will become a member."] - #[doc = "- `rank`: The rank to give the new member."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn add_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "add_member", - AddMember { who }, - [ - 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, - ], - ) - } - #[doc = "Increment the rank of an existing member by one."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - pub fn promote_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "promote_member", - PromoteMember { who }, - [ - 253u8, 173u8, 241u8, 51u8, 86u8, 53u8, 201u8, 217u8, 19u8, - 193u8, 223u8, 249u8, 125u8, 125u8, 97u8, 12u8, 36u8, 68u8, - 93u8, 152u8, 83u8, 14u8, 106u8, 38u8, 163u8, 216u8, 63u8, - 79u8, 254u8, 6u8, 79u8, 80u8, - ], - ) - } - #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] - #[doc = "then they are removed entirely."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] - pub fn demote_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "demote_member", - DemoteMember { who }, - [ - 199u8, 199u8, 22u8, 115u8, 223u8, 23u8, 187u8, 33u8, 89u8, - 244u8, 148u8, 87u8, 75u8, 187u8, 108u8, 176u8, 69u8, 250u8, - 72u8, 90u8, 161u8, 218u8, 14u8, 156u8, 82u8, 159u8, 200u8, - 141u8, 217u8, 221u8, 65u8, 174u8, - ], - ) - } - #[doc = "Remove the member entirely."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = "- `min_rank`: The rank of the member or greater."] - #[doc = ""] - #[doc = "Weight: `O(min_rank)`."] - pub fn remove_member( - &self, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - min_rank: ::core::primitive::u16, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "remove_member", - RemoveMember { who, min_rank }, - [ - 244u8, 61u8, 35u8, 202u8, 97u8, 223u8, 51u8, 2u8, 76u8, - 170u8, 141u8, 197u8, 90u8, 159u8, 112u8, 185u8, 180u8, 45u8, - 51u8, 206u8, 121u8, 227u8, 206u8, 134u8, 72u8, 243u8, 4u8, - 83u8, 167u8, 63u8, 65u8, 44u8, - ], - ) - } - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by a member account."] - #[doc = "- `poll`: Index of a poll which is ongoing."] - #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] - #[doc = ""] - #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] - #[doc = ""] - #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] - pub fn vote( - &self, - poll: ::core::primitive::u32, - aye: ::core::primitive::bool, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "vote", - Vote { poll, aye }, - [ - 76u8, 243u8, 228u8, 228u8, 168u8, 70u8, 128u8, 140u8, 206u8, - 48u8, 220u8, 178u8, 134u8, 107u8, 76u8, 106u8, 137u8, 0u8, - 200u8, 156u8, 21u8, 160u8, 123u8, 213u8, 251u8, 105u8, 94u8, - 249u8, 63u8, 164u8, 196u8, 243u8, - ], - ) - } - #[doc = "Remove votes from the given poll. It must have ended."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by any account."] - #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] - #[doc = " exist."] - #[doc = "- `max`: Maximum number of vote items from remove in this call."] - #[doc = ""] - #[doc = "Transaction fees are waived if the operation is successful."] - #[doc = ""] - #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] - pub fn cleanup_poll( - &self, - poll_index: ::core::primitive::u32, - max: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "RankedCollective", - "cleanup_poll", - CleanupPoll { poll_index, max }, - [ - 163u8, 143u8, 138u8, 57u8, 50u8, 73u8, 137u8, 95u8, 35u8, - 87u8, 114u8, 216u8, 49u8, 151u8, 196u8, 247u8, 46u8, 255u8, - 155u8, 63u8, 178u8, 240u8, 54u8, 124u8, 9u8, 168u8, 11u8, - 228u8, 205u8, 162u8, 233u8, 183u8, - ], - ) - } - } - } - #[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_ranked_collective::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A member `who` has been added."] - pub struct MemberAdded { - pub who: ::subxt::utils::AccountId32, - } - impl ::subxt::events::StaticEvent for MemberAdded { - const PALLET: &'static str = "RankedCollective"; - const EVENT: &'static str = "MemberAdded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The member `who`se rank has been changed to the given `rank`."] - pub struct RankChanged { - pub who: ::subxt::utils::AccountId32, - pub rank: ::core::primitive::u16, - } - impl ::subxt::events::StaticEvent for RankChanged { - const PALLET: &'static str = "RankedCollective"; - const EVENT: &'static str = "RankChanged"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The member `who` of given `rank` has been removed from the collective."] - pub struct MemberRemoved { - pub who: ::subxt::utils::AccountId32, - pub rank: ::core::primitive::u16, - } - impl ::subxt::events::StaticEvent for MemberRemoved { - const PALLET: &'static str = "RankedCollective"; - const EVENT: &'static str = "MemberRemoved"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] - #[doc = "`tally`."] - pub struct Voted { - pub who: ::subxt::utils::AccountId32, - pub poll: ::core::primitive::u32, - pub vote: runtime_types::pallet_ranked_collective::VoteRecord, - pub tally: runtime_types::pallet_ranked_collective::Tally, - } - impl ::subxt::events::StaticEvent for Voted { - const PALLET: &'static str = "RankedCollective"; - const EVENT: &'static str = "Voted"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The number of members in the collective who have at least the rank according to the index"] - #[doc = " of the vec."] - pub fn member_count( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "MemberCount", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 122u8, 103u8, 33u8, 235u8, 19u8, 181u8, 16u8, 140u8, 233u8, - 252u8, 27u8, 219u8, 12u8, 127u8, 16u8, 137u8, 240u8, 120u8, - 208u8, 247u8, 81u8, 138u8, 52u8, 32u8, 120u8, 206u8, 141u8, - 101u8, 215u8, 66u8, 147u8, 170u8, - ], - ) - } - #[doc = " The number of members in the collective who have at least the rank according to the index"] - #[doc = " of the vec."] - pub fn member_count_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "MemberCount", - Vec::new(), - [ - 122u8, 103u8, 33u8, 235u8, 19u8, 181u8, 16u8, 140u8, 233u8, - 252u8, 27u8, 219u8, 12u8, 127u8, 16u8, 137u8, 240u8, 120u8, - 208u8, 247u8, 81u8, 138u8, 52u8, 32u8, 120u8, 206u8, 141u8, - 101u8, 215u8, 66u8, 147u8, 170u8, - ], - ) - } - #[doc = " The current members of the collective."] - pub fn members( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_ranked_collective::MemberRecord, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "Members", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 98u8, 137u8, 208u8, 103u8, 187u8, 115u8, 182u8, 10u8, 226u8, - 35u8, 218u8, 247u8, 229u8, 205u8, 104u8, 89u8, 150u8, 229u8, - 247u8, 45u8, 241u8, 51u8, 134u8, 210u8, 232u8, 159u8, 179u8, - 232u8, 249u8, 153u8, 186u8, 245u8, - ], - ) - } - #[doc = " The current members of the collective."] - pub fn members_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_ranked_collective::MemberRecord, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "Members", - Vec::new(), - [ - 98u8, 137u8, 208u8, 103u8, 187u8, 115u8, 182u8, 10u8, 226u8, - 35u8, 218u8, 247u8, 229u8, 205u8, 104u8, 89u8, 150u8, 229u8, - 247u8, 45u8, 241u8, 51u8, 134u8, 210u8, 232u8, 159u8, 179u8, - 232u8, 249u8, 153u8, 186u8, 245u8, - ], - ) - } - #[doc = " The index of each ranks's member into the group of members who have at least that rank."] - pub fn id_to_index( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "IdToIndex", - 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, - ), - ], - [ - 186u8, 92u8, 44u8, 141u8, 26u8, 112u8, 63u8, 128u8, 66u8, - 62u8, 160u8, 33u8, 121u8, 155u8, 190u8, 153u8, 38u8, 255u8, - 197u8, 21u8, 141u8, 192u8, 157u8, 229u8, 149u8, 104u8, 11u8, - 119u8, 161u8, 182u8, 248u8, 105u8, - ], - ) - } - #[doc = " The index of each ranks's member into the group of members who have at least that rank."] - pub fn id_to_index_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "IdToIndex", - Vec::new(), - [ - 186u8, 92u8, 44u8, 141u8, 26u8, 112u8, 63u8, 128u8, 66u8, - 62u8, 160u8, 33u8, 121u8, 155u8, 190u8, 153u8, 38u8, 255u8, - 197u8, 21u8, 141u8, 192u8, 157u8, 229u8, 149u8, 104u8, 11u8, - 119u8, 161u8, 182u8, 248u8, 105u8, - ], - ) - } - #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] - #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] - pub fn index_to_id( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u16>, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "IndexToId", - 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, - ), - ], - [ - 216u8, 113u8, 138u8, 39u8, 227u8, 44u8, 222u8, 36u8, 175u8, - 134u8, 181u8, 1u8, 242u8, 50u8, 75u8, 177u8, 213u8, 252u8, - 224u8, 241u8, 195u8, 74u8, 163u8, 223u8, 100u8, 61u8, 96u8, - 1u8, 205u8, 147u8, 63u8, 64u8, - ], - ) - } - #[doc = " The members in the collective by index. All indices in the range `0..MemberCount` will"] - #[doc = " return `Some`, however a member's index is not guaranteed to remain unchanged over time."] - pub fn index_to_id_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::subxt::utils::AccountId32, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "IndexToId", - Vec::new(), - [ - 216u8, 113u8, 138u8, 39u8, 227u8, 44u8, 222u8, 36u8, 175u8, - 134u8, 181u8, 1u8, 242u8, 50u8, 75u8, 177u8, 213u8, 252u8, - 224u8, 241u8, 195u8, 74u8, 163u8, 223u8, 100u8, 61u8, 96u8, - 1u8, 205u8, 147u8, 63u8, 64u8, - ], - ) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_ranked_collective::VoteRecord, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - :: subxt :: storage :: address :: StaticStorageAddress :: new ("RankedCollective" , "Voting" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat)] , [113u8 , 198u8 , 3u8 , 155u8 , 220u8 , 110u8 , 5u8 , 50u8 , 91u8 , 232u8 , 18u8 , 224u8 , 39u8 , 238u8 , 17u8 , 28u8 , 21u8 , 44u8 , 36u8 , 12u8 , 109u8 , 10u8 , 191u8 , 81u8 , 78u8 , 76u8 , 155u8 , 66u8 , 99u8 , 180u8 , 63u8 , 99u8 ,]) - } - #[doc = " Votes on a given proposal, if it is ongoing."] - pub fn voting_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_ranked_collective::VoteRecord, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "Voting", - Vec::new(), - [ - 113u8, 198u8, 3u8, 155u8, 220u8, 110u8, 5u8, 50u8, 91u8, - 232u8, 18u8, 224u8, 39u8, 238u8, 17u8, 28u8, 21u8, 44u8, - 36u8, 12u8, 109u8, 10u8, 191u8, 81u8, 78u8, 76u8, 155u8, - 66u8, 99u8, 180u8, 63u8, 99u8, - ], - ) - } - pub fn voting_cleanup( - &self, - _0: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "VotingCleanup", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Blake2_128Concat, - )], - [ - 49u8, 202u8, 198u8, 106u8, 238u8, 117u8, 209u8, 225u8, 166u8, - 130u8, 38u8, 236u8, 172u8, 59u8, 21u8, 168u8, 189u8, 41u8, - 190u8, 54u8, 74u8, 255u8, 230u8, 255u8, 160u8, 237u8, 70u8, - 208u8, 44u8, 182u8, 96u8, 157u8, - ], - ) - } - pub fn voting_cleanup_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "RankedCollective", - "VotingCleanup", - Vec::new(), - [ - 49u8, 202u8, 198u8, 106u8, 238u8, 117u8, 209u8, 225u8, 166u8, - 130u8, 38u8, 236u8, 172u8, 59u8, 21u8, 168u8, 189u8, 41u8, - 190u8, 54u8, 74u8, 255u8, 230u8, 255u8, 160u8, 237u8, 70u8, - 208u8, 44u8, 182u8, 96u8, 157u8, - ], - ) - } - } - } - } - pub mod fast_unstake { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegisterFastUnstake; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deregister; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Control { - pub unchecked_eras_to_check: ::core::primitive::u32, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Register oneself for fast-unstake."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] - #[doc = "`staking::unbond`."] - #[doc = ""] - #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] - #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] - #[doc = "to be checked in further blocks."] - #[doc = ""] - #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] - #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] - #[doc = ""] - #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] - #[doc = "unstaked."] - #[doc = ""] - #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] - #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] - #[doc = "the chain's resources."] - pub fn register_fast_unstake( - &self, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "register_fast_unstake", - RegisterFastUnstake {}, - [ - 254u8, 85u8, 128u8, 135u8, 172u8, 170u8, 34u8, 145u8, 79u8, - 117u8, 234u8, 90u8, 16u8, 174u8, 159u8, 197u8, 27u8, 239u8, - 180u8, 85u8, 116u8, 23u8, 254u8, 30u8, 197u8, 110u8, 48u8, - 184u8, 177u8, 129u8, 42u8, 122u8, - ], - ) - } - #[doc = "Deregister oneself from the fast-unstake."] - #[doc = ""] - #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] - #[doc = ""] - #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] - #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] - #[doc = "`Staking::rebond`."] - pub fn deregister(&self) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "deregister", - Deregister {}, - [ - 198u8, 180u8, 253u8, 148u8, 124u8, 145u8, 175u8, 121u8, 42u8, - 181u8, 41u8, 155u8, 229u8, 181u8, 66u8, 140u8, 103u8, 86u8, - 242u8, 155u8, 192u8, 34u8, 157u8, 107u8, 211u8, 162u8, 1u8, - 144u8, 35u8, 252u8, 88u8, 21u8, - ], - ) - } - #[doc = "Control the operation of this pallet."] - #[doc = ""] - #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] - pub fn control( - &self, - unchecked_eras_to_check: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "FastUnstake", - "control", - Control { - unchecked_eras_to_check, - }, - [ - 134u8, 85u8, 43u8, 231u8, 209u8, 34u8, 248u8, 0u8, 238u8, - 73u8, 175u8, 105u8, 40u8, 128u8, 186u8, 40u8, 211u8, 106u8, - 107u8, 206u8, 124u8, 155u8, 220u8, 125u8, 143u8, 10u8, 162u8, - 20u8, 99u8, 142u8, 243u8, 5u8, - ], - ) - } - } - } - #[doc = "The events of this pallet."] - pub type Event = runtime_types::pallet_fast_unstake::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was unstaked."] - pub struct Unstaked { - pub stash: ::subxt::utils::AccountId32, - pub result: - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - } - impl ::subxt::events::StaticEvent for Unstaked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Unstaked"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] - pub struct Slashed { - pub stash: ::subxt::utils::AccountId32, - pub amount: ::core::primitive::u128, - } - impl ::subxt::events::StaticEvent for Slashed { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "Slashed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "An internal error happened. Operations will be paused now."] - pub struct InternalError; - impl ::subxt::events::StaticEvent for InternalError { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "InternalError"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was partially checked for the given eras, but the process did not finish."] - pub struct BatchChecked { - pub eras: ::std::vec::Vec<::core::primitive::u32>, - } - impl ::subxt::events::StaticEvent for BatchChecked { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchChecked"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "A batch was terminated."] - #[doc = ""] - #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] - #[doc = "of the batch. A new batch will be created upon next block."] - pub struct BatchFinished; - impl ::subxt::events::StaticEvent for BatchFinished { - const PALLET: &'static str = "FastUnstake"; - const EVENT: &'static str = "BatchFinished"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The current \"head of the queue\" being unstaked."] - pub fn head( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_fast_unstake::types::UnstakeRequest, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "Head", - vec![], - [ - 206u8, 19u8, 169u8, 239u8, 214u8, 136u8, 16u8, 102u8, 82u8, - 110u8, 128u8, 205u8, 102u8, 96u8, 148u8, 190u8, 67u8, 75u8, - 2u8, 213u8, 134u8, 143u8, 40u8, 57u8, 54u8, 66u8, 170u8, - 42u8, 135u8, 212u8, 108u8, 177u8, - ], - ) - } - #[doc = " The map of all accounts wishing to be unstaked."] - #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn queue( - &self, - _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "Queue", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, - 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, - 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, - 205u8, 173u8, 189u8, 230u8, 71u8, - ], - ) - } - #[doc = " The map of all accounts wishing to be unstaked."] - #[doc = ""] - #[doc = " Keeps track of `AccountId` wishing to unstake and it's corresponding deposit."] - #[doc = ""] - #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] - pub fn queue_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u128, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "Queue", - Vec::new(), - [ - 250u8, 208u8, 88u8, 68u8, 8u8, 87u8, 27u8, 59u8, 120u8, - 242u8, 79u8, 54u8, 108u8, 15u8, 62u8, 143u8, 126u8, 66u8, - 159u8, 159u8, 55u8, 212u8, 190u8, 26u8, 171u8, 90u8, 156u8, - 205u8, 173u8, 189u8, 230u8, 71u8, - ], - ) - } - #[doc = "Counter for the related counted storage map"] - pub fn counter_for_queue( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "CounterForQueue", - vec![], - [ - 241u8, 174u8, 224u8, 214u8, 204u8, 37u8, 117u8, 62u8, 114u8, - 63u8, 123u8, 121u8, 201u8, 128u8, 26u8, 60u8, 170u8, 24u8, - 112u8, 5u8, 248u8, 7u8, 143u8, 17u8, 150u8, 91u8, 23u8, 90u8, - 237u8, 4u8, 138u8, 210u8, - ], - ) - } - #[doc = " Number of eras to check per block."] - #[doc = ""] - #[doc = " If set to 0, this pallet does absolutely nothing."] - #[doc = ""] - #[doc = " Based on the amount of weight available at `on_idle`, up to this many eras of a single"] - #[doc = " nominator might be checked."] - pub fn eras_to_check_per_block( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - ::core::primitive::u32, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "FastUnstake", - "ErasToCheckPerBlock", - vec![], - [ - 85u8, 55u8, 18u8, 11u8, 75u8, 176u8, 36u8, 253u8, 183u8, - 250u8, 203u8, 178u8, 201u8, 79u8, 101u8, 89u8, 51u8, 142u8, - 254u8, 23u8, 49u8, 140u8, 195u8, 116u8, 66u8, 124u8, 165u8, - 161u8, 151u8, 174u8, 37u8, 51u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Deposit to take for unstaking, to make sure we're able to slash the it in order to cover"] - #[doc = " the costs of resources on unsuccessful unstake."] - pub fn deposit( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> - { - ::subxt::constants::StaticConstantAddress::new( - "FastUnstake", - "Deposit", - [ - 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, - 200u8, 214u8, 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, - 101u8, 54u8, 210u8, 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, - 15u8, 178u8, 98u8, 148u8, 156u8, - ], - ) - } - } - } - } - pub mod message_queue { - use super::root_mod; - use super::runtime_types; - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub mod calls { - use super::root_mod; - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReapPage { - pub message_origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub page_index: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ExecuteOverweight { - pub message_origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub page: ::core::primitive::u32, - pub index: ::core::primitive::u32, - pub weight_limit: runtime_types::sp_weights::weight_v2::Weight, - } - pub struct TransactionApi; - impl TransactionApi { - #[doc = "Remove a page which has no more messages remaining to be processed or is stale."] - pub fn reap_page( - &self, - message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin, - page_index: ::core::primitive::u32, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "MessageQueue", - "reap_page", - ReapPage { - message_origin, - page_index, - }, - [ - 5u8, 51u8, 124u8, 179u8, 60u8, 176u8, 165u8, 46u8, 182u8, - 66u8, 119u8, 34u8, 69u8, 23u8, 129u8, 78u8, 44u8, 218u8, - 241u8, 83u8, 48u8, 97u8, 172u8, 46u8, 68u8, 182u8, 37u8, - 162u8, 98u8, 95u8, 10u8, 254u8, - ], - ) - } - #[doc = "Execute an overweight message."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed`."] - #[doc = "- `message_origin`: The origin from which the message to be executed arrived."] - #[doc = "- `page`: The page in the queue in which the message to be executed is sitting."] - #[doc = "- `index`: The index into the queue of the message to be executed."] - #[doc = "- `weight_limit`: The maximum amount of weight allowed to be consumed in the execution"] - #[doc = " of the message."] - #[doc = ""] - #[doc = "Benchmark complexity considerations: O(index + weight_limit)."] - pub fn execute_overweight( - &self, - message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin, - page: ::core::primitive::u32, - index: ::core::primitive::u32, - weight_limit: runtime_types::sp_weights::weight_v2::Weight, - ) -> ::subxt::tx::Payload { - ::subxt::tx::Payload::new_static( - "MessageQueue", - "execute_overweight", - ExecuteOverweight { - message_origin, - page, - index, - weight_limit, - }, - [ - 190u8, 229u8, 183u8, 199u8, 95u8, 209u8, 59u8, 104u8, 156u8, - 242u8, 142u8, 147u8, 184u8, 253u8, 150u8, 19u8, 156u8, 175u8, - 198u8, 72u8, 136u8, 149u8, 53u8, 75u8, 106u8, 182u8, 116u8, - 234u8, 63u8, 10u8, 153u8, 212u8, - ], - ) - } - } - } - #[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_message_queue::pallet::Event; - pub mod events { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Message discarded due to an inability to decode the item. Usually caused by state"] - #[doc = "corruption."] - pub struct Discarded { - pub hash: ::subxt::utils::H256, - } - impl ::subxt::events::StaticEvent for Discarded { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "Discarded"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Message discarded due to an error in the `MessageProcessor` (usually a format error)."] - pub struct ProcessingFailed { - pub hash: ::subxt::utils::H256, - pub origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub error: - runtime_types::frame_support::traits::messages::ProcessMessageError, - } - impl ::subxt::events::StaticEvent for ProcessingFailed { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "ProcessingFailed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Message is processed."] - pub struct Processed { - pub hash: ::subxt::utils::H256, - pub origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub weight_used: runtime_types::sp_weights::weight_v2::Weight, - pub success: ::core::primitive::bool, - } - impl ::subxt::events::StaticEvent for Processed { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "Processed"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Message placed in overweight queue."] - pub struct OverweightEnqueued { - pub hash: ::subxt::utils::H256, - pub origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub page_index: ::core::primitive::u32, - pub message_index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for OverweightEnqueued { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "OverweightEnqueued"; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "This page was reaped."] - pub struct PageReaped { - pub origin: - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - pub index: ::core::primitive::u32, - } - impl ::subxt::events::StaticEvent for PageReaped { - const PALLET: &'static str = "MessageQueue"; - const EVENT: &'static str = "PageReaped"; - } - } - pub mod storage { - use super::runtime_types; - pub struct StorageApi; - impl StorageApi { - #[doc = " The index of the first and last (non-empty) pages."] - pub fn book_state_for( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - >, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_message_queue::BookState< - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - >, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "MessageQueue", - "BookStateFor", - vec![::subxt::storage::address::StorageMapKey::new( - _0.borrow(), - ::subxt::storage::address::StorageHasher::Twox64Concat, - )], - [ - 115u8, 200u8, 55u8, 195u8, 65u8, 240u8, 86u8, 187u8, 229u8, - 140u8, 7u8, 98u8, 151u8, 231u8, 75u8, 154u8, 131u8, 223u8, - 74u8, 111u8, 160u8, 48u8, 235u8, 223u8, 215u8, 193u8, 153u8, - 73u8, 135u8, 197u8, 223u8, 10u8, - ], - ) - } - #[doc = " The index of the first and last (non-empty) pages."] - pub fn book_state_for_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_message_queue::BookState< - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - >, - (), - ::subxt::storage::address::Yes, - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "MessageQueue", - "BookStateFor", - Vec::new(), - [ - 115u8, 200u8, 55u8, 195u8, 65u8, 240u8, 86u8, 187u8, 229u8, - 140u8, 7u8, 98u8, 151u8, 231u8, 75u8, 154u8, 131u8, 223u8, - 74u8, 111u8, 160u8, 48u8, 235u8, 223u8, 215u8, 193u8, 153u8, - 73u8, 135u8, 197u8, 223u8, 10u8, - ], - ) - } - #[doc = " The origin at which we should begin servicing."] - pub fn service_head( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - ::subxt::storage::address::Yes, - (), - (), - > { - ::subxt::storage::address::StaticStorageAddress::new( - "MessageQueue", - "ServiceHead", - vec![], - [ - 20u8, 45u8, 85u8, 181u8, 153u8, 58u8, 1u8, 235u8, 167u8, - 192u8, 66u8, 81u8, 199u8, 37u8, 194u8, 250u8, 27u8, 28u8, - 18u8, 100u8, 244u8, 181u8, 45u8, 11u8, 35u8, 89u8, 208u8, - 63u8, 245u8, 72u8, 29u8, 137u8, - ], - ) - } - #[doc = " The map of page indices to pages."] - pub fn pages( - &self, - _0: impl ::std::borrow::Borrow< - runtime_types::pallet_message_queue::mock_helpers::MessageOrigin, - >, - _1: impl ::std::borrow::Borrow<::core::primitive::u32>, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_message_queue::Page<::core::primitive::u32>, - ::subxt::storage::address::Yes, - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "MessageQueue", - "Pages", - 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, - ), - ], - [ - 25u8, 173u8, 204u8, 57u8, 137u8, 77u8, 88u8, 162u8, 83u8, - 32u8, 67u8, 15u8, 74u8, 153u8, 151u8, 94u8, 135u8, 219u8, - 9u8, 46u8, 156u8, 13u8, 143u8, 177u8, 216u8, 96u8, 83u8, - 116u8, 237u8, 79u8, 76u8, 92u8, - ], - ) - } - #[doc = " The map of page indices to pages."] - pub fn pages_root( - &self, - ) -> ::subxt::storage::address::StaticStorageAddress< - runtime_types::pallet_message_queue::Page<::core::primitive::u32>, - (), - (), - ::subxt::storage::address::Yes, - > { - ::subxt::storage::address::StaticStorageAddress::new( - "MessageQueue", - "Pages", - Vec::new(), - [ - 25u8, 173u8, 204u8, 57u8, 137u8, 77u8, 88u8, 162u8, 83u8, - 32u8, 67u8, 15u8, 74u8, 153u8, 151u8, 94u8, 135u8, 219u8, - 9u8, 46u8, 156u8, 13u8, 143u8, 177u8, 216u8, 96u8, 83u8, - 116u8, 237u8, 79u8, 76u8, 92u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " The size of the page; this implies the maximum message size which can be sent."] - #[doc = ""] - #[doc = " A good value depends on the expected message sizes, their weights, the weight that is"] - #[doc = " available for processing them and the maximal needed message size. The maximal message"] - #[doc = " size is slightly lower than this as defined by [`MaxMessageLenOf`]."] - pub fn heap_size( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "MessageQueue", - "HeapSize", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 stale pages (i.e. of overweight messages) allowed before culling"] - #[doc = " can happen. Once there are more stale pages than this, then historical pages may be"] - #[doc = " dropped, even if they contain unprocessed overweight messages."] - pub fn max_stale( - &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( - "MessageQueue", - "MaxStale", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 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 of weight (if any) which should be provided to the message queue for"] - #[doc = " servicing enqueued items."] - #[doc = ""] - #[doc = " This may be legitimately `None` in the case that you will call"] - #[doc = " `ServiceQueues::service_queues` manually."] - pub fn service_weight( - &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::core::option::Option, - > { - ::subxt::constants::StaticConstantAddress::new( - "MessageQueue", - "ServiceWeight", - [ - 199u8, 205u8, 164u8, 188u8, 101u8, 240u8, 98u8, 54u8, 0u8, - 78u8, 218u8, 77u8, 164u8, 196u8, 0u8, 194u8, 181u8, 251u8, - 195u8, 24u8, 98u8, 147u8, 169u8, 53u8, 22u8, 202u8, 66u8, - 236u8, 163u8, 36u8, 162u8, 46u8, - ], - ) - } - } - } - } - pub mod runtime_types { - use super::runtime_types; - 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PostDispatchInfo { - pub actual_weight: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - >, - pub pays_fee: runtime_types::frame_support::dispatch::Pays, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 messages { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ProcessMessageError { - #[codec(index = 0)] - BadFormat, - #[codec(index = 1)] - Corrupt, - #[codec(index = 2)] - Unsupported, - #[codec(index = 3)] - Overweight(runtime_types::sp_weights::weight_v2::Weight), - } - } - 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, - Debug, - )] - #[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, - Debug, - )] - #[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 schedule { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchTime<_0> { - #[codec(index = 0)] - At(_0), - #[codec(index = 1)] - After(_0), - } - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AttributeNamespace<_0> { - #[codec(index = 0)] - Pallet, - #[codec(index = 1)] - CollectionOwner, - #[codec(index = 2)] - ItemOwner, - #[codec(index = 3)] - Account(_0), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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< - runtime_types::sp_weights::weight_v2::Weight, - >, - pub max_total: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - >, - pub reserved: ::core::option::Option< - runtime_types::sp_weights::weight_v2::Weight, - >, - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[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, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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 kitchensink_runtime { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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>, - )>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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 = 51)] - AllianceMotion( - runtime_types::pallet_collective::RawOrigin< - ::subxt::utils::AccountId32, - >, - ), - #[codec(index = 4)] - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ProxyType { - #[codec(index = 0)] - Any, - #[codec(index = 1)] - NonTransfer, - #[codec(index = 2)] - Governance, - #[codec(index = 3)] - Staking, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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::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)] - Contracts(runtime_types::pallet_contracts::pallet::Call), - #[codec(index = 20)] - Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 21)] - ImOnline(runtime_types::pallet_im_online::pallet::Call), - #[codec(index = 26)] - Identity(runtime_types::pallet_identity::pallet::Call), - #[codec(index = 27)] - Society(runtime_types::pallet_society::pallet::Call), - #[codec(index = 28)] - Recovery(runtime_types::pallet_recovery::pallet::Call), - #[codec(index = 29)] - Vesting(runtime_types::pallet_vesting::pallet::Call), - #[codec(index = 30)] - Scheduler(runtime_types::pallet_scheduler::pallet::Call), - #[codec(index = 31)] - Preimage(runtime_types::pallet_preimage::pallet::Call), - #[codec(index = 32)] - Proxy(runtime_types::pallet_proxy::pallet::Call), - #[codec(index = 33)] - Multisig(runtime_types::pallet_multisig::pallet::Call), - #[codec(index = 34)] - Bounties(runtime_types::pallet_bounties::pallet::Call), - #[codec(index = 35)] - Tips(runtime_types::pallet_tips::pallet::Call), - #[codec(index = 36)] - Assets(runtime_types::pallet_assets::pallet::Call), - #[codec(index = 38)] - Lottery(runtime_types::pallet_lottery::pallet::Call), - #[codec(index = 39)] - Nis(runtime_types::pallet_nis::pallet::Call), - #[codec(index = 40)] - Uniques(runtime_types::pallet_uniques::pallet::Call), - #[codec(index = 41)] - Nfts(runtime_types::pallet_nfts::pallet::Call), - #[codec(index = 42)] - TransactionStorage( - runtime_types::pallet_transaction_storage::pallet::Call, - ), - #[codec(index = 43)] - VoterList(runtime_types::pallet_bags_list::pallet::Call), - #[codec(index = 44)] - StateTrieMigration( - runtime_types::pallet_state_trie_migration::pallet::Call, - ), - #[codec(index = 45)] - ChildBounties(runtime_types::pallet_child_bounties::pallet::Call), - #[codec(index = 46)] - Referenda(runtime_types::pallet_referenda::pallet::Call), - #[codec(index = 47)] - Remark(runtime_types::pallet_remark::pallet::Call), - #[codec(index = 48)] - RootTesting(runtime_types::pallet_root_testing::pallet::Call), - #[codec(index = 49)] - ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Call), - #[codec(index = 50)] - Whitelist(runtime_types::pallet_whitelist::pallet::Call), - #[codec(index = 51)] - AllianceMotion(runtime_types::pallet_collective::pallet::Call), - #[codec(index = 52)] - Alliance(runtime_types::pallet_alliance::pallet::Call), - #[codec(index = 53)] - NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), - #[codec(index = 54)] - RankedPolls(runtime_types::pallet_referenda::pallet::Call), - #[codec(index = 55)] - RankedCollective(runtime_types::pallet_ranked_collective::pallet::Call), - #[codec(index = 56)] - FastUnstake(runtime_types::pallet_fast_unstake::pallet::Call), - #[codec(index = 57)] - MessageQueue(runtime_types::pallet_message_queue::pallet::Call), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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 = 8)] - AssetTxPayment(runtime_types::pallet_asset_tx_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)] - Contracts(runtime_types::pallet_contracts::pallet::Event), - #[codec(index = 20)] - Sudo(runtime_types::pallet_sudo::pallet::Event), - #[codec(index = 21)] - ImOnline(runtime_types::pallet_im_online::pallet::Event), - #[codec(index = 23)] - Offences(runtime_types::pallet_offences::pallet::Event), - #[codec(index = 26)] - Identity(runtime_types::pallet_identity::pallet::Event), - #[codec(index = 27)] - Society(runtime_types::pallet_society::pallet::Event), - #[codec(index = 28)] - Recovery(runtime_types::pallet_recovery::pallet::Event), - #[codec(index = 29)] - Vesting(runtime_types::pallet_vesting::pallet::Event), - #[codec(index = 30)] - Scheduler(runtime_types::pallet_scheduler::pallet::Event), - #[codec(index = 31)] - Preimage(runtime_types::pallet_preimage::pallet::Event), - #[codec(index = 32)] - Proxy(runtime_types::pallet_proxy::pallet::Event), - #[codec(index = 33)] - Multisig(runtime_types::pallet_multisig::pallet::Event), - #[codec(index = 34)] - Bounties(runtime_types::pallet_bounties::pallet::Event), - #[codec(index = 35)] - Tips(runtime_types::pallet_tips::pallet::Event), - #[codec(index = 36)] - Assets(runtime_types::pallet_assets::pallet::Event), - #[codec(index = 38)] - Lottery(runtime_types::pallet_lottery::pallet::Event), - #[codec(index = 39)] - Nis(runtime_types::pallet_nis::pallet::Event), - #[codec(index = 40)] - Uniques(runtime_types::pallet_uniques::pallet::Event), - #[codec(index = 41)] - Nfts(runtime_types::pallet_nfts::pallet::Event), - #[codec(index = 42)] - TransactionStorage( - runtime_types::pallet_transaction_storage::pallet::Event, - ), - #[codec(index = 43)] - VoterList(runtime_types::pallet_bags_list::pallet::Event), - #[codec(index = 44)] - StateTrieMigration( - runtime_types::pallet_state_trie_migration::pallet::Event, - ), - #[codec(index = 45)] - ChildBounties(runtime_types::pallet_child_bounties::pallet::Event), - #[codec(index = 46)] - Referenda(runtime_types::pallet_referenda::pallet::Event), - #[codec(index = 47)] - Remark(runtime_types::pallet_remark::pallet::Event), - #[codec(index = 49)] - ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Event), - #[codec(index = 50)] - Whitelist(runtime_types::pallet_whitelist::pallet::Event), - #[codec(index = 51)] - AllianceMotion(runtime_types::pallet_collective::pallet::Event), - #[codec(index = 52)] - Alliance(runtime_types::pallet_alliance::pallet::Event), - #[codec(index = 53)] - NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), - #[codec(index = 54)] - RankedPolls(runtime_types::pallet_referenda::pallet::Event), - #[codec(index = 55)] - RankedCollective(runtime_types::pallet_ranked_collective::pallet::Event), - #[codec(index = 56)] - FastUnstake(runtime_types::pallet_fast_unstake::pallet::Event), - #[codec(index = 57)] - MessageQueue(runtime_types::pallet_message_queue::pallet::Event), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SessionKeys { - pub grandpa: runtime_types::sp_finality_grandpa::app::Public, - pub babe: runtime_types::sp_consensus_babe::app::Public, - pub im_online: - runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub authority_discovery: - runtime_types::sp_authority_discovery::app::Public, - } - } - pub mod pallet_alliance { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a new proposal to be voted on."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - vote { - proposal: ::subxt::utils::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 2)] - #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - 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 = 3)] - #[doc = "Initialize the Alliance, onboard fellows and allies."] - #[doc = ""] - #[doc = "The Alliance must be empty, and the call must provide some founding members."] - #[doc = ""] - #[doc = "Must be called by the Root origin."] - init_members { - fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, - allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 4)] - #[doc = "Disband the Alliance, remove all active members and unreserve deposits."] - #[doc = ""] - #[doc = "Witness data must be set."] - disband { - witness: runtime_types::pallet_alliance::types::DisbandWitness, - }, - #[codec(index = 5)] - #[doc = "Set a new IPFS CID to the alliance rule."] - set_rule { - rule: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 6)] - #[doc = "Make an announcement of a new IPFS CID about alliance issues."] - announce { - announcement: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 7)] - #[doc = "Remove an announcement."] - remove_announcement { - announcement: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 8)] - #[doc = "Submit oneself for candidacy. A fixed deposit is reserved."] - join_alliance, - #[codec(index = 9)] - #[doc = "A Fellow can nominate someone to join the alliance as an Ally. There is no deposit"] - #[doc = "required from the nominator or nominee."] - nominate_ally { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 10)] - #[doc = "Elevate an Ally to Fellow."] - elevate_ally { - ally: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 11)] - #[doc = "As a member, give a retirement notice and start a retirement period required to pass in"] - #[doc = "order to retire."] - give_retirement_notice, - #[codec(index = 12)] - #[doc = "As a member, retire from the Alliance and unreserve the deposit."] - #[doc = ""] - #[doc = "This can only be done once you have called `give_retirement_notice` and the"] - #[doc = "`RetirementPeriod` has passed."] - retire, - #[codec(index = 13)] - #[doc = "Kick a member from the Alliance and slash its deposit."] - kick_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 14)] - #[doc = "Add accounts or websites to the list of unscrupulous items."] - add_unscrupulous_items { - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - }, - #[codec(index = 15)] - #[doc = "Deem some items no longer unscrupulous."] - remove_unscrupulous_items { - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - }, - #[codec(index = 16)] - #[doc = "Close a vote that is either approved, disapproved, or whose voting period has ended."] - #[doc = ""] - #[doc = "Must be called by a Fellow."] - 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, - }, - #[codec(index = 17)] - #[doc = "Abdicate one's position as a voting member and just be an Ally. May be used by Fellows"] - #[doc = "who do not want to leave the Alliance but do not have the capacity to participate"] - #[doc = "operationally for some time."] - abdicate_fellow_status, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The Alliance has not been initialized yet, therefore accounts cannot join it."] - AllianceNotYetInitialized, - #[codec(index = 1)] - #[doc = "The Alliance has been initialized, therefore cannot be initialized again."] - AllianceAlreadyInitialized, - #[codec(index = 2)] - #[doc = "Account is already a member."] - AlreadyMember, - #[codec(index = 3)] - #[doc = "Account is not a member."] - NotMember, - #[codec(index = 4)] - #[doc = "Account is not an ally."] - NotAlly, - #[codec(index = 5)] - #[doc = "Account does not have voting rights."] - NoVotingRights, - #[codec(index = 6)] - #[doc = "Account is already an elevated (fellow) member."] - AlreadyElevated, - #[codec(index = 7)] - #[doc = "Item is already listed as unscrupulous."] - AlreadyUnscrupulous, - #[codec(index = 8)] - #[doc = "Account has been deemed unscrupulous by the Alliance and is not welcome to join or be"] - #[doc = "nominated."] - AccountNonGrata, - #[codec(index = 9)] - #[doc = "Item has not been deemed unscrupulous."] - NotListedAsUnscrupulous, - #[codec(index = 10)] - #[doc = "The number of unscrupulous items exceeds `MaxUnscrupulousItems`."] - TooManyUnscrupulousItems, - #[codec(index = 11)] - #[doc = "Length of website URL exceeds `MaxWebsiteUrlLength`."] - TooLongWebsiteUrl, - #[codec(index = 12)] - #[doc = "Balance is insufficient for the required deposit."] - InsufficientFunds, - #[codec(index = 13)] - #[doc = "The account's identity does not have display field and website field."] - WithoutIdentityDisplayAndWebsite, - #[codec(index = 14)] - #[doc = "The account's identity has no good judgement."] - WithoutGoodIdentityJudgement, - #[codec(index = 15)] - #[doc = "The proposal hash is not found."] - MissingProposalHash, - #[codec(index = 16)] - #[doc = "The announcement is not found."] - MissingAnnouncement, - #[codec(index = 17)] - #[doc = "Number of members exceeds `MaxMembersCount`."] - TooManyMembers, - #[codec(index = 18)] - #[doc = "Number of announcements exceeds `MaxAnnouncementsCount`."] - TooManyAnnouncements, - #[codec(index = 19)] - #[doc = "Invalid witness data given."] - BadWitness, - #[codec(index = 20)] - #[doc = "Account already gave retirement notice"] - AlreadyRetiring, - #[codec(index = 21)] - #[doc = "Account did not give a retirement notice required to retire."] - RetirementNoticeNotGiven, - #[codec(index = 22)] - #[doc = "Retirement period has not passed."] - RetirementPeriodNotPassed, - #[codec(index = 23)] - #[doc = "Fellows must be provided to initialize the Alliance."] - FellowsMissing, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 rule has been set."] - NewRuleSet { - rule: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 1)] - #[doc = "A new announcement has been proposed."] - Announced { - announcement: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 2)] - #[doc = "An on-chain announcement has been removed."] - AnnouncementRemoved { - announcement: runtime_types::pallet_alliance::types::Cid, - }, - #[codec(index = 3)] - #[doc = "Some accounts have been initialized as members (fellows/allies)."] - MembersInitialized { - fellows: ::std::vec::Vec<::subxt::utils::AccountId32>, - allies: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 4)] - #[doc = "An account has been added as an Ally and reserved its deposit."] - NewAllyJoined { - ally: ::subxt::utils::AccountId32, - nominator: ::core::option::Option<::subxt::utils::AccountId32>, - reserved: ::core::option::Option<::core::primitive::u128>, - }, - #[codec(index = 5)] - #[doc = "An ally has been elevated to Fellow."] - AllyElevated { ally: ::subxt::utils::AccountId32 }, - #[codec(index = 6)] - #[doc = "A member gave retirement notice and their retirement period started."] - MemberRetirementPeriodStarted { member: ::subxt::utils::AccountId32 }, - #[codec(index = 7)] - #[doc = "A member has retired with its deposit unreserved."] - MemberRetired { - member: ::subxt::utils::AccountId32, - unreserved: ::core::option::Option<::core::primitive::u128>, - }, - #[codec(index = 8)] - #[doc = "A member has been kicked out with its deposit slashed."] - MemberKicked { - member: ::subxt::utils::AccountId32, - slashed: ::core::option::Option<::core::primitive::u128>, - }, - #[codec(index = 9)] - #[doc = "Accounts or websites have been added into the list of unscrupulous items."] - UnscrupulousItemAdded { - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - }, - #[codec(index = 10)] - #[doc = "Accounts or websites have been removed from the list of unscrupulous items."] - UnscrupulousItemRemoved { - items: ::std::vec::Vec< - runtime_types::pallet_alliance::UnscrupulousItem< - ::subxt::utils::AccountId32, - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - >, - >, - }, - #[codec(index = 11)] - #[doc = "Alliance disbanded. Includes number deleted members and unreserved deposits."] - AllianceDisbanded { - fellow_members: ::core::primitive::u32, - ally_members: ::core::primitive::u32, - unreserved: ::core::primitive::u32, - }, - #[codec(index = 12)] - #[doc = "A Fellow abdicated their voting rights. They are now an Ally."] - FellowAbdicated { fellow: ::subxt::utils::AccountId32 }, - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Cid { - pub version: runtime_types::pallet_alliance::types::Version, - pub codec: ::core::primitive::u64, - pub hash: runtime_types::pallet_alliance::types::Multihash, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DisbandWitness { - #[codec(compact)] - pub fellow_members: ::core::primitive::u32, - #[codec(compact)] - pub ally_members: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Multihash { - pub code: ::core::primitive::u64, - pub digest: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Version { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MemberRole { - #[codec(index = 0)] - Fellow, - #[codec(index = 1)] - Ally, - #[codec(index = 2)] - Retiring, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UnscrupulousItem<_0, _1> { - #[codec(index = 0)] - AccountId(_0), - #[codec(index = 1)] - Website(_1), - } - } - pub mod pallet_asset_tx_payment { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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` in an asset `asset_id`."] - AssetTxFeePaid { - who: ::subxt::utils::AccountId32, - actual_fee: ::core::primitive::u128, - tip: ::core::primitive::u128, - asset_id: ::core::option::Option<::core::primitive::u32>, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChargeAssetTxPayment { - #[codec(compact)] - pub tip: ::core::primitive::u128, - pub asset_id: ::core::option::Option<::core::primitive::u32>, - } - } - pub mod pallet_assets { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Issue a new class of fungible assets from a public origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "Funds of sender are reserved by `AssetDeposit`."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset."] - #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] - #[doc = "member of the asset class's admin team."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - create { - #[codec(compact)] - id: ::core::primitive::u32, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - min_balance: ::core::primitive::u128, - }, - #[codec(index = 1)] - #[doc = "Issue a new class of fungible assets from a privileged origin."] - #[doc = ""] - #[doc = "This new asset class has no assets initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] - #[doc = "an existing asset."] - #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] - #[doc = "over this asset, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_create { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - is_sufficient: ::core::primitive::bool, - #[codec(compact)] - min_balance: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Start the process of destroying a fungible asset class."] - #[doc = ""] - #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] - #[doc = "destruction of an asset class."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "The asset class must be frozen before calling `start_destroy`."] - start_destroy { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Destroy all accounts associated with a given asset."] - #[doc = ""] - #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedAccounts` event."] - destroy_accounts { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] - #[doc = ""] - #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state."] - #[doc = ""] - #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] - #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each call emits the `Event::DestroyedApprovals` event."] - destroy_approvals { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Complete destroying asset and unreserve currency."] - #[doc = ""] - #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] - #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] - #[doc = "hand."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] - #[doc = " asset."] - #[doc = ""] - #[doc = "Each successful call emits the `Event::Destroyed` event."] - finish_destroy { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Mint assets of a particular class."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount minted."] - #[doc = "- `beneficiary`: The account to be credited with the minted assets."] - #[doc = "- `amount`: The amount of the asset to be minted."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] - mint { - #[codec(compact)] - id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] - #[doc = ""] - #[doc = "Bails with `NoAccount` if the `who` is already dead."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount burned."] - #[doc = "- `who`: The account to be debited from."] - #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] - #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] - burn { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "Move some assets from the sender account to another."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - transfer { - #[codec(compact)] - id: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `target`: The account to be credited."] - #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] - #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] - #[doc = "the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] - #[doc = "`target`."] - transfer_keep_alive { - #[codec(compact)] - id: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 10)] - #[doc = "Move some assets from one account to another."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to have some amount transferred."] - #[doc = "- `source`: The account to be debited."] - #[doc = "- `dest`: The account to be credited."] - #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] - #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] - #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] - #[doc = "below the minimum balance. Must be greater than zero."] - #[doc = ""] - #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] - #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] - #[doc = "to zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] - #[doc = "`dest`."] - force_transfer { - #[codec(compact)] - id: ::core::primitive::u32, - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 11)] - #[doc = "Disallow further unprivileged transfers from an account."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 12)] - #[doc = "Allow unprivileged transfers from an account again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `who`: The account to be unfrozen."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw { - #[codec(compact)] - id: ::core::primitive::u32, - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 13)] - #[doc = "Disallow further unprivileged transfers for the asset class."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze_asset { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 14)] - #[doc = "Allow unprivileged transfers for the asset again."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be thawed."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw_asset { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 15)] - #[doc = "Change the Owner of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer_ownership { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 16)] - #[doc = "Change the Issuer, Admin and Freezer of an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to be frozen."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_team { - #[codec(compact)] - id: ::core::primitive::u32, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 17)] - #[doc = "Set the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Funds of sender are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - symbol: ::std::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - }, - #[codec(index = 18)] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] - #[doc = ""] - #[doc = "Any deposit is freed for the asset owner."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - clear_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 19)] - #[doc = "Force the metadata for an asset to some value."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is left alone."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to update."] - #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] - #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] - #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] - force_set_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - symbol: ::std::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 20)] - #[doc = "Clear the metadata for an asset."] - #[doc = ""] - #[doc = "Origin must be ForceOrigin."] - #[doc = ""] - #[doc = "Any deposit is returned."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_clear_metadata { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 21)] - #[doc = "Alter the attributes of a given asset."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The new Owner of this asset."] - #[doc = "- `issuer`: The new Issuer of this asset."] - #[doc = "- `admin`: The new Admin of this asset."] - #[doc = "- `freezer`: The new Freezer of this asset."] - #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] - #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] - #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] - #[doc = "value to account for the state bloat associated with its balance storage. If set to"] - #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] - #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] - #[doc = "growth)."] - #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_asset_status { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - min_balance: ::core::primitive::u128, - is_sufficient: ::core::primitive::bool, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 22)] - #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed."] - #[doc = ""] - #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] - #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] - #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] - #[doc = "meet the right value."] - #[doc = ""] - #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] - #[doc = "making this call."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account to delegate permission to transfer asset."] - #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] - #[doc = "already an approval in place, then this acts additively."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - approve_transfer { - #[codec(compact)] - id: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 23)] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place between signer and"] - #[doc = "`delegate`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - cancel_approval { - #[codec(compact)] - id: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 24)] - #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] - #[doc = ""] - #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] - #[doc = "account of the asset `id`."] - #[doc = ""] - #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `delegate`: The account delegated permission to transfer asset."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_cancel_approval { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 25)] - #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] - #[doc = "account."] - #[doc = ""] - #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] - #[doc = "signer."] - #[doc = ""] - #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] - #[doc = "reserved by `approve_transfer` is unreserved."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset."] - #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] - #[doc = "from which the asset balance will be withdrawn."] - #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] - #[doc = "- `amount`: The amount of assets to transfer."] - #[doc = ""] - #[doc = "Emits `TransferredApproved` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer_approved { - #[codec(compact)] - id: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - destination: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - amount: ::core::primitive::u128, - }, - #[codec(index = 26)] - #[doc = "Create an asset account for non-provider assets."] - #[doc = ""] - #[doc = "A deposit will be taken from the signer account."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] - #[doc = " to be taken."] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = ""] - #[doc = "Emits `Touched` event when successful."] - touch { - #[codec(compact)] - id: ::core::primitive::u32, - }, - #[codec(index = 27)] - #[doc = "Return the deposit (if any) of an asset account."] - #[doc = ""] - #[doc = "The origin must be Signed."] - #[doc = ""] - #[doc = "- `id`: The identifier of the asset for the account to be created."] - #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] - #[doc = ""] - #[doc = "Emits `Refunded` event when successful."] - refund { - #[codec(compact)] - id: ::core::primitive::u32, - allow_burn: ::core::primitive::bool, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Account balance must be greater than or equal to the transfer amount."] - BalanceLow, - #[codec(index = 1)] - #[doc = "The account to alter does not exist."] - NoAccount, - #[codec(index = 2)] - #[doc = "The signing account has no permission to do the operation."] - NoPermission, - #[codec(index = 3)] - #[doc = "The given asset ID is unknown."] - Unknown, - #[codec(index = 4)] - #[doc = "The origin account is frozen."] - Frozen, - #[codec(index = 5)] - #[doc = "The asset ID is already taken."] - InUse, - #[codec(index = 6)] - #[doc = "Invalid witness data given."] - BadWitness, - #[codec(index = 7)] - #[doc = "Minimum balance should be non-zero."] - MinBalanceZero, - #[codec(index = 8)] - #[doc = "Unable to increment the consumer reference counters on the account. Either no provider"] - #[doc = "reference exists to allow a non-zero balance of a non-self-sufficient asset, or the"] - #[doc = "maximum number of consumers has been reached."] - NoProvider, - #[codec(index = 9)] - #[doc = "Invalid metadata given."] - BadMetadata, - #[codec(index = 10)] - #[doc = "No approval exists that would allow the transfer."] - Unapproved, - #[codec(index = 11)] - #[doc = "The source account would not survive the transfer and it needs to stay alive."] - WouldDie, - #[codec(index = 12)] - #[doc = "The asset-account already exists."] - AlreadyExists, - #[codec(index = 13)] - #[doc = "The asset-account doesn't have an associated deposit."] - NoDeposit, - #[codec(index = 14)] - #[doc = "The operation would result in funds being burned."] - WouldBurn, - #[codec(index = 15)] - #[doc = "The asset is a live asset and is actively being used. Usually emit for operations such"] - #[doc = "as `start_destroy` which require the asset to be in a destroying state."] - LiveAsset, - #[codec(index = 16)] - #[doc = "The asset is not live, and likely being destroyed."] - AssetNotLive, - #[codec(index = 17)] - #[doc = "The asset status is not the expected status."] - IncorrectStatus, - #[codec(index = 18)] - #[doc = "The asset should be frozen before the given operation."] - NotFrozen, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Some asset class was created."] - Created { - asset_id: ::core::primitive::u32, - creator: ::subxt::utils::AccountId32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 1)] - #[doc = "Some assets were issued."] - Issued { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - total_supply: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Some assets were transferred."] - Transferred { - asset_id: ::core::primitive::u32, - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "Some assets were destroyed."] - Burned { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - balance: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "The management team changed."] - TeamChanged { - asset_id: ::core::primitive::u32, - issuer: ::subxt::utils::AccountId32, - admin: ::subxt::utils::AccountId32, - freezer: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "The owner changed."] - OwnerChanged { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 6)] - #[doc = "Some account `who` was frozen."] - Frozen { - asset_id: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - }, - #[codec(index = 7)] - #[doc = "Some account `who` was thawed."] - Thawed { - asset_id: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - }, - #[codec(index = 8)] - #[doc = "Some asset `asset_id` was frozen."] - AssetFrozen { asset_id: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "Some asset `asset_id` was thawed."] - AssetThawed { asset_id: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "Accounts were destroyed for given asset."] - AccountsDestroyed { - asset_id: ::core::primitive::u32, - accounts_destroyed: ::core::primitive::u32, - accounts_remaining: ::core::primitive::u32, - }, - #[codec(index = 11)] - #[doc = "Approvals were destroyed for given asset."] - ApprovalsDestroyed { - asset_id: ::core::primitive::u32, - approvals_destroyed: ::core::primitive::u32, - approvals_remaining: ::core::primitive::u32, - }, - #[codec(index = 12)] - #[doc = "An asset class is in the process of being destroyed."] - DestructionStarted { asset_id: ::core::primitive::u32 }, - #[codec(index = 13)] - #[doc = "An asset class was destroyed."] - Destroyed { asset_id: ::core::primitive::u32 }, - #[codec(index = 14)] - #[doc = "Some asset class was force-created."] - ForceCreated { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 15)] - #[doc = "New metadata has been set for an asset."] - MetadataSet { - asset_id: ::core::primitive::u32, - name: ::std::vec::Vec<::core::primitive::u8>, - symbol: ::std::vec::Vec<::core::primitive::u8>, - decimals: ::core::primitive::u8, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 16)] - #[doc = "Metadata has been cleared for an asset."] - MetadataCleared { asset_id: ::core::primitive::u32 }, - #[codec(index = 17)] - #[doc = "(Additional) funds have been approved for transfer to a destination account."] - ApprovedTransfer { - asset_id: ::core::primitive::u32, - source: ::subxt::utils::AccountId32, - delegate: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 18)] - #[doc = "An approval for account `delegate` was cancelled by `owner`."] - ApprovalCancelled { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - delegate: ::subxt::utils::AccountId32, - }, - #[codec(index = 19)] - #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] - #[doc = "the approved `delegate`."] - TransferredApproved { - asset_id: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - delegate: ::subxt::utils::AccountId32, - destination: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 20)] - #[doc = "An asset has had its attributes changed by the `Force` origin."] - AssetStatusChanged { asset_id: ::core::primitive::u32 }, - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Approval<_0, _1> { - pub amount: _0, - pub deposit: _0, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetAccount<_0, _1, _2> { - pub balance: _0, - pub is_frozen: ::core::primitive::bool, - pub reason: runtime_types::pallet_assets::types::ExistenceReason<_0>, - pub extra: _2, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetDetails<_0, _1, _2> { - pub owner: _1, - pub issuer: _1, - pub admin: _1, - pub freezer: _1, - pub supply: _0, - pub deposit: _0, - pub min_balance: _0, - pub is_sufficient: ::core::primitive::bool, - pub accounts: ::core::primitive::u32, - pub sufficients: ::core::primitive::u32, - pub approvals: ::core::primitive::u32, - pub status: runtime_types::pallet_assets::types::AssetStatus, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AssetMetadata<_0, _1> { - pub deposit: _0, - pub name: _1, - pub symbol: _1, - pub decimals: ::core::primitive::u8, - pub is_frozen: ::core::primitive::bool, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AssetStatus { - #[codec(index = 0)] - Live, - #[codec(index = 1)] - Frozen, - #[codec(index = 2)] - Destroying, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ExistenceReason<_0> { - #[codec(index = 0)] - Consumer, - #[codec(index = 1)] - Sufficient, - #[codec(index = 2)] - DepositHeld(_0), - #[codec(index = 3)] - DepositRefunded, - } - } - } - pub mod pallet_authorship { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Provide a set of uncles."] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The uncle parent not in the chain."] - InvalidUncleParent, - #[codec(index = 1)] - #[doc = "Uncles already set in the block."] - UnclesAlreadySet, - #[codec(index = 2)] - #[doc = "Too many uncles."] - TooManyUncles, - #[codec(index = 3)] - #[doc = "The uncle is genesis."] - GenesisUncle, - #[codec(index = 4)] - #[doc = "The uncle is too high in chain."] - TooHighUncle, - #[codec(index = 5)] - #[doc = "The uncle is already included."] - UncleAlreadyIncluded, - #[codec(index = 6)] - #[doc = "The uncle isn't recent enough to be included."] - OldUncle, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), - } - } - pub mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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 :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public > > , key_owner_proof : runtime_types :: sp_session :: MembershipProof , } , # [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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub misc_frozen: _0, - pub fee_frozen: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BalanceLock<_0> { - pub id: [::core::primitive::u8; 8usize], - pub amount: _0, - pub reasons: runtime_types::pallet_balances::Reasons, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Reasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, - } - } - pub mod pallet_bounties { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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_child_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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a new child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of parent"] - #[doc = "bounty and the parent bounty must be in \"active\" state."] - #[doc = ""] - #[doc = "Child-bounty gets added successfully & fund gets transferred from"] - #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] - #[doc = "funds, else the call fails."] - #[doc = ""] - #[doc = "Upper bound to maximum number of active child bounties that can be"] - #[doc = "added are managed via runtime trait config"] - #[doc = "[`Config::MaxActiveChildBountyCount`]."] - #[doc = ""] - #[doc = "If the call is success, the status of child-bounty is updated to"] - #[doc = "\"Added\"."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] - #[doc = "- `value`: Value for executing the proposal."] - #[doc = "- `description`: Text description for the child-bounty."] - add_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Propose curator for funded child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be curator of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `curator`: Address of child-bounty curator."] - #[doc = "- `fee`: payment fee to child-bounty curator for execution."] - propose_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - curator: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "Accept the curator role for the child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the curator of this"] - #[doc = "child-bounty."] - #[doc = ""] - #[doc = "A deposit will be reserved from the curator and refund upon"] - #[doc = "successful payout or cancellation."] - #[doc = ""] - #[doc = "Fee for curator is deducted from curator fee of parent bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] - #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - accept_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 3)] - #[doc = "Unassign curator from a child-bounty."] - #[doc = ""] - #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] - #[doc = "the curator of the parent bounty, or any signed origin."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] - #[doc = "curator, parent bounty must be in active state, for this call to"] - #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] - #[doc = "this call irrespective of the parent bounty state."] - #[doc = ""] - #[doc = "If this function is called by the `RejectOrigin` or the"] - #[doc = "parent bounty curator, we assume that the child-bounty curator is"] - #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] - #[doc = "slashed."] - #[doc = ""] - #[doc = "If the origin is the child-bounty curator, we take this as a sign"] - #[doc = "that they are unable to do their job, and are willingly giving up."] - #[doc = "We could slash the deposit, but for now we allow them to unreserve"] - #[doc = "their deposit and exit without issue. (We may want to change this if"] - #[doc = "it is abused.)"] - #[doc = ""] - #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] - #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] - #[doc = "inactive state of child-bounty curator."] - #[doc = ""] - #[doc = "This allows anyone in the community to call out that a child-bounty"] - #[doc = "curator is not doing their due diligence, and we should pick a new"] - #[doc = "one. In this case the child-bounty curator deposit is slashed."] - #[doc = ""] - #[doc = "State of child-bounty is moved to Added state on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - unassign_curator { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "Award child-bounty to a beneficiary."] - #[doc = ""] - #[doc = "The beneficiary will be able to claim the funds after a delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be the parent curator or"] - #[doc = "curator of this child-bounty."] - #[doc = ""] - #[doc = "Parent bounty must be in active state, for this child-bounty call to"] - #[doc = "work."] - #[doc = ""] - #[doc = "Child-bounty must be in active state, for processing the call. And"] - #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] - #[doc = "completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - #[doc = "- `beneficiary`: Beneficiary account."] - award_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 5)] - #[doc = "Claim the payout from an awarded child-bounty after payout delay."] - #[doc = ""] - #[doc = "The dispatch origin for this call may be any signed origin."] - #[doc = ""] - #[doc = "Call works independent of parent bounty state, No need for parent"] - #[doc = "bounty to be in active state."] - #[doc = ""] - #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] - #[doc = "paid & curator deposit is unreserved."] - #[doc = ""] - #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] - #[doc = "call. And instance of child-bounty is removed from the state on"] - #[doc = "successful call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - claim_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] - #[doc = "are transferred to parent bounty account. The child-bounty curator"] - #[doc = "deposit may be unreserved if possible."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be either parent curator or"] - #[doc = "`T::RejectOrigin`."] - #[doc = ""] - #[doc = "If the state of child-bounty is `Active`, curator deposit is"] - #[doc = "unreserved."] - #[doc = ""] - #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] - #[doc = "returns `PendingPayout` error."] - #[doc = ""] - #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] - #[doc = "active state, for this child-bounty call to work. For origin"] - #[doc = "T::RejectOrigin execution is forced."] - #[doc = ""] - #[doc = "Instance of child-bounty is removed from the state on successful"] - #[doc = "call completion."] - #[doc = ""] - #[doc = "- `parent_bounty_id`: Index of parent bounty."] - #[doc = "- `child_bounty_id`: Index of child bounty."] - close_child_bounty { - #[codec(compact)] - parent_bounty_id: ::core::primitive::u32, - #[codec(compact)] - child_bounty_id: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 parent bounty is not in active state."] - ParentBountyNotActive, - #[codec(index = 1)] - #[doc = "The bounty balance is not enough to add new child-bounty."] - InsufficientBountyBalance, - #[codec(index = 2)] - #[doc = "Number of child bounties exceeds limit `MaxActiveChildBountyCount`."] - TooManyChildBounties, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 child-bounty is added."] - Added { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "A child-bounty is awarded to a beneficiary."] - Awarded { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 2)] - #[doc = "A child-bounty is claimed by beneficiary."] - Claimed { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - payout: ::core::primitive::u128, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 3)] - #[doc = "A child-bounty is cancelled."] - Canceled { - index: ::core::primitive::u32, - child_index: ::core::primitive::u32, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ChildBounty<_0, _1, _2> { - pub parent_bounty: _2, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub status: - runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ChildBountyStatus<_0, _1> { - #[codec(index = 0)] - Added, - #[codec(index = 1)] - CuratorProposed { curator: _0 }, - #[codec(index = 2)] - Active { curator: _0 }, - #[codec(index = 3)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, - } - } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), - #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, - } - } - pub mod pallet_contracts { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Deprecated version if [`Self::call`] for use in an in-storage `Call`."] - call_old_weight { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - #[codec(compact)] - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - data: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - #[doc = "Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`."] - instantiate_with_code_old_weight { - #[codec(compact)] - value: ::core::primitive::u128, - #[codec(compact)] - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code: ::std::vec::Vec<::core::primitive::u8>, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 2)] - #[doc = "Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`."] - instantiate_old_weight { - #[codec(compact)] - value: ::core::primitive::u128, - #[codec(compact)] - gas_limit: runtime_types::sp_weights::OldWeight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code_hash: ::subxt::utils::H256, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 3)] - #[doc = "Upload new `code` without instantiating a contract from it."] - #[doc = ""] - #[doc = "If the code does not already exist a deposit is reserved from the caller"] - #[doc = "and unreserved only when [`Self::remove_code`] is called. The size of the reserve"] - #[doc = "depends on the instrumented size of the the supplied `code`."] - #[doc = ""] - #[doc = "If the code already exists in storage it will still return `Ok` and upgrades"] - #[doc = "the in storage version to the current"] - #[doc = "[`InstructionWeights::version`](InstructionWeights)."] - #[doc = ""] - #[doc = "- `determinism`: If this is set to any other value but [`Determinism::Deterministic`]"] - #[doc = " then the only way to use this code is to delegate call into it from an offchain"] - #[doc = " execution. Set to [`Determinism::Deterministic`] if in doubt."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "Anyone can instantiate a contract from any uploaded code and thus prevent its removal."] - #[doc = "To avoid this situation a constructor could employ access control so that it can"] - #[doc = "only be instantiated by permissioned entities. The same is true when uploading"] - #[doc = "through [`Self::instantiate_with_code`]."] - upload_code { - code: ::std::vec::Vec<::core::primitive::u8>, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - determinism: runtime_types::pallet_contracts::wasm::Determinism, - }, - #[codec(index = 4)] - #[doc = "Remove the code stored under `code_hash` and refund the deposit to its owner."] - #[doc = ""] - #[doc = "A code can only be removed by its original uploader (its owner) and only if it is"] - #[doc = "not used by any contract."] - remove_code { code_hash: ::subxt::utils::H256 }, - #[codec(index = 5)] - #[doc = "Privileged function that changes the code of an existing contract."] - #[doc = ""] - #[doc = "This takes care of updating refcounts and all other necessary operations. Returns"] - #[doc = "an error if either the `code_hash` or `dest` do not exist."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "This does **not** change the address of the contract in question. This means"] - #[doc = "that the contract address is no longer derived from its code hash after calling"] - #[doc = "this dispatchable."] - set_code { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - code_hash: ::subxt::utils::H256, - }, - #[codec(index = 6)] - #[doc = "Makes a call to an account, optionally transferring some balance."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `dest`: Address of the contract to call."] - #[doc = "* `value`: The balance to transfer from the `origin` to `dest`."] - #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] - #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the"] - #[doc = " caller to pay for the storage consumed."] - #[doc = "* `data`: The input data to pass to the contract."] - #[doc = ""] - #[doc = "* If the account is a smart-contract account, the associated code will be"] - #[doc = "executed and any value will be transferred."] - #[doc = "* If the account is a regular account, any value will be transferred."] - #[doc = "* If no account exists and the call value is not less than `existential_deposit`,"] - #[doc = "a regular account will be created and any value will be transferred."] - call { - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - #[codec(compact)] - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - data: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 7)] - #[doc = "Instantiates a new contract from the supplied `code` optionally transferring"] - #[doc = "some balance."] - #[doc = ""] - #[doc = "This dispatchable has the same effect as calling [`Self::upload_code`] +"] - #[doc = "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please"] - #[doc = "also check the documentation of [`Self::upload_code`]."] - #[doc = ""] - #[doc = "# Parameters"] - #[doc = ""] - #[doc = "* `value`: The balance to transfer from the `origin` to the newly created contract."] - #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."] - #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved"] - #[doc = " from the caller to pay for the storage consumed."] - #[doc = "* `code`: The contract code to deploy in raw bytes."] - #[doc = "* `data`: The input data to pass to the contract constructor."] - #[doc = "* `salt`: Used for the address derivation. See [`Pallet::contract_address`]."] - #[doc = ""] - #[doc = "Instantiation is executed as follows:"] - #[doc = ""] - #[doc = "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that"] - #[doc = " code."] - #[doc = "- If the `code_hash` already exists on the chain the underlying `code` will be shared."] - #[doc = "- The destination address is computed based on the sender, code_hash and the salt."] - #[doc = "- The smart-contract account is created at the computed address."] - #[doc = "- The `value` is transferred to the new account."] - #[doc = "- The `deploy` function is executed in the context of the newly-created account."] - instantiate_with_code { - #[codec(compact)] - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code: ::std::vec::Vec<::core::primitive::u8>, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 8)] - #[doc = "Instantiates a contract from a previously deployed wasm binary."] - #[doc = ""] - #[doc = "This function is identical to [`Self::instantiate_with_code`] but without the"] - #[doc = "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary"] - #[doc = "must be supplied."] - instantiate { - #[codec(compact)] - value: ::core::primitive::u128, - gas_limit: runtime_types::sp_weights::weight_v2::Weight, - storage_deposit_limit: ::core::option::Option< - ::subxt::ext::codec::Compact<::core::primitive::u128>, - >, - code_hash: ::subxt::utils::H256, - data: ::std::vec::Vec<::core::primitive::u8>, - salt: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 new schedule must have a greater version than the current one."] - InvalidScheduleVersion, - #[codec(index = 1)] - #[doc = "Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`."] - InvalidCallFlags, - #[codec(index = 2)] - #[doc = "The executed contract exhausted its gas limit."] - OutOfGas, - #[codec(index = 3)] - #[doc = "The output buffer supplied to a contract API call was too small."] - OutputBufferTooSmall, - #[codec(index = 4)] - #[doc = "Performing the requested transfer failed. Probably because there isn't enough"] - #[doc = "free balance in the sender's account."] - TransferFailed, - #[codec(index = 5)] - #[doc = "Performing a call was denied because the calling depth reached the limit"] - #[doc = "of what is specified in the schedule."] - MaxCallDepthReached, - #[codec(index = 6)] - #[doc = "No contract was found at the specified address."] - ContractNotFound, - #[codec(index = 7)] - #[doc = "The code supplied to `instantiate_with_code` exceeds the limit specified in the"] - #[doc = "current schedule."] - CodeTooLarge, - #[codec(index = 8)] - #[doc = "No code could be found at the supplied code hash."] - CodeNotFound, - #[codec(index = 9)] - #[doc = "A buffer outside of sandbox memory was passed to a contract API function."] - OutOfBounds, - #[codec(index = 10)] - #[doc = "Input passed to a contract API function failed to decode as expected type."] - DecodingFailed, - #[codec(index = 11)] - #[doc = "Contract trapped during execution."] - ContractTrapped, - #[codec(index = 12)] - #[doc = "The size defined in `T::MaxValueSize` was exceeded."] - ValueTooLarge, - #[codec(index = 13)] - #[doc = "Termination of a contract is not allowed while the contract is already"] - #[doc = "on the call stack. Can be triggered by `seal_terminate`."] - TerminatedWhileReentrant, - #[codec(index = 14)] - #[doc = "`seal_call` forwarded this contracts input. It therefore is no longer available."] - InputForwarded, - #[codec(index = 15)] - #[doc = "The subject passed to `seal_random` exceeds the limit."] - RandomSubjectTooLong, - #[codec(index = 16)] - #[doc = "The amount of topics passed to `seal_deposit_events` exceeds the limit."] - TooManyTopics, - #[codec(index = 17)] - #[doc = "The chain does not provide a chain extension. Calling the chain extension results"] - #[doc = "in this error. Note that this usually shouldn't happen as deploying such contracts"] - #[doc = "is rejected."] - NoChainExtension, - #[codec(index = 18)] - #[doc = "Removal of a contract failed because the deletion queue is full."] - #[doc = ""] - #[doc = "This can happen when calling `seal_terminate`."] - #[doc = "The queue is filled by deleting contracts and emptied by a fixed amount each block."] - #[doc = "Trying again during another block is the only way to resolve this issue."] - DeletionQueueFull, - #[codec(index = 19)] - #[doc = "A contract with the same AccountId already exists."] - DuplicateContract, - #[codec(index = 20)] - #[doc = "A contract self destructed in its constructor."] - #[doc = ""] - #[doc = "This can be triggered by a call to `seal_terminate`."] - TerminatedInConstructor, - #[codec(index = 21)] - #[doc = "The debug message specified to `seal_debug_message` does contain invalid UTF-8."] - DebugMessageInvalidUTF8, - #[codec(index = 22)] - #[doc = "A call tried to invoke a contract that is flagged as non-reentrant."] - ReentranceDenied, - #[codec(index = 23)] - #[doc = "Origin doesn't have enough balance to pay the required storage deposits."] - StorageDepositNotEnoughFunds, - #[codec(index = 24)] - #[doc = "More storage was created than allowed by the storage deposit limit."] - StorageDepositLimitExhausted, - #[codec(index = 25)] - #[doc = "Code removal was denied because the code is still in use by at least one contract."] - CodeInUse, - #[codec(index = 26)] - #[doc = "The contract ran to completion but decided to revert its storage changes."] - #[doc = "Please note that this error is only returned from extrinsics. When called directly"] - #[doc = "or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags"] - #[doc = "to determine whether a reversion has taken place."] - ContractReverted, - #[codec(index = 27)] - #[doc = "The contract's code was found to be invalid during validation or instrumentation."] - #[doc = ""] - #[doc = "The most likely cause of this is that an API was used which is not supported by the"] - #[doc = "node. This hapens if an older node is used with a new version of ink!. Try updating"] - #[doc = "your node to the newest available version."] - #[doc = ""] - #[doc = "A more detailed error can be found on the node console if debug messages are enabled"] - #[doc = "by supplying `-lruntime::contracts=debug`."] - CodeRejected, - #[codec(index = 28)] - #[doc = "An indetermistic code was used in a context where this is not permitted."] - Indeterministic, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Contract deployed by address at the specified address."] - Instantiated { - deployer: ::subxt::utils::AccountId32, - contract: ::subxt::utils::AccountId32, - }, - #[codec(index = 1)] - #[doc = "Contract has been removed."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "The only way for a contract to be removed and emitting this event is by calling"] - #[doc = "`seal_terminate`."] - Terminated { - contract: ::subxt::utils::AccountId32, - beneficiary: ::subxt::utils::AccountId32, - }, - #[codec(index = 2)] - #[doc = "Code with the specified hash has been stored."] - CodeStored { code_hash: ::subxt::utils::H256 }, - #[codec(index = 3)] - #[doc = "A custom event emitted by the contract."] - ContractEmitted { - contract: ::subxt::utils::AccountId32, - data: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - #[doc = "A code with the specified hash was removed."] - CodeRemoved { code_hash: ::subxt::utils::H256 }, - #[codec(index = 5)] - #[doc = "A contract's code was updated."] - ContractCodeUpdated { - contract: ::subxt::utils::AccountId32, - new_code_hash: ::subxt::utils::H256, - old_code_hash: ::subxt::utils::H256, - }, - #[codec(index = 6)] - #[doc = "A contract was called either by a plain account or another contract."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "Please keep in mind that like all events this is only emitted for successful"] - #[doc = "calls. This is because on failure all storage changes including events are"] - #[doc = "rolled back."] - Called { - caller: ::subxt::utils::AccountId32, - contract: ::subxt::utils::AccountId32, - }, - #[codec(index = 7)] - #[doc = "A contract delegate called a code hash."] - #[doc = ""] - #[doc = "# Note"] - #[doc = ""] - #[doc = "Please keep in mind that like all events this is only emitted for successful"] - #[doc = "calls. This is because on failure all storage changes including events are"] - #[doc = "rolled back."] - DelegateCalled { - contract: ::subxt::utils::AccountId32, - code_hash: ::subxt::utils::H256, - }, - } - } - pub mod schedule { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct HostFnWeights { - pub caller: ::core::primitive::u64, - pub is_contract: ::core::primitive::u64, - pub code_hash: ::core::primitive::u64, - pub own_code_hash: ::core::primitive::u64, - pub caller_is_origin: ::core::primitive::u64, - pub address: ::core::primitive::u64, - pub gas_left: ::core::primitive::u64, - pub balance: ::core::primitive::u64, - pub value_transferred: ::core::primitive::u64, - pub minimum_balance: ::core::primitive::u64, - pub block_number: ::core::primitive::u64, - pub now: ::core::primitive::u64, - pub weight_to_fee: ::core::primitive::u64, - pub gas: ::core::primitive::u64, - pub input: ::core::primitive::u64, - pub input_per_byte: ::core::primitive::u64, - pub r#return: ::core::primitive::u64, - pub return_per_byte: ::core::primitive::u64, - pub terminate: ::core::primitive::u64, - pub random: ::core::primitive::u64, - pub deposit_event: ::core::primitive::u64, - pub deposit_event_per_topic: ::core::primitive::u64, - pub deposit_event_per_byte: ::core::primitive::u64, - pub debug_message: ::core::primitive::u64, - pub set_storage: ::core::primitive::u64, - pub set_storage_per_new_byte: ::core::primitive::u64, - pub set_storage_per_old_byte: ::core::primitive::u64, - pub set_code_hash: ::core::primitive::u64, - pub clear_storage: ::core::primitive::u64, - pub clear_storage_per_byte: ::core::primitive::u64, - pub contains_storage: ::core::primitive::u64, - pub contains_storage_per_byte: ::core::primitive::u64, - pub get_storage: ::core::primitive::u64, - pub get_storage_per_byte: ::core::primitive::u64, - pub take_storage: ::core::primitive::u64, - pub take_storage_per_byte: ::core::primitive::u64, - pub transfer: ::core::primitive::u64, - pub call: ::core::primitive::u64, - pub delegate_call: ::core::primitive::u64, - pub call_transfer_surcharge: ::core::primitive::u64, - pub call_per_cloned_byte: ::core::primitive::u64, - pub instantiate: ::core::primitive::u64, - pub instantiate_transfer_surcharge: ::core::primitive::u64, - pub instantiate_per_input_byte: ::core::primitive::u64, - pub instantiate_per_salt_byte: ::core::primitive::u64, - pub hash_sha2_256: ::core::primitive::u64, - pub hash_sha2_256_per_byte: ::core::primitive::u64, - pub hash_keccak_256: ::core::primitive::u64, - pub hash_keccak_256_per_byte: ::core::primitive::u64, - pub hash_blake2_256: ::core::primitive::u64, - pub hash_blake2_256_per_byte: ::core::primitive::u64, - pub hash_blake2_128: ::core::primitive::u64, - pub hash_blake2_128_per_byte: ::core::primitive::u64, - pub ecdsa_recover: ::core::primitive::u64, - pub ecdsa_to_eth_address: ::core::primitive::u64, - pub reentrance_count: ::core::primitive::u64, - pub account_reentrance_count: ::core::primitive::u64, - pub instantiation_nonce: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct InstructionWeights { - pub version: ::core::primitive::u32, - pub fallback: ::core::primitive::u32, - pub i64const: ::core::primitive::u32, - pub i64load: ::core::primitive::u32, - pub i64store: ::core::primitive::u32, - pub select: ::core::primitive::u32, - pub r#if: ::core::primitive::u32, - pub br: ::core::primitive::u32, - pub br_if: ::core::primitive::u32, - pub br_table: ::core::primitive::u32, - pub br_table_per_entry: ::core::primitive::u32, - pub call: ::core::primitive::u32, - pub call_indirect: ::core::primitive::u32, - pub call_indirect_per_param: ::core::primitive::u32, - pub call_per_local: ::core::primitive::u32, - pub local_get: ::core::primitive::u32, - pub local_set: ::core::primitive::u32, - pub local_tee: ::core::primitive::u32, - pub global_get: ::core::primitive::u32, - pub global_set: ::core::primitive::u32, - pub memory_current: ::core::primitive::u32, - pub memory_grow: ::core::primitive::u32, - pub i64clz: ::core::primitive::u32, - pub i64ctz: ::core::primitive::u32, - pub i64popcnt: ::core::primitive::u32, - pub i64eqz: ::core::primitive::u32, - pub i64extendsi32: ::core::primitive::u32, - pub i64extendui32: ::core::primitive::u32, - pub i32wrapi64: ::core::primitive::u32, - pub i64eq: ::core::primitive::u32, - pub i64ne: ::core::primitive::u32, - pub i64lts: ::core::primitive::u32, - pub i64ltu: ::core::primitive::u32, - pub i64gts: ::core::primitive::u32, - pub i64gtu: ::core::primitive::u32, - pub i64les: ::core::primitive::u32, - pub i64leu: ::core::primitive::u32, - pub i64ges: ::core::primitive::u32, - pub i64geu: ::core::primitive::u32, - pub i64add: ::core::primitive::u32, - pub i64sub: ::core::primitive::u32, - pub i64mul: ::core::primitive::u32, - pub i64divs: ::core::primitive::u32, - pub i64divu: ::core::primitive::u32, - pub i64rems: ::core::primitive::u32, - pub i64remu: ::core::primitive::u32, - pub i64and: ::core::primitive::u32, - pub i64or: ::core::primitive::u32, - pub i64xor: ::core::primitive::u32, - pub i64shl: ::core::primitive::u32, - pub i64shrs: ::core::primitive::u32, - pub i64shru: ::core::primitive::u32, - pub i64rotl: ::core::primitive::u32, - pub i64rotr: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Limits { - pub event_topics: ::core::primitive::u32, - pub globals: ::core::primitive::u32, - pub locals: ::core::primitive::u32, - pub parameters: ::core::primitive::u32, - pub memory_pages: ::core::primitive::u32, - pub table_size: ::core::primitive::u32, - pub br_table_size: ::core::primitive::u32, - pub subject_len: ::core::primitive::u32, - pub call_depth: ::core::primitive::u32, - pub payload_len: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Schedule { - pub limits: runtime_types::pallet_contracts::schedule::Limits, - pub instruction_weights: - runtime_types::pallet_contracts::schedule::InstructionWeights, - pub host_fn_weights: - runtime_types::pallet_contracts::schedule::HostFnWeights, - } - } - pub mod storage { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ContractInfo { - pub trie_id: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub code_hash: ::subxt::utils::H256, - pub storage_bytes: ::core::primitive::u32, - pub storage_items: ::core::primitive::u32, - pub storage_byte_deposit: ::core::primitive::u128, - pub storage_item_deposit: ::core::primitive::u128, - pub storage_base_deposit: ::core::primitive::u128, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DeletedContract { - pub trie_id: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - } - pub mod wasm { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Determinism { - #[codec(index = 0)] - Deterministic, - #[codec(index = 1)] - AllowIndeterminism, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OwnerInfo { - pub owner: ::subxt::utils::AccountId32, - #[codec(compact)] - pub deposit: ::core::primitive::u128, - #[codec(compact)] - pub refcount: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PrefabWasmModule { - #[codec(compact)] - pub instruction_weights_version: ::core::primitive::u32, - #[codec(compact)] - pub initial: ::core::primitive::u32, - #[codec(compact)] - pub maximum: ::core::primitive::u32, - pub code: - runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec< - ::core::primitive::u8, - >, - pub determinism: runtime_types::pallet_contracts::wasm::Determinism, - } - } - } - pub mod pallet_conviction_voting { - use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;"] # [doc = "otherwise it is a vote to keep the status quo."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `poll_index`: The index of the poll to vote for."] # [doc = "- `vote`: The vote configuration."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter has voted on."] vote { # [codec (compact)] poll_index : :: core :: primitive :: u32 , vote : runtime_types :: pallet_conviction_voting :: vote :: AccountVote < :: core :: primitive :: u128 > , } , # [codec (index = 1)] # [doc = "Delegate the voting power (with some given conviction) of the sending account for a"] # [doc = "particular class of polls."] # [doc = ""] # [doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] # [doc = "time appropriate for the conviction's lock period."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] # [doc = " - be delegating already; or"] # [doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] # [doc = " through `reap_vote` or `unvote`)."] # [doc = ""] # [doc = "- `to`: The account whose voting the `target` account's voting power will follow."] # [doc = "- `class`: The class of polls to delegate. To delegate multiple classes, multiple calls"] # [doc = " to this function are required."] # [doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] # [doc = " account is undelegated, the funds will be locked for the corresponding period."] # [doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] # [doc = " be more than the account's current balance."] # [doc = ""] # [doc = "Emits `Delegated`."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] # [doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] delegate { class : :: core :: primitive :: u16 , to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , conviction : runtime_types :: pallet_conviction_voting :: conviction :: Conviction , balance : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "Undelegate the voting power of the sending account for a particular class of polls."] # [doc = ""] # [doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] # [doc = "of the conviction with which the delegation was issued has passed."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] # [doc = "currently delegating."] # [doc = ""] # [doc = "- `class`: The class of polls to remove the delegation from."] # [doc = ""] # [doc = "Emits `Undelegated`."] # [doc = ""] # [doc = "Weight: `O(R)` where R is the number of polls the voter delegating to has"] # [doc = " voted on. Weight is initially charged as if maximum votes, but is refunded later."] undelegate { class : :: core :: primitive :: u16 , } , # [codec (index = 3)] # [doc = "Remove the lock caused by prior voting/delegating which has expired within a particular"] # [doc = "class."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `class`: The class of polls to unlock."] # [doc = "- `target`: The account to remove the lock on."] # [doc = ""] # [doc = "Weight: `O(R)` with R number of vote of target."] unlock { class : :: core :: primitive :: u16 , target : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 4)] # [doc = "Remove a vote for a poll."] # [doc = ""] # [doc = "If:"] # [doc = "- the poll was cancelled, or"] # [doc = "- the poll is ongoing, or"] # [doc = "- the poll has ended such that"] # [doc = " - the vote of the account was in opposition to the result; or"] # [doc = " - there was no conviction to the account's vote; or"] # [doc = " - the account made a split vote"] # [doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] # [doc = "funds being available."] # [doc = ""] # [doc = "If, however, the poll has ended and:"] # [doc = "- it finished corresponding to the vote of the account, and"] # [doc = "- the account made a standard vote with conviction, and"] # [doc = "- the lock period of the conviction is not over"] # [doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] # [doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] # [doc = "of both the amount locked and the time is it locked for)."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] # [doc = "registered for poll `index`."] # [doc = ""] # [doc = "- `index`: The index of poll of the vote to be removed."] # [doc = "- `class`: Optional parameter, if given it indicates the class of the poll. For polls"] # [doc = " which have finished or are cancelled, this must be `Some`."] # [doc = ""] # [doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] # [doc = " Weight is calculated for the maximum number of vote."] remove_vote { class : :: core :: option :: Option < :: core :: primitive :: u16 > , index : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Remove a vote for a poll."] # [doc = ""] # [doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] # [doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] # [doc = "either because the poll was cancelled, because the voter lost the poll or"] # [doc = "because the conviction period is over."] # [doc = ""] # [doc = "The dispatch origin of this call must be _Signed_."] # [doc = ""] # [doc = "- `target`: The account of the vote to be removed; this account must have voted for poll"] # [doc = " `index`."] # [doc = "- `index`: The index of poll of the vote to be removed."] # [doc = "- `class`: The class of the poll."] # [doc = ""] # [doc = "Weight: `O(R + log R)` where R is the number of polls that `target` has voted on."] # [doc = " Weight is calculated for the maximum number of vote."] remove_other_vote { target : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , class : :: core :: primitive :: u16 , index : :: core :: primitive :: u32 , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Poll is not ongoing."] - NotOngoing, - #[codec(index = 1)] - #[doc = "The given account did not vote on the poll."] - NotVoter, - #[codec(index = 2)] - #[doc = "The actor has no permission to conduct the action."] - NoPermission, - #[codec(index = 3)] - #[doc = "The actor has no permission to conduct the action right now but will do in the future."] - NoPermissionYet, - #[codec(index = 4)] - #[doc = "The account is already delegating."] - AlreadyDelegating, - #[codec(index = 5)] - #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] - #[doc = "these are removed, either through `unvote` or `reap_vote`."] - AlreadyVoting, - #[codec(index = 6)] - #[doc = "Too high a balance was provided that the account cannot afford."] - InsufficientFunds, - #[codec(index = 7)] - #[doc = "The account is not currently delegating."] - NotDelegating, - #[codec(index = 8)] - #[doc = "Delegation to oneself makes no sense."] - Nonsense, - #[codec(index = 9)] - #[doc = "Maximum number of votes reached."] - MaxVotesReached, - #[codec(index = 10)] - #[doc = "The class must be supplied since it is not easily determinable from the state."] - ClassNeeded, - #[codec(index = 11)] - #[doc = "The class ID supplied is invalid."] - BadClass, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "An account has delegated their vote to another account. \\[who, target\\]"] - Delegated(::subxt::utils::AccountId32, ::subxt::utils::AccountId32), - #[codec(index = 1)] - #[doc = "An \\[account\\] has cancelled a previous delegation operation."] - Undelegated(::subxt::utils::AccountId32), - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub support: _0, - } - } - pub mod vote { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_conviction_voting::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - #[codec(index = 2)] - SplitAbstain { aye: _0, nay: _0, abstain: _0 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Casting<_0, _1, _2> { - pub votes: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - _1, - runtime_types::pallet_conviction_voting::vote::AccountVote< - _0, - >, - )>, - pub delegations: - runtime_types::pallet_conviction_voting::types::Delegations<_0>, - pub prior: - runtime_types::pallet_conviction_voting::vote::PriorLock<_1, _0>, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegating<_0, _1, _2> { - pub balance: _0, - pub target: _1, - pub conviction: - runtime_types::pallet_conviction_voting::conviction::Conviction, - pub delegations: - runtime_types::pallet_conviction_voting::types::Delegations<_0>, - pub prior: - runtime_types::pallet_conviction_voting::vote::PriorLock<_2, _0>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote(pub ::core::primitive::u8); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Voting<_0, _1, _2, _3> { - #[codec(index = 0)] - Casting( - runtime_types::pallet_conviction_voting::vote::Casting< - _0, - _2, - _2, - >, - ), - #[codec(index = 1)] - Delegating( - runtime_types::pallet_conviction_voting::vote::Delegating< - _0, - _1, - _2, - >, - ), - __Ignore(::core::marker::PhantomData<_3>), - } - } - } - pub mod pallet_democracy { - use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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::kitchensink_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::kitchensink_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::kitchensink_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::kitchensink_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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_democracy::types::ReferendumStatus< - _0, - _1, - _2, - >, - ), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal: _1, - pub threshold: - runtime_types::pallet_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::pallet_democracy::types::Tally<_2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, - } - } - pub mod vote { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::pallet_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Vote(pub ::core::primitive::u8); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Voting<_0, _1, _2> { - #[codec(index = 0)] - Direct { - votes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - (_2, runtime_types::pallet_democracy::vote::AccountVote<_0>), - >, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: - runtime_types::pallet_democracy::conviction::Conviction, - delegations: - runtime_types::pallet_democracy::types::Delegations<_0>, - prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, - }, - } - } - pub mod vote_threshold { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VoteThreshold { - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "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 :: kitchensink_runtime :: 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 :: kitchensink_runtime :: 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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - } - pub mod pallet_fast_unstake { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Register oneself for fast-unstake."] - #[doc = ""] - #[doc = "The dispatch origin of this call must be signed by the controller account, similar to"] - #[doc = "`staking::unbond`."] - #[doc = ""] - #[doc = "The stash associated with the origin must have no ongoing unlocking chunks. If"] - #[doc = "successful, this will fully unbond and chill the stash. Then, it will enqueue the stash"] - #[doc = "to be checked in further blocks."] - #[doc = ""] - #[doc = "If by the time this is called, the stash is actually eligible for fast-unstake, then"] - #[doc = "they are guaranteed to remain eligible, because the call will chill them as well."] - #[doc = ""] - #[doc = "If the check works, the entire staking data is removed, i.e. the stash is fully"] - #[doc = "unstaked."] - #[doc = ""] - #[doc = "If the check fails, the stash remains chilled and waiting for being unbonded as in with"] - #[doc = "the normal staking system, but they lose part of their unbonding chunks due to consuming"] - #[doc = "the chain's resources."] - register_fast_unstake, - #[codec(index = 1)] - #[doc = "Deregister oneself from the fast-unstake."] - #[doc = ""] - #[doc = "This is useful if one is registered, they are still waiting, and they change their mind."] - #[doc = ""] - #[doc = "Note that the associated stash is still fully unbonded and chilled as a consequence of"] - #[doc = "calling `register_fast_unstake`. This should probably be followed by a call to"] - #[doc = "`Staking::rebond`."] - deregister, - #[codec(index = 2)] - #[doc = "Control the operation of this pallet."] - #[doc = ""] - #[doc = "Dispatch origin must be signed by the [`Config::ControlOrigin`]."] - control { - unchecked_eras_to_check: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 provided Controller account was not found."] - #[doc = ""] - #[doc = "This means that the given account is not bonded."] - NotController, - #[codec(index = 1)] - #[doc = "The bonded account has already been queued."] - AlreadyQueued, - #[codec(index = 2)] - #[doc = "The bonded account has active unlocking chunks."] - NotFullyBonded, - #[codec(index = 3)] - #[doc = "The provided un-staker is not in the `Queue`."] - NotQueued, - #[codec(index = 4)] - #[doc = "The provided un-staker is already in Head, and cannot deregister."] - AlreadyHead, - #[codec(index = 5)] - #[doc = "The call is not allowed at this point because the pallet is not active."] - CallNotAllowed, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "The events of this pallet."] - pub enum Event { - #[codec(index = 0)] - #[doc = "A staker was unstaked."] - Unstaked { - stash: ::subxt::utils::AccountId32, - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - #[doc = "A staker was slashed for requesting fast-unstake whilst being exposed."] - Slashed { - stash: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "An internal error happened. Operations will be paused now."] - InternalError, - #[codec(index = 3)] - #[doc = "A batch was partially checked for the given eras, but the process did not finish."] - BatchChecked { - eras: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 4)] - #[doc = "A batch was terminated."] - #[doc = ""] - #[doc = "This is always follows by a number of `Unstaked` or `Slashed` events, marking the end"] - #[doc = "of the batch. A new batch will be created upon next block."] - BatchFinished, - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UnstakeRequest { - pub stashes: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - (::subxt::utils::AccountId32, ::core::primitive::u128), - >, - pub checked: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u32, - >, - } - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[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_identity { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Identity pallet declaration."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Add a registrar to the system."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] - #[doc = ""] - #[doc = "- `account`: the account of the registrar."] - #[doc = ""] - #[doc = "Emits `RegistrarAdded` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] - #[doc = "- One storage mutation (codec `O(R)`)."] - #[doc = "- One event."] - #[doc = "# "] - add_registrar { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Set an account's identity information and reserve the appropriate deposit."] - #[doc = ""] - #[doc = "If the account already has identity information, the deposit is taken as part payment"] - #[doc = "for the new deposit."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `info`: The identity information."] - #[doc = ""] - #[doc = "Emits `IdentitySet` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(X + X' + R)`"] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] - #[doc = " - where `R` judgements-count (registrar-count-bounded)"] - #[doc = "- One balance reserve operation."] - #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] - #[doc = "- One event."] - #[doc = "# "] - set_identity { - info: ::std::boxed::Box< - runtime_types::pallet_identity::types::IdentityInfo, - >, - }, - #[codec(index = 2)] - #[doc = "Set the sub-accounts of the sender."] - #[doc = ""] - #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] - #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "- `subs`: The identity's (new) sub-accounts."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(P + S)`"] - #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = "- At most one balance operations."] - #[doc = "- DB:"] - #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] - #[doc = " - One storage read (codec complexity `O(P)`)."] - #[doc = " - One storage write (codec complexity `O(S)`)."] - #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] - #[doc = "# "] - set_subs { - subs: ::std::vec::Vec<( - ::subxt::utils::AccountId32, - runtime_types::pallet_identity::types::Data, - )>, - }, - #[codec(index = 3)] - #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] - #[doc = ""] - #[doc = "Payment: All reserved balances on the account are returned."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "identity."] - #[doc = ""] - #[doc = "Emits `IdentityCleared` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`"] - #[doc = " - where `R` registrar-count (governance-bounded)."] - #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] - #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] - #[doc = "- One balance-unreserve operation."] - #[doc = "- `2` storage reads and `S + 2` storage deletions."] - #[doc = "- One event."] - #[doc = "# "] - clear_identity, - #[codec(index = 4)] - #[doc = "Request a judgement from a registrar."] - #[doc = ""] - #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] - #[doc = "given."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] - #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] - #[doc = ""] - #[doc = "```nocompile"] - #[doc = "Self::registrars().get(reg_index).unwrap().fee"] - #[doc = "```"] - #[doc = ""] - #[doc = "Emits `JudgementRequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] - #[doc = "- One event."] - #[doc = "# "] - request_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - #[codec(compact)] - max_fee: ::core::primitive::u128, - }, - #[codec(index = 5)] - #[doc = "Cancel a previous request."] - #[doc = ""] - #[doc = "Payment: A previously reserved deposit is returned on success."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] - #[doc = "registered identity."] - #[doc = ""] - #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] - #[doc = ""] - #[doc = "Emits `JudgementUnrequested` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- One storage mutation `O(R + X)`."] - #[doc = "- One event"] - #[doc = "# "] - cancel_request { reg_index: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "Set the fee required for a judgement to be requested from a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fee`: the new fee."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] - #[doc = "# "] - set_fee { - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - fee: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "Change the account associated with a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `new`: the new account ID."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] - #[doc = "# "] - set_account_id { - #[codec(compact)] - index: ::core::primitive::u32, - new: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 8)] - #[doc = "Set the field information for a registrar."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `index`."] - #[doc = ""] - #[doc = "- `index`: the index of the registrar whose fee is to be set."] - #[doc = "- `fields`: the fields that the registrar concerns themselves with."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R)`."] - #[doc = "- One storage mutation `O(R)`."] - #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] - #[doc = "# "] - set_fields { - #[codec(compact)] - index: ::core::primitive::u32, - fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - }, - #[codec(index = 9)] - #[doc = "Provide a judgement for an account's identity."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] - #[doc = "of the registrar whose index is `reg_index`."] - #[doc = ""] - #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] - #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] - #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] - #[doc = ""] - #[doc = "Emits `JudgementGiven` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + X)`."] - #[doc = "- One balance-transfer operation."] - #[doc = "- Up to one account-lookup operation."] - #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] - #[doc = "- One event."] - #[doc = "# "] - provide_judgement { - #[codec(compact)] - reg_index: ::core::primitive::u32, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - judgement: runtime_types::pallet_identity::types::Judgement< - ::core::primitive::u128, - >, - identity: ::subxt::utils::H256, - }, - #[codec(index = 10)] - #[doc = "Remove an account's identity and sub-account information and slash the deposits."] - #[doc = ""] - #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] - #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] - #[doc = "manually using `cancel_request`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] - #[doc = ""] - #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] - #[doc = " with a registered identity."] - #[doc = ""] - #[doc = "Emits `IdentityKilled` if successful."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(R + S + X)`."] - #[doc = "- One balance-reserve operation."] - #[doc = "- `S + 2` storage mutations."] - #[doc = "- One event."] - #[doc = "# "] - kill_identity { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 11)] - #[doc = "Add the given account to the sender's subs."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - add_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 12)] - #[doc = "Alter the associated name of the given sub-account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - rename_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - data: runtime_types::pallet_identity::types::Data, - }, - #[codec(index = 13)] - #[doc = "Remove the given account from the sender's subs."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "sub identity of `sub`."] - remove_sub { - sub: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 14)] - #[doc = "Remove the sender as a sub-account."] - #[doc = ""] - #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] - #[doc = "to the sender (*not* the original depositor)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] - #[doc = "super-identity."] - #[doc = ""] - #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] - #[doc = "controller of an account is maliciously registered as a sub-account."] - quit_sub, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Too many subs-accounts."] - TooManySubAccounts, - #[codec(index = 1)] - #[doc = "Account isn't found."] - NotFound, - #[codec(index = 2)] - #[doc = "Account isn't named."] - NotNamed, - #[codec(index = 3)] - #[doc = "Empty index."] - EmptyIndex, - #[codec(index = 4)] - #[doc = "Fee is changed."] - FeeChanged, - #[codec(index = 5)] - #[doc = "No identity found."] - NoIdentity, - #[codec(index = 6)] - #[doc = "Sticky judgement."] - StickyJudgement, - #[codec(index = 7)] - #[doc = "Judgement given."] - JudgementGiven, - #[codec(index = 8)] - #[doc = "Invalid judgement."] - InvalidJudgement, - #[codec(index = 9)] - #[doc = "The index is invalid."] - InvalidIndex, - #[codec(index = 10)] - #[doc = "The target is invalid."] - InvalidTarget, - #[codec(index = 11)] - #[doc = "Too many additional fields."] - TooManyFields, - #[codec(index = 12)] - #[doc = "Maximum amount of registrars reached. Cannot add any more."] - TooManyRegistrars, - #[codec(index = 13)] - #[doc = "Account ID is already named."] - AlreadyClaimed, - #[codec(index = 14)] - #[doc = "Sender is not a sub-account."] - NotSub, - #[codec(index = 15)] - #[doc = "Sub-account isn't owned by sender."] - NotOwned, - #[codec(index = 16)] - #[doc = "The provided judgement was for a different identity."] - JudgementForDifferentIdentity, - #[codec(index = 17)] - #[doc = "Error that occurs when there is an issue paying for judgement."] - JudgementPaymentFailed, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 name was set or reset (which will remove all judgements)."] - IdentitySet { who: ::subxt::utils::AccountId32 }, - #[codec(index = 1)] - #[doc = "A name was cleared, and the given balance returned."] - IdentityCleared { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "A name was removed and the given balance slashed."] - IdentityKilled { - who: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A judgement was asked from a registrar."] - JudgementRequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A judgement request was retracted."] - JudgementUnrequested { - who: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "A judgement was given by a registrar."] - JudgementGiven { - target: ::subxt::utils::AccountId32, - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 6)] - #[doc = "A registrar was added."] - RegistrarAdded { - registrar_index: ::core::primitive::u32, - }, - #[codec(index = 7)] - #[doc = "A sub-identity was added to an identity and the deposit paid."] - SubIdentityAdded { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 8)] - #[doc = "A sub-identity was removed from an identity and the deposit freed."] - SubIdentityRemoved { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - #[codec(index = 9)] - #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] - #[doc = "main identity account to the sub-identity account."] - SubIdentityRevoked { - sub: ::subxt::utils::AccountId32, - main: ::subxt::utils::AccountId32, - deposit: ::core::primitive::u128, - }, - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BitFlags<_0>( - pub ::core::primitive::u64, - #[codec(skip)] pub ::core::marker::PhantomData<_0>, - ); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Data { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Raw0([::core::primitive::u8; 0usize]), - #[codec(index = 2)] - Raw1([::core::primitive::u8; 1usize]), - #[codec(index = 3)] - Raw2([::core::primitive::u8; 2usize]), - #[codec(index = 4)] - Raw3([::core::primitive::u8; 3usize]), - #[codec(index = 5)] - Raw4([::core::primitive::u8; 4usize]), - #[codec(index = 6)] - Raw5([::core::primitive::u8; 5usize]), - #[codec(index = 7)] - Raw6([::core::primitive::u8; 6usize]), - #[codec(index = 8)] - Raw7([::core::primitive::u8; 7usize]), - #[codec(index = 9)] - Raw8([::core::primitive::u8; 8usize]), - #[codec(index = 10)] - Raw9([::core::primitive::u8; 9usize]), - #[codec(index = 11)] - Raw10([::core::primitive::u8; 10usize]), - #[codec(index = 12)] - Raw11([::core::primitive::u8; 11usize]), - #[codec(index = 13)] - Raw12([::core::primitive::u8; 12usize]), - #[codec(index = 14)] - Raw13([::core::primitive::u8; 13usize]), - #[codec(index = 15)] - Raw14([::core::primitive::u8; 14usize]), - #[codec(index = 16)] - Raw15([::core::primitive::u8; 15usize]), - #[codec(index = 17)] - Raw16([::core::primitive::u8; 16usize]), - #[codec(index = 18)] - Raw17([::core::primitive::u8; 17usize]), - #[codec(index = 19)] - Raw18([::core::primitive::u8; 18usize]), - #[codec(index = 20)] - Raw19([::core::primitive::u8; 19usize]), - #[codec(index = 21)] - Raw20([::core::primitive::u8; 20usize]), - #[codec(index = 22)] - Raw21([::core::primitive::u8; 21usize]), - #[codec(index = 23)] - Raw22([::core::primitive::u8; 22usize]), - #[codec(index = 24)] - Raw23([::core::primitive::u8; 23usize]), - #[codec(index = 25)] - Raw24([::core::primitive::u8; 24usize]), - #[codec(index = 26)] - Raw25([::core::primitive::u8; 25usize]), - #[codec(index = 27)] - Raw26([::core::primitive::u8; 26usize]), - #[codec(index = 28)] - Raw27([::core::primitive::u8; 27usize]), - #[codec(index = 29)] - Raw28([::core::primitive::u8; 28usize]), - #[codec(index = 30)] - Raw29([::core::primitive::u8; 29usize]), - #[codec(index = 31)] - Raw30([::core::primitive::u8; 30usize]), - #[codec(index = 32)] - Raw31([::core::primitive::u8; 31usize]), - #[codec(index = 33)] - Raw32([::core::primitive::u8; 32usize]), - #[codec(index = 34)] - BlakeTwo256([::core::primitive::u8; 32usize]), - #[codec(index = 35)] - Sha256([::core::primitive::u8; 32usize]), - #[codec(index = 36)] - Keccak256([::core::primitive::u8; 32usize]), - #[codec(index = 37)] - ShaThree256([::core::primitive::u8; 32usize]), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum IdentityField { - #[codec(index = 1)] - Display, - #[codec(index = 2)] - Legal, - #[codec(index = 4)] - Web, - #[codec(index = 8)] - Riot, - #[codec(index = 16)] - Email, - #[codec(index = 32)] - PgpFingerprint, - #[codec(index = 64)] - Image, - #[codec(index = 128)] - Twitter, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct IdentityInfo { - pub additional: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - runtime_types::pallet_identity::types::Data, - runtime_types::pallet_identity::types::Data, - )>, - pub display: runtime_types::pallet_identity::types::Data, - pub legal: runtime_types::pallet_identity::types::Data, - pub web: runtime_types::pallet_identity::types::Data, - pub riot: runtime_types::pallet_identity::types::Data, - pub email: runtime_types::pallet_identity::types::Data, - pub pgp_fingerprint: - ::core::option::Option<[::core::primitive::u8; 20usize]>, - pub image: runtime_types::pallet_identity::types::Data, - pub twitter: runtime_types::pallet_identity::types::Data, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Judgement<_0> { - #[codec(index = 0)] - Unknown, - #[codec(index = 1)] - FeePaid(_0), - #[codec(index = 2)] - Reasonable, - #[codec(index = 3)] - KnownGood, - #[codec(index = 4)] - OutOfDate, - #[codec(index = 5)] - LowQuality, - #[codec(index = 6)] - Erroneous, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RegistrarInfo<_0, _1> { - pub account: _1, - pub fee: _0, - pub fields: runtime_types::pallet_identity::types::BitFlags< - runtime_types::pallet_identity::types::IdentityField, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Registration<_0> { - pub judgements: - runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( - ::core::primitive::u32, - runtime_types::pallet_identity::types::Judgement<_0>, - )>, - pub deposit: _0, - pub info: runtime_types::pallet_identity::types::IdentityInfo, - } - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "# "] # [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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The 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, - Debug, - )] - #[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_lottery { + pub mod pallet_identity { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -49895,593 +35509,311 @@ pub mod api { )] #[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."] + #[doc = "Identity pallet declaration."] pub enum Call { #[codec(index = 0)] - #[doc = "Buy a ticket to enter the lottery."] + #[doc = "Add a registrar to the system."] #[doc = ""] - #[doc = "This extrinsic acts as a passthrough function for `call`. In all"] - #[doc = "situations where `call` alone would succeed, this extrinsic should"] - #[doc = "succeed."] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] #[doc = ""] - #[doc = "If `call` is successful, then we will attempt to purchase a ticket,"] - #[doc = "which may fail silently. To detect success of a ticket purchase, you"] - #[doc = "should listen for the `TicketBought` event."] + #[doc = "- `account`: the account of the registrar."] #[doc = ""] - #[doc = "This extrinsic must be called by a signed origin."] - buy_ticket { - call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, - >, + #[doc = "Emits `RegistrarAdded` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."] + #[doc = "- One storage mutation (codec `O(R)`)."] + #[doc = "- One event."] + #[doc = "# "] + add_registrar { + account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] - #[doc = "Set calls in storage which can be used to purchase a lottery ticket."] + #[doc = "Set an account's identity information and reserve the appropriate deposit."] + #[doc = ""] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `info`: The identity information."] #[doc = ""] - #[doc = "This function only matters if you use the `ValidateCall` implementation"] - #[doc = "provided by this pallet, which uses storage to determine the valid calls."] + #[doc = "Emits `IdentitySet` if successful."] #[doc = ""] - #[doc = "This extrinsic must be called by the Manager origin."] - set_calls { - calls: ::std::vec::Vec< - runtime_types::kitchensink_runtime::RuntimeCall, + #[doc = "# "] + #[doc = "- `O(X + X' + R)`"] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"] + #[doc = " - where `R` judgements-count (registrar-count-bounded)"] + #[doc = "- One balance reserve operation."] + #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."] + #[doc = "- One event."] + #[doc = "# "] + set_identity { + info: ::std::boxed::Box< + runtime_types::pallet_identity::types::IdentityInfo, >, }, #[codec(index = 2)] - #[doc = "Start a lottery using the provided configuration."] + #[doc = "Set the sub-accounts of the sender."] #[doc = ""] - #[doc = "This extrinsic must be called by the `ManagerOrigin`."] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] #[doc = ""] - #[doc = "Parameters:"] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] #[doc = ""] - #[doc = "* `price`: The cost of a single ticket."] - #[doc = "* `length`: How long the lottery should run for starting at the current block."] - #[doc = "* `delay`: How long after the lottery end we should wait before picking a winner."] - #[doc = "* `repeat`: If the lottery should repeat when completed."] - start_lottery { - price: ::core::primitive::u128, - length: ::core::primitive::u32, - delay: ::core::primitive::u32, - repeat: ::core::primitive::bool, + #[doc = "- `subs`: The identity's (new) sub-accounts."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(P + S)`"] + #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = "- At most one balance operations."] + #[doc = "- DB:"] + #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"] + #[doc = " - One storage read (codec complexity `O(P)`)."] + #[doc = " - One storage write (codec complexity `O(S)`)."] + #[doc = " - One storage-exists (`IdentityOf::contains_key`)."] + #[doc = "# "] + set_subs { + subs: ::std::vec::Vec<( + ::subxt::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, }, #[codec(index = 3)] - #[doc = "If a lottery is repeating, you can use this to stop the repeat."] - #[doc = "The lottery will continue to run to completion."] + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] #[doc = ""] - #[doc = "This extrinsic must be called by the `ManagerOrigin`."] - stop_repeat, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "A lottery has not been configured."] - NotConfigured, - #[codec(index = 1)] - #[doc = "A lottery is already in progress."] - InProgress, - #[codec(index = 2)] - #[doc = "A lottery has already ended."] - AlreadyEnded, - #[codec(index = 3)] - #[doc = "The call is not valid for an open lottery."] - InvalidCall, + #[doc = "Payment: All reserved balances on the account are returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "Emits `IdentityCleared` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + S + X)`"] + #[doc = " - where `R` registrar-count (governance-bounded)."] + #[doc = " - where `S` subs-count (hard- and deposit-bounded)."] + #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."] + #[doc = "- One balance-unreserve operation."] + #[doc = "- `2` storage reads and `S + 2` storage deletions."] + #[doc = "- One event."] + #[doc = "# "] + clear_identity, #[codec(index = 4)] - #[doc = "You are already participating in the lottery with this call."] - AlreadyParticipating, + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."] + #[doc = "- One event."] + #[doc = "# "] + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, #[codec(index = 5)] - #[doc = "Too many calls for a single lottery."] - TooManyCalls, + #[doc = "Cancel a previous request."] + #[doc = ""] + #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- One storage mutation `O(R + X)`."] + #[doc = "- One event"] + #[doc = "# "] + cancel_request { reg_index: ::core::primitive::u32 }, #[codec(index = 6)] - #[doc = "Failed to encode calls"] - EncodingFailed, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 lottery has been started!"] - LotteryStarted, - #[codec(index = 1)] - #[doc = "A new set of calls have been set!"] - CallsUpdated, - #[codec(index = 2)] - #[doc = "A winner has been chosen!"] - Winner { - winner: ::subxt::utils::AccountId32, - lottery_balance: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A ticket has been bought!"] - TicketBought { - who: ::subxt::utils::AccountId32, - call_index: (::core::primitive::u8, ::core::primitive::u8), - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct LotteryConfig<_0, _1> { - pub price: _1, - pub start: _0, - pub length: _0, - pub delay: _0, - pub repeat: ::core::primitive::bool, - } - } - pub mod pallet_membership { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 = "Set the fee required for a judgement to be requested from a registrar."] #[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 = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] #[doc = ""] - #[doc = "May only be called from `T::RemoveOrigin`."] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"] + #[doc = "# "] + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, }, - #[codec(index = 2)] - #[doc = "Swap out one member `remove` for another `add`."] + #[codec(index = 7)] + #[doc = "Change the account associated with a registrar."] #[doc = ""] - #[doc = "May only be called from `T::SwapOrigin`."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] #[doc = ""] - #[doc = "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 = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] #[doc = ""] - #[doc = "May only be called from `T::ResetOrigin`."] - reset_members { - members: ::std::vec::Vec<::subxt::utils::AccountId32>, + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"] + #[doc = "# "] + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, - #[codec(index = 4)] - #[doc = "Swap out the sending member for some other key `new`."] + #[codec(index = 8)] + #[doc = "Set the field information for a registrar."] #[doc = ""] - #[doc = "May only be called from `Signed` origin of a current member."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] #[doc = ""] - #[doc = "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 = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] #[doc = ""] - #[doc = "May only be called from `T::PrimeOrigin`."] - set_prime { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + #[doc = "# "] + #[doc = "- `O(R)`."] + #[doc = "- One storage mutation `O(R)`."] + #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"] + #[doc = "# "] + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, >, }, - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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_message_queue { - use super::runtime_types; - pub mod mock_helpers { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MessageOrigin { - #[codec(index = 0)] - Here, - #[codec(index = 1)] - There, - #[codec(index = 2)] - Everywhere(::core::primitive::u32), - } - } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Remove a page which has no more messages remaining to be processed or is stale."] reap_page { message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page_index : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Execute an overweight message."] # [doc = ""] # [doc = "- `origin`: Must be `Signed`."] # [doc = "- `message_origin`: The origin from which the message to be executed arrived."] # [doc = "- `page`: The page in the queue in which the message to be executed is sitting."] # [doc = "- `index`: The index into the queue of the message to be executed."] # [doc = "- `weight_limit`: The maximum amount of weight allowed to be consumed in the execution"] # [doc = " of the message."] # [doc = ""] # [doc = "Benchmark complexity considerations: O(index + weight_limit)."] execute_overweight { message_origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , weight_limit : runtime_types :: sp_weights :: weight_v2 :: Weight , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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 = "Page is not reapable because it has items remaining to be processed and is not old"] - #[doc = "enough."] - NotReapable, - #[codec(index = 1)] - #[doc = "Page to be reaped does not exist."] - NoPage, - #[codec(index = 2)] - #[doc = "The referenced message could not be found."] - NoMessage, - #[codec(index = 3)] - #[doc = "The message was already processed and cannot be processed again."] - AlreadyProcessed, - #[codec(index = 4)] - #[doc = "The message is queued for future execution."] - Queued, - #[codec(index = 5)] - #[doc = "There is temporarily not enough weight to continue servicing messages."] - InsufficientWeight, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Message discarded due to an inability to decode the item. Usually caused by state"] # [doc = "corruption."] Discarded { hash : :: subxt :: utils :: H256 , } , # [codec (index = 1)] # [doc = "Message discarded due to an error in the `MessageProcessor` (usually a format error)."] ProcessingFailed { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , error : runtime_types :: frame_support :: traits :: messages :: ProcessMessageError , } , # [codec (index = 2)] # [doc = "Message is processed."] Processed { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , weight_used : runtime_types :: sp_weights :: weight_v2 :: Weight , success : :: core :: primitive :: bool , } , # [codec (index = 3)] # [doc = "Message placed in overweight queue."] OverweightEnqueued { hash : :: subxt :: utils :: H256 , origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , page_index : :: core :: primitive :: u32 , message_index : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "This page was reaped."] PageReaped { origin : runtime_types :: pallet_message_queue :: mock_helpers :: MessageOrigin , index : :: core :: primitive :: u32 , } , } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BookState<_0> { - pub begin: ::core::primitive::u32, - pub end: ::core::primitive::u32, - pub count: ::core::primitive::u32, - pub ready_neighbours: ::core::option::Option< - runtime_types::pallet_message_queue::Neighbours<_0>, - >, - pub message_count: ::core::primitive::u64, - pub size: ::core::primitive::u64, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Neighbours<_0> { - pub prev: _0, - pub next: _0, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Page<_0> { - pub remaining: _0, - pub remaining_size: _0, - pub first_index: _0, - pub first: _0, - pub last: _0, - pub heap: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[codec(index = 9)] + #[doc = "Provide a judgement for an account's identity."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] #[doc = ""] - #[doc = "- `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 = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided."] #[doc = ""] - #[doc = "Result is equivalent to the dispatched result."] + #[doc = "Emits `JudgementGiven` if successful."] #[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 = "- `O(R + X)`."] + #[doc = "- One balance-transfer operation."] + #[doc = "- Up to one account-lookup operation."] + #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."] + #[doc = "- One event."] #[doc = "# "] - as_multi_threshold_1 { - other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>, - call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, + provide_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, >, + identity: ::subxt::utils::H256, }, - #[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."] + #[codec(index = 10)] + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] #[doc = ""] - #[doc = "- `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 = "The dispatch origin for this call must match `T::ForceOrigin`."] #[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 = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] #[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 = "Emits `IdentityKilled` if successful."] #[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 = "- `O(R + S + X)`."] + #[doc = "- One balance-reserve operation."] + #[doc = "- `S + 2` storage mutations."] #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - max_weight: runtime_types::sp_weights::weight_v2::Weight, + kill_identity { + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, - #[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`."] + #[codec(index = 11)] + #[doc = "Add the given account to the sender's subs."] #[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 = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + add_sub { + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 12)] + #[doc = "Alter the associated name of the given sub-account."] #[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 = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + rename_sub { + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 13)] + #[doc = "Remove the given account from the sender's subs."] #[doc = ""] - #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] #[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, + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + remove_sub { + sub: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, - #[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."] + #[codec(index = 14)] + #[doc = "Remove the sender as a sub-account."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] #[doc = ""] - #[doc = "- `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 = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] #[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 = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + quit_sub, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50495,47 +35827,59 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "Threshold must be 2 or greater."] - MinimumThreshold, + #[doc = "Too many subs-accounts."] + TooManySubAccounts, #[codec(index = 1)] - #[doc = "Call is already approved by this signatory."] - AlreadyApproved, + #[doc = "Account isn't found."] + NotFound, #[codec(index = 2)] - #[doc = "Call doesn't need any (more) approvals."] - NoApprovalsNeeded, + #[doc = "Account isn't named."] + NotNamed, #[codec(index = 3)] - #[doc = "There are too few signatories in the list."] - TooFewSignatories, + #[doc = "Empty index."] + EmptyIndex, #[codec(index = 4)] - #[doc = "There are too many signatories in the list."] - TooManySignatories, + #[doc = "Fee is changed."] + FeeChanged, #[codec(index = 5)] - #[doc = "The signatories were provided out of order; they should be ordered."] - SignatoriesOutOfOrder, + #[doc = "No identity found."] + NoIdentity, #[codec(index = 6)] - #[doc = "The sender was contained in the other signatories; it shouldn't be."] - SenderInSignatories, + #[doc = "Sticky judgement."] + StickyJudgement, #[codec(index = 7)] - #[doc = "Multisig operation not found when attempting to cancel."] - NotFound, + #[doc = "Judgement given."] + JudgementGiven, #[codec(index = 8)] - #[doc = "Only the account that originally created the multisig is able to cancel it."] - NotOwner, + #[doc = "Invalid judgement."] + InvalidJudgement, #[codec(index = 9)] - #[doc = "No timepoint was given, yet the multisig operation is already underway."] - NoTimepoint, + #[doc = "The index is invalid."] + InvalidIndex, #[codec(index = 10)] - #[doc = "A different timepoint was given to the multisig operation that is underway."] - WrongTimepoint, + #[doc = "The target is invalid."] + InvalidTarget, #[codec(index = 11)] - #[doc = "A timepoint was given, yet no multisig operation is underway."] - UnexpectedTimepoint, + #[doc = "Too many additional fields."] + TooManyFields, #[codec(index = 12)] - #[doc = "The maximum weight information provided was too low."] - MaxWeightTooLow, + #[doc = "Maximum amount of registrars reached. Cannot add any more."] + TooManyRegistrars, #[codec(index = 13)] - #[doc = "The data to be stored is already stored."] - AlreadyStored, + #[doc = "Account ID is already named."] + AlreadyClaimed, + #[codec(index = 14)] + #[doc = "Sender is not a sub-account."] + NotSub, + #[codec(index = 15)] + #[doc = "Sub-account isn't owned by sender."] + NotOwned, + #[codec(index = 16)] + #[doc = "The provided judgement was for a different identity."] + JudgementForDifferentIdentity, + #[codec(index = 17)] + #[doc = "Error that occurs when there is an issue paying for judgement."] + JudgementPaymentFailed, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50549,248 +35893,69 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "A new multisig operation has begun."] - NewMultisig { - approving: ::subxt::utils::AccountId32, - multisig: ::subxt::utils::AccountId32, - call_hash: [::core::primitive::u8; 32usize], - }, + #[doc = "A name was set or reset (which will remove all judgements)."] + IdentitySet { who: ::subxt::utils::AccountId32 }, #[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], + #[doc = "A name was cleared, and the given balance returned."] + IdentityCleared { + who: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, }, #[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, - >, + #[doc = "A name was removed and the given balance slashed."] + IdentityKilled { + who: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, }, #[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 = "A judgement was asked from a registrar."] + JudgementRequested { + who: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct 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, - Debug, - )] - #[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_nfts { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - # [codec (index = 0)] # [doc = "Issue a new collection of non-fungible items from a public origin."] # [doc = ""] # [doc = "This new collection has no items initially and its owner is the origin."] # [doc = ""] # [doc = "The origin must be Signed and the sender must have sufficient funds free."] # [doc = ""] # [doc = "`ItemDeposit` funds of sender are reserved."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] # [doc = "member of the collection's admin team."] # [doc = ""] # [doc = "Emits `Created` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] create { admin : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 1)] # [doc = "Issue a new collection of non-fungible items from a privileged origin."] # [doc = ""] # [doc = "This new collection has no items initially."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin`."] # [doc = ""] # [doc = "Unlike `create`, no funds are reserved."] # [doc = ""] # [doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] # [doc = " permissions over this item, but may later change and configure the permissions using"] # [doc = " `transfer_ownership` and `set_team`."] # [doc = ""] # [doc = "Emits `ForceCreated` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_create { owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 2)] # [doc = "Destroy a collection of fungible items."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] # [doc = "owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to be destroyed."] # [doc = "- `witness`: Information on the items minted in the collection. This must be"] # [doc = "correct."] # [doc = ""] # [doc = "Emits `Destroyed` event when successful."] # [doc = ""] # [doc = "Weight: `O(n + m)` where:"] # [doc = "- `n = witness.items`"] # [doc = "- `m = witness.item_metadatas`"] # [doc = "- `a = witness.attributes`"] destroy { collection : :: core :: primitive :: u32 , witness : runtime_types :: pallet_nfts :: types :: DestroyWitness , } , # [codec (index = 3)] # [doc = "Mint an item of a particular collection."] # [doc = ""] # [doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be minted."] # [doc = "- `item`: An identifier of the new item."] # [doc = "- `mint_to`: Account into which the item will be minted."] # [doc = "- `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned"] # [doc = " item_id from that collection needs to be provided within the witness data object."] # [doc = ""] # [doc = "Note: the deposit will be taken from the `origin` and not the `owner` of the `item`."] # [doc = ""] # [doc = "Emits `Issued` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] mint { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , mint_to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , witness_data : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: MintWitness < :: core :: primitive :: u32 > > , } , # [codec (index = 4)] # [doc = "Mint an item of a particular collection from a privileged origin."] # [doc = ""] # [doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] # [doc = "Issuer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be minted."] # [doc = "- `item`: An identifier of the new item."] # [doc = "- `mint_to`: Account into which the item will be minted."] # [doc = "- `item_config`: A config of the new item."] # [doc = ""] # [doc = "Emits `Issued` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_mint { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , mint_to : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , item_config : runtime_types :: pallet_nfts :: types :: ItemConfig , } , # [codec (index = 5)] # [doc = "Destroy a single item."] # [doc = ""] # [doc = "Origin must be Signed and the signing account must be either:"] # [doc = "- the Admin of the `collection`;"] # [doc = "- the Owner of the `item`;"] # [doc = ""] # [doc = "- `collection`: The collection of the item to be burned."] # [doc = "- `item`: The item to be burned."] # [doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] # [doc = " item is owned by this value."] # [doc = ""] # [doc = "Emits `Burned` with the actual amount burned."] # [doc = ""] # [doc = "Weight: `O(1)`"] # [doc = "Modes: `check_owner.is_some()`."] burn { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , check_owner : :: core :: option :: Option < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > > , } , # [codec (index = 6)] # [doc = "Move an item from the sender account to another."] # [doc = ""] # [doc = "Origin must be Signed and the signing account must be either:"] # [doc = "- the Admin of the `collection`;"] # [doc = "- the Owner of the `item`;"] # [doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item to be transferred."] # [doc = "- `item`: The item to be transferred."] # [doc = "- `dest`: The account to receive ownership of the item."] # [doc = ""] # [doc = "Emits `Transferred`."] # [doc = ""] # [doc = "Weight: `O(1)`"] transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , dest : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 7)] # [doc = "Re-evaluate the deposits on some items."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the items to be reevaluated."] # [doc = "- `items`: The items of the collection whose deposits will be reevaluated."] # [doc = ""] # [doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] # [doc = "in the case that the owner account does not have reservable funds to pay for a"] # [doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] # [doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] # [doc = "so it's of little consequence."] # [doc = ""] # [doc = "It will still return an error in the case that the collection is unknown or the signer"] # [doc = "is not permitted to call it."] # [doc = ""] # [doc = "Weight: `O(items.len())`"] redeposit { collection : :: core :: primitive :: u32 , items : :: std :: vec :: Vec < :: core :: primitive :: u32 > , } , # [codec (index = 8)] # [doc = "Disallow further unprivileged transfer of an item."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be changed."] # [doc = "- `item`: The item to become non-transferable."] # [doc = ""] # [doc = "Emits `ItemTransferLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_item_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 9)] # [doc = "Re-allow unprivileged transfer of an item."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be changed."] # [doc = "- `item`: The item to become transferable."] # [doc = ""] # [doc = "Emits `ItemTransferUnlocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] unlock_item_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "Disallows specified settings for the whole collection."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection to be locked."] # [doc = "- `lock_settings`: The settings to be locked."] # [doc = ""] # [doc = "Note: it's possible to only lock(set) the setting, but not to unset it."] # [doc = "Emits `CollectionLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_collection { collection : :: core :: primitive :: u32 , lock_settings : runtime_types :: pallet_nfts :: types :: BitFlags < runtime_types :: pallet_nfts :: types :: CollectionSetting > , } , # [codec (index = 11)] # [doc = "Change the Owner of a collection."] # [doc = ""] # [doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] # [doc = ""] # [doc = "- `collection`: The collection whose owner should be changed."] # [doc = "- `owner`: The new Owner of this collection. They must have called"] # [doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] # [doc = ""] # [doc = "Emits `OwnerChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] transfer_ownership { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 12)] # [doc = "Change the Issuer, Admin and Freezer of a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "- `collection`: The collection whose team should be changed."] # [doc = "- `issuer`: The new Issuer of this collection."] # [doc = "- `admin`: The new Admin of this collection."] # [doc = "- `freezer`: The new Freezer of this collection."] # [doc = ""] # [doc = "Emits `TeamChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_team { collection : :: core :: primitive :: u32 , issuer : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , admin : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , freezer : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "Change the Owner of a collection."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection."] # [doc = "- `owner`: The new Owner of this collection."] # [doc = ""] # [doc = "Emits `OwnerChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_collection_owner { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 14)] # [doc = "Change the config of a collection."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection."] # [doc = "- `config`: The new config of this collection."] # [doc = ""] # [doc = "Emits `CollectionConfigChanged`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_collection_config { collection : :: core :: primitive :: u32 , config : runtime_types :: pallet_nfts :: types :: CollectionConfig < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 15)] # [doc = "Approve an item to be transferred by a delegated third-party account."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item to be approved for delegated transfer."] # [doc = "- `item`: The item to be approved for delegated transfer."] # [doc = "- `delegate`: The account to delegate permission to transfer the item."] # [doc = "- `maybe_deadline`: Optional deadline for the approval. Specified by providing the"] # [doc = "\tnumber of blocks after which the approval will expire"] # [doc = ""] # [doc = "Emits `TransferApproved` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] approve_transfer { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , maybe_deadline : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 16)] # [doc = "Cancel one of the transfer approvals for a specific item."] # [doc = ""] # [doc = "Origin must be either:"] # [doc = "- the `Force` origin;"] # [doc = "- `Signed` with the signer being the Admin of the `collection`;"] # [doc = "- `Signed` with the signer being the Owner of the `item`;"] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item of whose approval will be cancelled."] # [doc = "- `item`: The item of the collection of whose approval will be cancelled."] # [doc = "- `delegate`: The account that is going to loose their approval."] # [doc = ""] # [doc = "Emits `ApprovalCancelled` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] cancel_approval { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 17)] # [doc = "Cancel all the approvals of a specific item."] # [doc = ""] # [doc = "Origin must be either:"] # [doc = "- the `Force` origin;"] # [doc = "- `Signed` with the signer being the Admin of the `collection`;"] # [doc = "- `Signed` with the signer being the Owner of the `item`;"] # [doc = ""] # [doc = "Arguments:"] # [doc = "- `collection`: The collection of the item of whose approvals will be cleared."] # [doc = "- `item`: The item of the collection of whose approvals will be cleared."] # [doc = ""] # [doc = "Emits `AllApprovalsCancelled` on success."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_all_transfer_approvals { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "Disallows changing the metadata or attributes of the item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "- `collection`: The collection if the `item`."] # [doc = "- `item`: An item to be locked."] # [doc = "- `lock_metadata`: Specifies whether the metadata should be locked."] # [doc = "- `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace"] # [doc = " should be locked."] # [doc = ""] # [doc = "Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace"] # [doc = "only. When the metadata or attributes are locked, it won't be possible the unlock them."] # [doc = ""] # [doc = "Emits `ItemPropertiesLocked`."] # [doc = ""] # [doc = "Weight: `O(1)`"] lock_item_properties { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , lock_metadata : :: core :: primitive :: bool , lock_attributes : :: core :: primitive :: bool , } , # [codec (index = 19)] # [doc = "Set an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be Signed and must conform to the namespace ruleset:"] # [doc = "- `CollectionOwner` namespace could be modified by the `collection` owner only;"] # [doc = "- `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item`"] # [doc = " should be set in that case;"] # [doc = "- `Account(AccountId)` namespace could be modified only when the `origin` was given a"] # [doc = " permission to do so;"] # [doc = ""] # [doc = "The funds of `origin` are reserved according to the formula:"] # [doc = "`AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to set."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = "- `value`: The value to which to set the attribute."] # [doc = ""] # [doc = "Emits `AttributeSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_attribute { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 20)] # [doc = "Force-set an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be `ForceOrigin`."] # [doc = ""] # [doc = "If the attribute already exists and it was set by another account, the deposit"] # [doc = "will be returned to the previous owner."] # [doc = ""] # [doc = "- `set_as`: An optional owner of the attribute."] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to set."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = "- `value`: The value to which to set the attribute."] # [doc = ""] # [doc = "Emits `AttributeSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] force_set_attribute { set_as : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 21)] # [doc = "Clear an attribute for a collection or item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "attribute."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] # [doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] # [doc = "- `namespace`: Attribute's namespace."] # [doc = "- `key`: The key of the attribute."] # [doc = ""] # [doc = "Emits `AttributeCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_attribute { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 22)] # [doc = "Approve item's attributes to be changed by a delegated third-party account."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: A collection of the item."] # [doc = "- `item`: The item that holds attributes."] # [doc = "- `delegate`: The account to delegate permission to change attributes of the item."] # [doc = ""] # [doc = "Emits `ItemAttributesApprovalAdded` on success."] approve_item_attributes { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , } , # [codec (index = 23)] # [doc = "Cancel the previously provided approval to change item's attributes."] # [doc = "All the previously set attributes by the `delegate` will be removed."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: Collection that the item is contained within."] # [doc = "- `item`: The item that holds attributes."] # [doc = "- `delegate`: The previously approved account to remove."] # [doc = ""] # [doc = "Emits `ItemAttributesApprovalRemoved` on success."] cancel_item_attributes_approval { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > , witness : runtime_types :: pallet_nfts :: types :: CancelAttributesApprovalWitness , } , # [codec (index = 24)] # [doc = "Set the metadata for an item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] # [doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to set."] # [doc = "- `item`: The identifier of the item whose metadata to set."] # [doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] # [doc = ""] # [doc = "Emits `ItemMetadataSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_metadata { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 25)] # [doc = "Clear the metadata for an item."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] # [doc = "`collection`."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] # [doc = "- `item`: The identifier of the item whose metadata to clear."] # [doc = ""] # [doc = "Emits `ItemMetadataCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_metadata { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 26)] # [doc = "Set the metadata for a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] # [doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] # [doc = "account any already reserved funds."] # [doc = ""] # [doc = "- `collection`: The identifier of the item whose metadata to update."] # [doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] # [doc = ""] # [doc = "Emits `CollectionMetadataSet`."] # [doc = ""] # [doc = "Weight: `O(1)`"] set_collection_metadata { collection : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 27)] # [doc = "Clear the metadata for a collection."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "Any deposit is freed for the collection's owner."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection whose metadata to clear."] # [doc = ""] # [doc = "Emits `CollectionMetadataCleared`."] # [doc = ""] # [doc = "Weight: `O(1)`"] clear_collection_metadata { collection : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "Set (or reset) the acceptance of ownership for a particular account."] # [doc = ""] # [doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] # [doc = "provider reference."] # [doc = ""] # [doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] # [doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] # [doc = " ownership transferal."] # [doc = ""] # [doc = "Emits `OwnershipAcceptanceChanged`."] set_accept_ownership { maybe_collection : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 29)] # [doc = "Set the maximum number of items a collection could have."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to change."] # [doc = "- `max_supply`: The maximum number of items a collection could have."] # [doc = ""] # [doc = "Emits `CollectionMaxSupplySet` event when successful."] set_collection_max_supply { collection : :: core :: primitive :: u32 , max_supply : :: core :: primitive :: u32 , } , # [codec (index = 30)] # [doc = "Update mint settings."] # [doc = ""] # [doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] # [doc = "the `collection`."] # [doc = ""] # [doc = "- `collection`: The identifier of the collection to change."] # [doc = "- `mint_settings`: The new mint settings."] # [doc = ""] # [doc = "Emits `CollectionMintSettingsUpdated` event when successful."] update_mint_settings { collection : :: core :: primitive :: u32 , mint_settings : runtime_types :: pallet_nfts :: types :: MintSettings < :: core :: primitive :: u128 , :: core :: primitive :: u32 , :: core :: primitive :: u32 > , } , # [codec (index = 31)] # [doc = "Set (or reset) the price for an item."] # [doc = ""] # [doc = "Origin must be Signed and must be the owner of the asset `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item to set the price for."] # [doc = "- `price`: The price for the item. Pass `None`, to reset the price."] # [doc = "- `buyer`: Restricts the buy operation to a specific account."] # [doc = ""] # [doc = "Emits `ItemPriceSet` on success if the price is not `None`."] # [doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] set_price { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: option :: Option < :: core :: primitive :: u128 > , whitelisted_buyer : :: core :: option :: Option < :: subxt :: utils :: MultiAddress < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u32 > > , } , # [codec (index = 32)] # [doc = "Allows to buy an item if it's up for sale."] # [doc = ""] # [doc = "Origin must be Signed and must not be the owner of the `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item the sender wants to buy."] # [doc = "- `bid_price`: The price the sender is willing to pay."] # [doc = ""] # [doc = "Emits `ItemBought` on success."] buy_item { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , bid_price : :: core :: primitive :: u128 , } , # [codec (index = 33)] # [doc = "Allows to pay the tips."] # [doc = ""] # [doc = "Origin must be Signed."] # [doc = ""] # [doc = "- `tips`: Tips array."] # [doc = ""] # [doc = "Emits `TipSent` on every tip transfer."] pay_tips { tips : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < runtime_types :: pallet_nfts :: types :: ItemTip < :: core :: primitive :: u32 , :: core :: primitive :: u32 , :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 > > , } , # [codec (index = 34)] # [doc = "Register a new atomic swap, declaring an intention to send an `item` in exchange for"] # [doc = "`desired_item` from origin to target on the current blockchain."] # [doc = "The target can execute the swap during the specified `duration` of blocks (if set)."] # [doc = "Additionally, the price could be set for the desired `item`."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item an owner wants to give."] # [doc = "- `desired_collection`: The collection of the desired item."] # [doc = "- `desired_item`: The desired item an owner wants to receive."] # [doc = "- `maybe_price`: The price an owner is willing to pay or receive for the desired `item`."] # [doc = "- `duration`: A deadline for the swap. Specified by providing the number of blocks"] # [doc = "\tafter which the swap will expire."] # [doc = ""] # [doc = "Emits `SwapCreated` on success."] create_swap { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , maybe_desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , duration : :: core :: primitive :: u32 , } , # [codec (index = 35)] # [doc = "Cancel an atomic swap."] # [doc = ""] # [doc = "Origin must be Signed."] # [doc = "Origin must be an owner of the `item` if the deadline hasn't expired."] # [doc = ""] # [doc = "- `collection`: The collection of the item."] # [doc = "- `item`: The item an owner wants to give."] # [doc = ""] # [doc = "Emits `SwapCancelled` on success."] cancel_swap { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , } , # [codec (index = 36)] # [doc = "Claim an atomic swap."] # [doc = "This method executes a pending swap, that was created by a counterpart before."] # [doc = ""] # [doc = "Origin must be Signed and must be an owner of the `item`."] # [doc = ""] # [doc = "- `send_collection`: The collection of the item to be sent."] # [doc = "- `send_item`: The item to be sent."] # [doc = "- `receive_collection`: The collection of the item to be received."] # [doc = "- `receive_item`: The item to be received."] # [doc = "- `witness_price`: A price that was previously agreed on."] # [doc = ""] # [doc = "Emits `SwapClaimed` on success."] claim_swap { send_collection : :: core :: primitive :: u32 , send_item : :: core :: primitive :: u32 , receive_collection : :: core :: primitive :: u32 , receive_item : :: core :: primitive :: u32 , witness_price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , } , } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\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 signing account has no permission to do the operation."] - NoPermission, - #[codec(index = 1)] - #[doc = "The given item ID is unknown."] - UnknownCollection, - #[codec(index = 2)] - #[doc = "The item ID has already been used for an item."] - AlreadyExists, - #[codec(index = 3)] - #[doc = "The approval had a deadline that expired, so the approval isn't valid anymore."] - ApprovalExpired, #[codec(index = 4)] - #[doc = "The owner turned out to be different to what was expected."] - WrongOwner, + #[doc = "A judgement request was retracted."] + JudgementUnrequested { + who: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, #[codec(index = 5)] - #[doc = "The witness data given does not match the current state of the chain."] - BadWitness, + #[doc = "A judgement was given by a registrar."] + JudgementGiven { + target: ::subxt::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, #[codec(index = 6)] - #[doc = "Collection ID is already taken."] - CollectionIdInUse, + #[doc = "A registrar was added."] + RegistrarAdded { + registrar_index: ::core::primitive::u32, + }, #[codec(index = 7)] - #[doc = "Items within that collection are non-transferable."] - ItemsNonTransferable, + #[doc = "A sub-identity was added to an identity and the deposit paid."] + SubIdentityAdded { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 8)] - #[doc = "The provided account is not a delegate."] - NotDelegate, + #[doc = "A sub-identity was removed from an identity and the deposit freed."] + SubIdentityRemoved { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, #[codec(index = 9)] - #[doc = "The delegate turned out to be different to what was expected."] - WrongDelegate, - #[codec(index = 10)] - #[doc = "No approval exists that would allow the transfer."] - Unapproved, - #[codec(index = 11)] - #[doc = "The named owner has not signed ownership acceptance of the collection."] - Unaccepted, - #[codec(index = 12)] - #[doc = "The item is locked (non-transferable)."] - ItemLocked, - #[codec(index = 13)] - #[doc = "Item's attributes are locked."] - LockedItemAttributes, - #[codec(index = 14)] - #[doc = "Collection's attributes are locked."] - LockedCollectionAttributes, - #[codec(index = 15)] - #[doc = "Item's metadata is locked."] - LockedItemMetadata, - #[codec(index = 16)] - #[doc = "Collection's metadata is locked."] - LockedCollectionMetadata, - #[codec(index = 17)] - #[doc = "All items have been minted."] - MaxSupplyReached, - #[codec(index = 18)] - #[doc = "The max supply is locked and can't be changed."] - MaxSupplyLocked, - #[codec(index = 19)] - #[doc = "The provided max supply is less than the number of items a collection already has."] - MaxSupplyTooSmall, - #[codec(index = 20)] - #[doc = "The given item ID is unknown."] - UnknownItem, - #[codec(index = 21)] - #[doc = "Swap doesn't exist."] - UnknownSwap, - #[codec(index = 22)] - #[doc = "The given item has no metadata set."] - MetadataNotFound, - #[codec(index = 23)] - #[doc = "The provided attribute can't be found."] - AttributeNotFound, - #[codec(index = 24)] - #[doc = "Item is not for sale."] - NotForSale, - #[codec(index = 25)] - #[doc = "The provided bid is too low."] - BidTooLow, - #[codec(index = 26)] - #[doc = "The item has reached its approval limit."] - ReachedApprovalLimit, - #[codec(index = 27)] - #[doc = "The deadline has already expired."] - DeadlineExpired, - #[codec(index = 28)] - #[doc = "The duration provided should be less than or equal to `MaxDeadlineDuration`."] - WrongDuration, - #[codec(index = 29)] - #[doc = "The method is disabled by system settings."] - MethodDisabled, - #[codec(index = 30)] - #[doc = "The provided setting can't be set."] - WrongSetting, - #[codec(index = 31)] - #[doc = "Item's config already exists and should be equal to the provided one."] - InconsistentItemConfig, - #[codec(index = 32)] - #[doc = "Config for a collection or an item can't be found."] - NoConfig, - #[codec(index = 33)] - #[doc = "Some roles were not cleared."] - RolesNotCleared, - #[codec(index = 34)] - #[doc = "Mint has not started yet."] - MintNotStarted, - #[codec(index = 35)] - #[doc = "Mint has already ended."] - MintEnded, - #[codec(index = 36)] - #[doc = "The provided Item was already used for claiming."] - AlreadyClaimed, - #[codec(index = 37)] - #[doc = "The provided data is incorrect."] - IncorrectData, + #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] + #[doc = "main identity account to the sub-identity account."] + SubIdentityRevoked { + sub: ::subxt::utils::AccountId32, + main: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, + }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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 `collection` was created."] Created { collection : :: core :: primitive :: u32 , creator : :: subxt :: utils :: AccountId32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 1)] # [doc = "A `collection` was force-created."] ForceCreated { collection : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 2)] # [doc = "A `collection` was destroyed."] Destroyed { collection : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "An `item` was issued."] Issued { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 4)] # [doc = "An `item` was transferred."] Transferred { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , from : :: subxt :: utils :: AccountId32 , to : :: subxt :: utils :: AccountId32 , } , # [codec (index = 5)] # [doc = "An `item` was destroyed."] Burned { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 6)] # [doc = "An `item` became non-transferable."] ItemTransferLocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "An `item` became transferable."] ItemTransferUnlocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 8)] # [doc = "`item` metadata or attributes were locked."] ItemPropertiesLocked { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , lock_metadata : :: core :: primitive :: bool , lock_attributes : :: core :: primitive :: bool , } , # [codec (index = 9)] # [doc = "Some `collection` was locked."] CollectionLocked { collection : :: core :: primitive :: u32 , } , # [codec (index = 10)] # [doc = "The owner changed."] OwnerChanged { collection : :: core :: primitive :: u32 , new_owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 11)] # [doc = "The management team changed."] TeamChanged { collection : :: core :: primitive :: u32 , issuer : :: subxt :: utils :: AccountId32 , admin : :: subxt :: utils :: AccountId32 , freezer : :: subxt :: utils :: AccountId32 , } , # [codec (index = 12)] # [doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] # [doc = "a `delegate`."] TransferApproved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , delegate : :: subxt :: utils :: AccountId32 , deadline : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] # [doc = "An approval for a `delegate` account to transfer the `item` of an item"] # [doc = "`collection` was cancelled by its `owner`."] ApprovalCancelled { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 14)] # [doc = "All approvals of an item got cancelled."] AllApprovalsCancelled { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , owner : :: subxt :: utils :: AccountId32 , } , # [codec (index = 15)] # [doc = "A `collection` has had its config changed by the `Force` origin."] CollectionConfigChanged { collection : :: core :: primitive :: u32 , } , # [codec (index = 16)] # [doc = "New metadata has been set for a `collection`."] CollectionMetadataSet { collection : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 17)] # [doc = "Metadata has been cleared for a `collection`."] CollectionMetadataCleared { collection : :: core :: primitive :: u32 , } , # [codec (index = 18)] # [doc = "New metadata has been set for an item."] ItemMetadataSet { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , data : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , } , # [codec (index = 19)] # [doc = "Metadata has been cleared for an item."] ItemMetadataCleared { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "The deposit for a set of `item`s within a `collection` has been updated."] Redeposited { collection : :: core :: primitive :: u32 , successful_items : :: std :: vec :: Vec < :: core :: primitive :: u32 > , } , # [codec (index = 21)] # [doc = "New attribute metadata has been set for a `collection` or `item`."] AttributeSet { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , value : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 22)] # [doc = "Attribute metadata has been cleared for a `collection` or `item`."] AttributeCleared { collection : :: core :: primitive :: u32 , maybe_item : :: core :: option :: Option < :: core :: primitive :: u32 > , key : runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > , namespace : runtime_types :: frame_support :: traits :: tokens :: misc :: AttributeNamespace < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 23)] # [doc = "A new approval to modify item attributes was added."] ItemAttributesApprovalAdded { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 24)] # [doc = "A new approval to modify item attributes was removed."] ItemAttributesApprovalRemoved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , delegate : :: subxt :: utils :: AccountId32 , } , # [codec (index = 25)] # [doc = "Ownership acceptance has changed for an account."] OwnershipAcceptanceChanged { who : :: subxt :: utils :: AccountId32 , maybe_collection : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 26)] # [doc = "Max supply has been set for a collection."] CollectionMaxSupplySet { collection : :: core :: primitive :: u32 , max_supply : :: core :: primitive :: u32 , } , # [codec (index = 27)] # [doc = "Mint settings for a collection had changed."] CollectionMintSettingsUpdated { collection : :: core :: primitive :: u32 , } , # [codec (index = 28)] # [doc = "Event gets emitted when the `NextCollectionId` gets incremented."] NextCollectionIdIncremented { next_id : :: core :: primitive :: u32 , } , # [codec (index = 29)] # [doc = "The price was set for the item."] ItemPriceSet { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: primitive :: u128 , whitelisted_buyer : :: core :: option :: Option < :: subxt :: utils :: AccountId32 > , } , # [codec (index = 30)] # [doc = "The price for the item was removed."] ItemPriceRemoved { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , } , # [codec (index = 31)] # [doc = "An item was bought."] ItemBought { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , price : :: core :: primitive :: u128 , seller : :: subxt :: utils :: AccountId32 , buyer : :: subxt :: utils :: AccountId32 , } , # [codec (index = 32)] # [doc = "A tip was sent."] TipSent { collection : :: core :: primitive :: u32 , item : :: core :: primitive :: u32 , sender : :: subxt :: utils :: AccountId32 , receiver : :: subxt :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 33)] # [doc = "An `item` swap intent was created."] SwapCreated { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , # [codec (index = 34)] # [doc = "The swap was cancelled."] SwapCancelled { offered_collection : :: core :: primitive :: u32 , offered_item : :: core :: primitive :: u32 , desired_collection : :: core :: primitive :: u32 , desired_item : :: core :: option :: Option < :: core :: primitive :: u32 > , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , # [codec (index = 35)] # [doc = "The swap has been claimed."] SwapClaimed { sent_collection : :: core :: primitive :: u32 , sent_item : :: core :: primitive :: u32 , sent_item_owner : :: subxt :: utils :: AccountId32 , received_collection : :: core :: primitive :: u32 , received_item : :: core :: primitive :: u32 , received_item_owner : :: subxt :: utils :: AccountId32 , price : :: core :: option :: Option < runtime_types :: pallet_nfts :: types :: PriceWithDirection < :: core :: primitive :: u128 > > , deadline : :: core :: primitive :: u32 , } , } } pub mod types { use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct AttributeDeposit<_0, _1> { - pub account: ::core::option::Option<_1>, - pub amount: _0, - } #[derive( :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, @@ -50805,69 +35970,6 @@ pub mod api { pub ::core::primitive::u64, #[codec(skip)] pub ::core::marker::PhantomData<_0>, ); - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CancelAttributesApprovalWitness { - pub account_attributes: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CollectionConfig<_0, _1, _2> { - pub settings: runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::CollectionSetting, - >, - pub max_supply: ::core::option::Option<_1>, - pub mint_settings: - runtime_types::pallet_nfts::types::MintSettings<_0, _1, _1>, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CollectionDetails<_0, _1> { - pub owner: _0, - pub owner_deposit: _1, - pub items: ::core::primitive::u32, - pub item_metadatas: ::core::primitive::u32, - pub attributes: ::core::primitive::u32, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CollectionMetadata<_0> { - pub deposit: _0, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -50877,13 +35979,83 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum CollectionRole { + pub enum Data { + #[codec(index = 0)] + None, #[codec(index = 1)] - Issuer, + Raw0([::core::primitive::u8; 0usize]), #[codec(index = 2)] - Freezer, + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), #[codec(index = 4)] - Admin, + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50894,17 +36066,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum CollectionSetting { + pub enum IdentityField { #[codec(index = 1)] - TransferableItems, + Display, #[codec(index = 2)] - UnlockedMetadata, + Legal, #[codec(index = 4)] - UnlockedAttributes, + Web, #[codec(index = 8)] - UnlockedMaxSupply, + Riot, #[codec(index = 16)] - DepositRequired, + Email, + #[codec(index = 32)] + PgpFingerprint, + #[codec(index = 64)] + Image, + #[codec(index = 128)] + Twitter, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50915,13 +36093,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DestroyWitness { - #[codec(compact)] - pub items: ::core::primitive::u32, - #[codec(compact)] - pub item_metadatas: ::core::primitive::u32, - #[codec(compact)] - pub attributes: ::core::primitive::u32, + pub struct IdentityInfo { + pub additional: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: + ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50932,10 +36118,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemConfig { - pub settings: runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::ItemSetting, - >, + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50946,9 +36143,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemDeposit<_0, _1> { + pub struct RegistrarInfo<_0, _1> { pub account: _1, - pub amount: _0, + pub fee: _0, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -50959,11 +36159,21 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemDetails<_0, _1, _2> { - pub owner: _0, - pub approvals: _2, - pub deposit: _1, + pub struct Registration<_0> { + pub judgements: + runtime_types::sp_core::bounded::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: runtime_types::pallet_identity::types::IdentityInfo, } + } + } + 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, @@ -50973,12 +36183,9 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemMetadata<_0> { - pub deposit: _0, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - } + #[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, @@ -50988,9 +36195,14 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemMetadataDeposit<_0, _1> { - pub account: ::core::option::Option<_1>, - pub amount: _0, + #[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, @@ -51001,52 +36213,98 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ItemSetting { + #[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)] - Transferable, + #[doc = "At the end of the session, no offence was committed."] + AllGood, #[codec(index = 2)] - UnlockedMetadata, - #[codec(index = 4)] - UnlockedAttributes, + #[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, + >, + )>, + }, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemTip<_0, _1, _2, _3> { - pub collection: _0, - pub item: _0, - pub receiver: _2, - pub amount: _3, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintSettings<_0, _1, _2> { - pub mint_type: runtime_types::pallet_nfts::types::MintType<_1>, - pub price: ::core::option::Option<_0>, - pub start_block: ::core::option::Option<_1>, - pub end_block: ::core::option::Option<_1>, - pub default_item_settings: - runtime_types::pallet_nfts::types::BitFlags< - runtime_types::pallet_nfts::types::ItemSetting, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, >, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, - } + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, @@ -51056,13 +36314,122 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MintType<_0> { + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { #[codec(index = 0)] - Issuer, + #[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)] - Public, + #[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, ()>, + index: ::core::primitive::u32, + }, #[codec(index = 2)] - HolderOf(_0), + #[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, ()>, + 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, @@ -51073,8 +36440,23 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MintWitness<_0> { - pub owner_of_item: _0, + #[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, @@ -51085,16 +36467,30 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PalletFeature { + #[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)] - Trading, + #[doc = "A account index has been freed up (unassigned)."] + IndexFreed { index: ::core::primitive::u32 }, #[codec(index = 2)] - Attributes, - #[codec(index = 4)] - Approvals, - #[codec(index = 8)] - Swaps, + #[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, @@ -51104,13 +36500,67 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PendingSwap<_0, _1, _2, _3> { - pub desired_collection: _0, - pub desired_item: ::core::option::Option<_0>, - pub price: ::core::option::Option<_2>, - pub deadline: _0, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<(_3, _1)>, + #[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, ()>, + }, + #[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, ()>, + }, + #[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, ()>, + add: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + }, + #[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, ()>, + }, + #[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, ()>, + }, + #[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, @@ -51121,11 +36571,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum PriceDirection { + #[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)] - Send, + #[doc = "Already a member."] + AlreadyMember, #[codec(index = 1)] - Receive, + #[doc = "Not a member."] + NotMember, + #[codec(index = 2)] + #[doc = "Too many members."] + TooManyMembers, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -51136,13 +36592,30 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct PriceWithDirection<_0> { - pub amount: _0, - pub direction: runtime_types::pallet_nfts::types::PriceDirection, + #[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_nis { + pub mod pallet_multisig { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -51155,69 +36628,171 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid<_0, _1> { - pub amount: _0, - pub who: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "Place a bid."] + #[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< + runtime_types::polkadot_runtime::RuntimeCall, + >, + }, + #[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 = "Origin must be Signed, and account must have at least `amount` in free balance."] + #[doc = "If there are enough, then dispatch the call."] #[doc = ""] - #[doc = "- `amount`: The amount of the bid; these funds will be reserved, and if/when"] - #[doc = " consolidated, removed. Must be at least `MinBid`."] - #[doc = "- `duration`: The number of periods before which the newly consolidated bid may be"] - #[doc = " thawed. Must be greater than 1 and no more than `QueueCount`."] + #[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 = "Complexities:"] - #[doc = "- `Queues[duration].len()` (just take max)."] - place_bid { - #[codec(compact)] - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, - }, - #[codec(index = 1)] - #[doc = "Retract a previously placed bid."] + #[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 = "Origin must be Signed, and the account should have previously issued a still-active bid"] - #[doc = "of `amount` for `duration`."] + #[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 = "- `amount`: The amount of the previous bid."] - #[doc = "- `duration`: The duration of the previous bid."] - retract_bid { - #[codec(compact)] - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, + #[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< + runtime_types::polkadot_runtime::RuntimeCall, + >, + max_weight: runtime_types::sp_weights::weight_v2::Weight, }, #[codec(index = 2)] - #[doc = "Ensure we have sufficient funding for all potential payouts."] + #[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 = "- `origin`: Must be accepted by `FundOrigin`."] - fund_deficit, + #[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 = "Reduce or remove an outstanding receipt, placing the according proportion of funds into"] - #[doc = "the account of the owner."] - #[doc = ""] - #[doc = "- `origin`: Must be Signed and the account must be the owner of the receipt `index` as"] - #[doc = " well as any fungible counterpart."] - #[doc = "- `index`: The index of the receipt."] - #[doc = "- `portion`: If `Some`, then only the given portion of the receipt should be thawed. If"] - #[doc = " `None`, then all of it should be."] - thaw { - #[codec(compact)] - index: ::core::primitive::u32, - portion: ::core::option::Option<::core::primitive::u128>, + #[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( @@ -51232,45 +36807,47 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "The duration of the bid is less than one."] - DurationTooSmall, + #[doc = "Threshold must be 2 or greater."] + MinimumThreshold, #[codec(index = 1)] - #[doc = "The duration is the bid is greater than the number of queues."] - DurationTooBig, + #[doc = "Call is already approved by this signatory."] + AlreadyApproved, #[codec(index = 2)] - #[doc = "The amount of the bid is less than the minimum allowed."] - AmountTooSmall, + #[doc = "Call doesn't need any (more) approvals."] + NoApprovalsNeeded, #[codec(index = 3)] - #[doc = "The queue for the bid's duration is full and the amount bid is too low to get in"] - #[doc = "through replacing an existing bid."] - BidTooLow, + #[doc = "There are too few signatories in the list."] + TooFewSignatories, #[codec(index = 4)] - #[doc = "Bond index is unknown."] - Unknown, + #[doc = "There are too many signatories in the list."] + TooManySignatories, #[codec(index = 5)] - #[doc = "Not the owner of the receipt."] - NotOwner, + #[doc = "The signatories were provided out of order; they should be ordered."] + SignatoriesOutOfOrder, #[codec(index = 6)] - #[doc = "Bond not yet at expiry date."] - NotExpired, + #[doc = "The sender was contained in the other signatories; it shouldn't be."] + SenderInSignatories, #[codec(index = 7)] - #[doc = "The given bid for retraction is not found."] + #[doc = "Multisig operation not found when attempting to cancel."] NotFound, #[codec(index = 8)] - #[doc = "The portion supplied is beyond the value of the receipt."] - TooMuch, + #[doc = "Only the account that originally created the multisig is able to cancel it."] + NotOwner, #[codec(index = 9)] - #[doc = "Not enough funds are held to pay out."] - Unfunded, + #[doc = "No timepoint was given, yet the multisig operation is already underway."] + NoTimepoint, #[codec(index = 10)] - #[doc = "There are enough funds for what is required."] - Funded, + #[doc = "A different timepoint was given to the multisig operation that is underway."] + WrongTimepoint, #[codec(index = 11)] - #[doc = "The thaw throttle has been reached for this period."] - Throttled, + #[doc = "A timepoint was given, yet no multisig operation is underway."] + UnexpectedTimepoint, #[codec(index = 12)] - #[doc = "The operation would result in a receipt worth an insignficant value."] - MakesDust, + #[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, @@ -51284,85 +36861,76 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "A bid was successfully placed."] - BidPlaced { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, + #[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 bid was successfully removed (before being accepted)."] - BidRetracted { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, + #[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 bid was dropped from a queue because of another, more substantial, bid was present."] - BidDropped { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - duration: ::core::primitive::u32, + #[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 bid was accepted. The balance may not be released until expiry."] - Issued { - index: ::core::primitive::u32, - expiry: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - proportion: runtime_types::sp_arithmetic::per_things::Perquintill, - amount: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "An receipt has been (at least partially) thawed."] - Thawed { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - proportion: runtime_types::sp_arithmetic::per_things::Perquintill, - amount: ::core::primitive::u128, - dropped: ::core::primitive::bool, - }, - #[codec(index = 5)] - #[doc = "An automatic funding of the deficit was made."] - Funded { deficit: ::core::primitive::u128 }, - #[codec(index = 6)] - #[doc = "A receipt was transfered."] - Transferred { - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - index: ::core::primitive::u32, + #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReceiptRecord<_0, _1> { - pub proportion: runtime_types::sp_arithmetic::per_things::Perquintill, - pub who: _0, - pub expiry: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct SummaryRecord<_0> { - pub proportion_owed: - runtime_types::sp_arithmetic::per_things::Perquintill, - pub index: _0, - pub thawed: runtime_types::sp_arithmetic::per_things::Perquintill, - pub last_period: _0, - } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + Debug, + )] + #[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 { @@ -51442,17 +37010,12 @@ pub mod api { #[doc = "# Note"] #[doc = ""] #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] - #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] - #[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."] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If"] + #[doc = "there are too many unlocking chunks, the result of this call will likely be the"] + #[doc = "`NoMoreChunks` error from the staking system."] unbond { - member_account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, #[codec(compact)] unbonding_points: ::core::primitive::u128, }, @@ -51488,10 +37051,8 @@ pub mod api { #[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, - >, + member_account: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, num_slashing_spans: ::core::primitive::u32, }, #[codec(index = 6)] @@ -51515,18 +37076,12 @@ pub mod api { 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, - >, + root: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 7)] #[doc = "Create a new delegation pool with a previously used pool id"] @@ -51538,18 +37093,12 @@ pub mod api { 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, - >, + root: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + nominator: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + state_toggler: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, pool_id: ::core::primitive::u32, }, #[codec(index = 8)] @@ -52184,15 +37733,13 @@ pub mod api { #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] #[doc = "- `call`: The call to be made by the `real` account."] proxy { - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, force_proxy_type: ::core::option::Option< - runtime_types::kitchensink_runtime::ProxyType, + runtime_types::polkadot_runtime::ProxyType, >, call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, }, #[codec(index = 1)] @@ -52206,11 +37753,9 @@ pub mod api { #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] #[doc = "zero."] add_proxy { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, #[codec(index = 2)] @@ -52222,11 +37767,9 @@ pub mod api { #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] remove_proxy { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, #[codec(index = 3)] @@ -52257,7 +37800,7 @@ pub mod api { #[doc = ""] #[doc = "Fails if there are insufficient funds to pay for deposit."] create_pure { - proxy_type: runtime_types::kitchensink_runtime::ProxyType, + proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, }, @@ -52279,11 +37822,9 @@ pub mod api { #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] #[doc = "account whose `pure` call has corresponding parameters."] kill_pure { - spawner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, + spawner: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + proxy_type: runtime_types::polkadot_runtime::ProxyType, index: ::core::primitive::u16, #[codec(compact)] height: ::core::primitive::u32, @@ -52307,10 +37848,8 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] announce { - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, }, #[codec(index = 7)] @@ -52325,10 +37864,8 @@ pub mod api { #[doc = "- `real`: The account that the proxy will make a call on behalf of."] #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] remove_announcement { - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, call_hash: ::subxt::utils::H256, }, #[codec(index = 8)] @@ -52341,262 +37878,35 @@ pub mod api { #[doc = ""] #[doc = "Parameters:"] #[doc = "- `delegate`: The account that previously announced the call."] - #[doc = "- `call_hash`: The hash of the call to be made."] - reject_announcement { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 9)] - #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] - #[doc = "`add_proxy`."] - #[doc = ""] - #[doc = "Removes any corresponding announcement(s)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `real`: The account that the proxy will make a call on behalf of."] - #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] - #[doc = "- `call`: The call to be made by the `real` account."] - proxy_announced { - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - real: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - force_proxy_type: ::core::option::Option< - runtime_types::kitchensink_runtime::ProxyType, - >, - call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "There are too many proxies registered or too many announcements pending."] - TooMany, - #[codec(index = 1)] - #[doc = "Proxy registration not found."] - NotFound, - #[codec(index = 2)] - #[doc = "Sender is not a proxy of the account to be proxied."] - NotProxy, - #[codec(index = 3)] - #[doc = "A call which is incompatible with the proxy type's filter was attempted."] - Unproxyable, - #[codec(index = 4)] - #[doc = "Account is already a proxy."] - Duplicate, - #[codec(index = 5)] - #[doc = "Call may not be made by proxy because it may escalate its privileges."] - NoPermission, - #[codec(index = 6)] - #[doc = "Announcement, if made at all, was made too recently."] - Unannounced, - #[codec(index = 7)] - #[doc = "Cannot add self as proxy."] - NoSelfProxy, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - #[doc = "A proxy was executed correctly, with the given."] - ProxyExecuted { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, - #[codec(index = 1)] - #[doc = "A pure account has been created by new proxy with given"] - #[doc = "disambiguation index and proxy type."] - PureCreated { - pure: ::subxt::utils::AccountId32, - who: ::subxt::utils::AccountId32, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - disambiguation_index: ::core::primitive::u16, - }, - #[codec(index = 2)] - #[doc = "An announcement was placed to make a call in the future."] - Announced { - real: ::subxt::utils::AccountId32, - proxy: ::subxt::utils::AccountId32, - call_hash: ::subxt::utils::H256, - }, - #[codec(index = 3)] - #[doc = "A proxy was added."] - ProxyAdded { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - #[codec(index = 4)] - #[doc = "A proxy was removed."] - ProxyRemoved { - delegator: ::subxt::utils::AccountId32, - delegatee: ::subxt::utils::AccountId32, - proxy_type: runtime_types::kitchensink_runtime::ProxyType, - delay: ::core::primitive::u32, - }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Announcement<_0, _1, _2> { - pub real: _0, - pub call_hash: _1, - pub height: _2, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ProxyDefinition<_0, _1, _2> { - pub delegate: _0, - pub proxy_type: _1, - pub delay: _2, - } - } - pub mod pallet_ranked_collective { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Introduce a new member."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of non-member which will become a member."] - #[doc = "- `rank`: The rank to give the new member."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - add_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Increment the rank of an existing member by one."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - promote_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 2)] - #[doc = "Decrement the rank of an existing member by one. If the member is already at rank zero,"] - #[doc = "then they are removed entirely."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = ""] - #[doc = "Weight: `O(1)`, less if the member's index is highest in its rank."] - demote_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - #[doc = "Remove the member entirely."] - #[doc = ""] - #[doc = "- `origin`: Must be the `AdminOrigin`."] - #[doc = "- `who`: Account of existing member of rank greater than zero."] - #[doc = "- `min_rank`: The rank of the member or greater."] - #[doc = ""] - #[doc = "Weight: `O(min_rank)`."] - remove_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - min_rank: ::core::primitive::u16, - }, - #[codec(index = 4)] - #[doc = "Add an aye or nay vote for the sender to the given proposal."] - #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by a member account."] - #[doc = "- `poll`: Index of a poll which is ongoing."] - #[doc = "- `aye`: `true` if the vote is to approve the proposal, `false` otherwise."] - #[doc = ""] - #[doc = "Transaction fees are be waived if the member is voting on any particular proposal"] - #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] - #[doc = "fee."] - #[doc = ""] - #[doc = "Weight: `O(1)`, less if there was no previous vote on the poll by the member."] - vote { - poll: ::core::primitive::u32, - aye: ::core::primitive::bool, + #[doc = "- `call_hash`: The hash of the call to be made."] + reject_announcement { + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + call_hash: ::subxt::utils::H256, }, - #[codec(index = 5)] - #[doc = "Remove votes from the given poll. It must have ended."] + #[codec(index = 9)] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] #[doc = ""] - #[doc = "- `origin`: Must be `Signed` by any account."] - #[doc = "- `poll_index`: Index of a poll which is completed and for which votes continue to"] - #[doc = " exist."] - #[doc = "- `max`: Maximum number of vote items from remove in this call."] + #[doc = "Removes any corresponding announcement(s)."] #[doc = ""] - #[doc = "Transaction fees are waived if the operation is successful."] + #[doc = "The dispatch origin for this call must be _Signed_."] #[doc = ""] - #[doc = "Weight `O(max)` (less if there are fewer items to remove than `max`)."] - cleanup_poll { - poll_index: ::core::primitive::u32, - max: ::core::primitive::u32, + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy_announced { + delegate: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + real: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + force_proxy_type: ::core::option::Option< + runtime_types::polkadot_runtime::ProxyType, + >, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, + >, }, } #[derive( @@ -52611,32 +37921,29 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "Account is already a member."] - AlreadyMember, + #[doc = "There are too many proxies registered or too many announcements pending."] + TooMany, #[codec(index = 1)] - #[doc = "Account is not a member."] - NotMember, + #[doc = "Proxy registration not found."] + NotFound, #[codec(index = 2)] - #[doc = "The given poll index is unknown or has closed."] - NotPolling, + #[doc = "Sender is not a proxy of the account to be proxied."] + NotProxy, #[codec(index = 3)] - #[doc = "The given poll is still ongoing."] - Ongoing, + #[doc = "A call which is incompatible with the proxy type's filter was attempted."] + Unproxyable, #[codec(index = 4)] - #[doc = "There are no further records to be removed."] - NoneRemaining, + #[doc = "Account is already a proxy."] + Duplicate, #[codec(index = 5)] - #[doc = "Unexpected error in state."] - Corruption, + #[doc = "Call may not be made by proxy because it may escalate its privileges."] + NoPermission, #[codec(index = 6)] - #[doc = "The member's rank is too low to vote."] - RankTooLow, + #[doc = "Announcement, if made at all, was made too recently."] + Unannounced, #[codec(index = 7)] - #[doc = "The information provided is incorrect."] - InvalidWitness, - #[codec(index = 8)] - #[doc = "The origin is not sufficiently privileged to do the operation."] - NoPermission, + #[doc = "Cannot add self as proxy."] + NoSelfProxy, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -52650,44 +37957,47 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "A member `who` has been added."] - MemberAdded { who: ::subxt::utils::AccountId32 }, + #[doc = "A proxy was executed correctly, with the given."] + ProxyExecuted { + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, #[codec(index = 1)] - #[doc = "The member `who`se rank has been changed to the given `rank`."] - RankChanged { + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + PureCreated { + pure: ::subxt::utils::AccountId32, who: ::subxt::utils::AccountId32, - rank: ::core::primitive::u16, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, }, #[codec(index = 2)] - #[doc = "The member `who` of given `rank` has been removed from the collective."] - MemberRemoved { - who: ::subxt::utils::AccountId32, - rank: ::core::primitive::u16, + #[doc = "An announcement was placed to make a call in the future."] + Announced { + real: ::subxt::utils::AccountId32, + proxy: ::subxt::utils::AccountId32, + call_hash: ::subxt::utils::H256, }, #[codec(index = 3)] - #[doc = "The member `who` has voted for the `poll` with the given `vote` leading to an updated"] - #[doc = "`tally`."] - Voted { - who: ::subxt::utils::AccountId32, - poll: ::core::primitive::u32, - vote: runtime_types::pallet_ranked_collective::VoteRecord, - tally: runtime_types::pallet_ranked_collective::Tally, + #[doc = "A proxy was added."] + ProxyAdded { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A proxy was removed."] + ProxyRemoved { + delegator: ::subxt::utils::AccountId32, + delegatee: ::subxt::utils::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, }, } } - #[derive( - :: subxt :: ext :: codec :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MemberRecord { - pub rank: ::core::primitive::u16, - } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -52697,10 +38007,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Tally { - pub bare_ayes: ::core::primitive::u32, - pub ayes: ::core::primitive::u32, - pub nays: ::core::primitive::u32, + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -52711,14 +38021,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VoteRecord { - #[codec(index = 0)] - Aye(::core::primitive::u32), - #[codec(index = 1)] - Nay(::core::primitive::u32), + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, } } - pub mod pallet_recovery { + pub mod pallet_scheduler { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -52734,164 +38043,76 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "Send a call through a recovered account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."] - #[doc = "- `call`: The call you want to make with the recovered account."] - as_recovered { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + #[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< - runtime_types::kitchensink_runtime::RuntimeCall, + runtime_types::polkadot_runtime::RuntimeCall, >, }, #[codec(index = 1)] - #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"] - #[doc = "for a lost account directly."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _ROOT_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The \"lost account\" to be recovered."] - #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."] - set_recovered { - lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + #[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, - >, - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, >, }, - #[codec(index = 2)] - #[doc = "Create a recovery configuration for your account. This makes your account recoverable."] - #[doc = ""] - #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"] - #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"] - #[doc = "in full when the user calls `remove_recovery`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"] - #[doc = " ordered and contain no duplicate values."] - #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"] - #[doc = " account can be recovered. Should be less than or equal to the length of the list of"] - #[doc = " friends."] - #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"] - #[doc = " needs to pass before the account can be recovered."] - create_recovery { - friends: ::std::vec::Vec<::subxt::utils::AccountId32>, - threshold: ::core::primitive::u16, - delay_period: ::core::primitive::u32, - }, #[codec(index = 3)] - #[doc = "Initiate the process for recovering a recoverable account."] - #[doc = ""] - #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"] - #[doc = "recovery process. This deposit will always be repatriated to the account"] - #[doc = "trying to be recovered. See `close_recovery`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to recover. This account needs to be"] - #[doc = " recoverable (i.e. have a recovery configuration)."] - initiate_recovery { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, + #[doc = "Cancel a named scheduled task."] + cancel_named { + id: [::core::primitive::u8; 32usize], }, #[codec(index = 4)] - #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"] - #[doc = "process for that account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""] - #[doc = "for the recoverable account."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `lost`: The lost account that you want to recover."] - #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."] + #[doc = "Anonymously schedule a task after a delay."] #[doc = ""] - #[doc = "The combination of these two parameters must point to an active recovery"] - #[doc = "process."] - vouch_recovery { - lost: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + #[doc = "# "] + #[doc = "Same as [`schedule`]."] + #[doc = "# "] + schedule_after { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( ::core::primitive::u32, - >, - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, >, }, #[codec(index = 5)] - #[doc = "Allow a successful rescuer to claim their recovered account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""] - #[doc = "who has successfully completed the account recovery process: collected"] - #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"] - #[doc = " you."] - claim_recovery { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 6)] - #[doc = "As the controller of a recoverable account, close an active recovery"] - #[doc = "process for your account."] - #[doc = ""] - #[doc = "Payment: By calling this function, the recoverable account will receive"] - #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account with an active recovery process for it."] + #[doc = "Schedule a named task after a delay."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `rescuer`: The account trying to rescue this recoverable account."] - close_recovery { - rescuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, + #[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, - >, - }, - #[codec(index = 7)] - #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."] - #[doc = ""] - #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"] - #[doc = "recovery attempts before calling this function else it will fail."] - #[doc = ""] - #[doc = "Payment: By calling this function the recoverable account will unreserve"] - #[doc = "their recovery configuration deposit."] - #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and must be a"] - #[doc = "recoverable account (i.e. has a recovery configuration)."] - remove_recovery, - #[codec(index = 8)] - #[doc = "Cancel the ability to use `as_recovered` for `account`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and registered to"] - #[doc = "be able to make calls on behalf of the recovered account."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `account`: The recovered account you are able to call on-behalf-of."] - cancel_recovered { - account: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, >, }, } @@ -52907,53 +38128,20 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "User is not allowed to make a call on behalf of this account"] - NotAllowed, + #[doc = "Failed to schedule a call"] + FailedToSchedule, #[codec(index = 1)] - #[doc = "Threshold must be greater than zero"] - ZeroThreshold, + #[doc = "Cannot find the scheduled call."] + NotFound, #[codec(index = 2)] - #[doc = "Friends list must be greater than zero and threshold"] - NotEnoughFriends, + #[doc = "Given target block number is in the past."] + TargetBlockNumberInPast, #[codec(index = 3)] - #[doc = "Friends list must be less than max friends"] - MaxFriends, + #[doc = "Reschedule failed because it does not change scheduled time."] + RescheduleNoChange, #[codec(index = 4)] - #[doc = "Friends list must be sorted and free of duplicates"] - NotSorted, - #[codec(index = 5)] - #[doc = "This account is not set up for recovery"] - NotRecoverable, - #[codec(index = 6)] - #[doc = "This account is already set up for recovery"] - AlreadyRecoverable, - #[codec(index = 7)] - #[doc = "A recovery process has already started for this account"] - AlreadyStarted, - #[codec(index = 8)] - #[doc = "A recovery process has not started for this rescuer"] - NotStarted, - #[codec(index = 9)] - #[doc = "This account is not a friend who can vouch"] - NotFriend, - #[codec(index = 10)] - #[doc = "The friend must wait until the delay period to vouch for this recovery"] - DelayPeriod, - #[codec(index = 11)] - #[doc = "This user has already vouched for this recovery"] - AlreadyVouched, - #[codec(index = 12)] - #[doc = "The threshold for recovering this account has not been met"] - Threshold, - #[codec(index = 13)] - #[doc = "There are still active recovery attempts that need to be closed"] - StillActive, - #[codec(index = 14)] - #[doc = "This account is already set up for recovery"] - AlreadyProxy, - #[codec(index = 15)] - #[doc = "Some internal state is broken."] - BadState, + #[doc = "Attempt to use a non-named function on a named task."] + Named, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -52967,39 +38155,44 @@ pub mod api { #[doc = "Events type."] pub enum Event { #[codec(index = 0)] - #[doc = "A recovery process has been set up for an account."] - RecoveryCreated { - account: ::subxt::utils::AccountId32, + #[doc = "Scheduled some task."] + Scheduled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, }, #[codec(index = 1)] - #[doc = "A recovery process has been initiated for lost account by rescuer account."] - RecoveryInitiated { - lost_account: ::subxt::utils::AccountId32, - rescuer_account: ::subxt::utils::AccountId32, + #[doc = "Canceled some task."] + Canceled { + when: ::core::primitive::u32, + index: ::core::primitive::u32, }, #[codec(index = 2)] - #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."] - RecoveryVouched { - lost_account: ::subxt::utils::AccountId32, - rescuer_account: ::subxt::utils::AccountId32, - sender: ::subxt::utils::AccountId32, + #[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 = "A recovery process for lost account by rescuer account has been closed."] - RecoveryClosed { - lost_account: ::subxt::utils::AccountId32, - rescuer_account: ::subxt::utils::AccountId32, + #[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 = "Lost account has been successfully recovered by rescuer account."] - AccountRecovered { - lost_account: ::subxt::utils::AccountId32, - rescuer_account: ::subxt::utils::AccountId32, + #[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 = "A recovery process has been removed for an account."] - RecoveryRemoved { - lost_account: ::subxt::utils::AccountId32, + #[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]>, }, } } @@ -53012,28 +38205,17 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ActiveRecovery<_0, _1, _2> { - pub created: _0, - pub deposit: _1, - pub friends: _2, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RecoveryConfig<_0, _1, _2> { - pub delay_period: _0, - pub deposit: _1, - pub friends: _2, - pub threshold: ::core::primitive::u16, + 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_referenda { + pub mod pallet_session { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -53049,89 +38231,42 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "Propose a referendum on a privileged action."] - #[doc = ""] - #[doc = "- `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds"] - #[doc = " available."] - #[doc = "- `proposal_origin`: The origin from which the proposal should be executed."] - #[doc = "- `proposal`: The proposal."] - #[doc = "- `enactment_moment`: The moment that the proposal should be enacted."] - #[doc = ""] - #[doc = "Emits `Submitted`."] - submit { - proposal_origin: ::std::boxed::Box< - runtime_types::kitchensink_runtime::OriginCaller, - >, - proposal: - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - enactment_moment: - runtime_types::frame_support::traits::schedule::DispatchTime< - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Post the Decision Deposit for a referendum."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` and the account must have funds available for the"] - #[doc = " referendum's track's Decision Deposit."] - #[doc = "- `index`: The index of the submitted referendum whose Decision Deposit is yet to be"] - #[doc = " posted."] - #[doc = ""] - #[doc = "Emits `DecisionDepositPlaced`."] - place_decision_deposit { index: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "Refund the Decision Deposit for a closed referendum back to the depositor."] - #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Decision Deposit has not yet been"] - #[doc = " refunded."] - #[doc = ""] - #[doc = "Emits `DecisionDepositRefunded`."] - refund_decision_deposit { index: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "Cancel an ongoing referendum."] - #[doc = ""] - #[doc = "- `origin`: must be the `CancelOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Cancelled`."] - cancel { index: ::core::primitive::u32 }, - #[codec(index = 4)] - #[doc = "Cancel an ongoing referendum and slash the deposits."] - #[doc = ""] - #[doc = "- `origin`: must be the `KillOrigin`."] - #[doc = "- `index`: The index of the referendum to be cancelled."] - #[doc = ""] - #[doc = "Emits `Killed` and `DepositSlashed`."] - kill { index: ::core::primitive::u32 }, - #[codec(index = 5)] - #[doc = "Advance a referendum onto its next logical state. Only used internally."] + #[doc = "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 = "- `origin`: must be `Root`."] - #[doc = "- `index`: the referendum to be advanced."] - nudge_referendum { index: ::core::primitive::u32 }, - #[codec(index = 6)] - #[doc = "Advance a track onto its next logical state. Only used internally."] + #[doc = "The dispatch origin of this function must be signed."] #[doc = ""] - #[doc = "- `origin`: must be `Root`."] - #[doc = "- `track`: the track to be advanced."] + #[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::polkadot_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Removes any session key(s) of the function caller."] #[doc = ""] - #[doc = "Action item for when there is now one fewer referendum in the deciding phase and the"] - #[doc = "`DecidingCount` is not yet updated. This means that we should either:"] - #[doc = "- begin deciding another referendum (and leave `DecidingCount` alone); or"] - #[doc = "- decrement `DecidingCount`."] - one_fewer_deciding { track: ::core::primitive::u16 }, - #[codec(index = 7)] - #[doc = "Refund the Submission Deposit for a closed referendum back to the depositor."] + #[doc = "This doesn't take effect until the next session."] #[doc = ""] - #[doc = "- `origin`: must be `Signed` or `Root`."] - #[doc = "- `index`: The index of a closed referendum whose Submission Deposit has not yet been"] - #[doc = " refunded."] + #[doc = "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 = "Emits `SubmissionDepositRefunded`."] - refund_submission_deposit { index: ::core::primitive::u32 }, + #[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, @@ -53142,44 +38277,23 @@ pub mod api { )] #[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"] + #[doc = "Error for the session pallet."] pub enum Error { #[codec(index = 0)] - #[doc = "Referendum is not ongoing."] - NotOngoing, + #[doc = "Invalid ownership proof."] + InvalidProof, #[codec(index = 1)] - #[doc = "Referendum's decision deposit is already paid."] - HasDeposit, + #[doc = "No associated validator ID for account."] + NoAssociatedValidatorId, #[codec(index = 2)] - #[doc = "The track identifier given was invalid."] - BadTrack, + #[doc = "Registered duplicate key."] + DuplicatedKey, #[codec(index = 3)] - #[doc = "There are already a full complement of referenda in progress for this track."] - Full, + #[doc = "No keys are associated with this account."] + NoKeys, #[codec(index = 4)] - #[doc = "The queue of the track is empty."] - QueueEmpty, - #[codec(index = 5)] - #[doc = "The referendum index provided is invalid in this context."] - BadReferendum, - #[codec(index = 6)] - #[doc = "There was nothing to do in the advancement."] - NothingToDo, - #[codec(index = 7)] - #[doc = "No track exists for the proposal origin."] - NoTrack, - #[codec(index = 8)] - #[doc = "Any deposit cannot be refunded until after the decision is over."] - Unfinished, - #[codec(index = 9)] - #[doc = "The deposit refunder is not the depositor."] - NoPermission, - #[codec(index = 10)] - #[doc = "The deposit cannot be refunded since none was made."] - NoDeposit, - #[codec(index = 11)] - #[doc = "The referendum status is invalid for this operation."] - BadStatus, + #[doc = "Key setting account is not live, so it's impossible to associate keys."] + NoAccount, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -53193,93 +38307,676 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "A referendum has been submitted."] - Submitted { - index: ::core::primitive::u32, - track: ::core::primitive::u16, - proposal: - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "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, + (), + >, + #[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. In that case, [`Call::withdraw_unbonded`] need"] + #[doc = "to be called first 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, + (), + >, + >, + }, + #[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 = 1)] - #[doc = "The decision deposit has been placed."] - DecisionDepositPlaced { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 2)] - #[doc = "The decision deposit has been refunded."] - DecisionDepositRefunded { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 3)] - #[doc = "A deposit has been slashaed."] - DepositSlashed { - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, - #[codec(index = 4)] - #[doc = "A referendum has moved into the deciding phase."] - DecisionStarted { - index: ::core::primitive::u32, - track: ::core::primitive::u16, - proposal: - runtime_types::frame_support::traits::preimages::Bounded< - runtime_types::kitchensink_runtime::RuntimeCall, + }, + #[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, + (), >, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 5)] - ConfirmStarted { index: ::core::primitive::u32 }, - #[codec(index = 6)] - ConfirmAborted { index: ::core::primitive::u32 }, - #[codec(index = 7)] - #[doc = "A referendum has ended its confirmation phase and is ready for approval."] - Confirmed { - index: ::core::primitive::u32, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 8)] - #[doc = "A referendum has been approved and its proposal has been scheduled."] - Approved { index: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "A proposal has been rejected by referendum."] - Rejected { - index: ::core::primitive::u32, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 10)] - #[doc = "A referendum has been timed out without being decided."] - TimedOut { - index: ::core::primitive::u32, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 11)] - #[doc = "A referendum has been cancelled."] - Cancelled { - index: ::core::primitive::u32, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 12)] - #[doc = "A referendum has been killed."] - Killed { - index: ::core::primitive::u32, - tally: runtime_types::pallet_ranked_collective::Tally, - }, - #[codec(index = 13)] - #[doc = "The submission deposit has been refunded."] - SubmissionDepositRefunded { - index: ::core::primitive::u32, - who: ::subxt::utils::AccountId32, - amount: ::core::primitive::u128, - }, + }, + #[codec(index = 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::SlashCancelOrigin`."] + #[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, + (), + >, + >, + }, + #[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, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "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, + Debug, + )] + #[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 = "One staker (and potentially its nominators) has been slashed by the given amount."] + Slashed { + staker: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "An old slashing report from a prior era was discarded because it could"] + #[doc = "not be processed."] + OldSlashingReportDiscarded { + session_index: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A new set of stakers was elected."] + StakersElected, + #[codec(index = 5)] + #[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 = 6)] + #[doc = "An account has unbonded this amount."] + Unbonded { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] + #[doc = "from the unlocking queue."] + Withdrawn { + stash: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "A nominator has been kicked from a validator."] + Kicked { + nominator: ::subxt::utils::AccountId32, + stash: ::subxt::utils::AccountId32, + }, + #[codec(index = 9)] + #[doc = "The election failed. No new era is planned."] + StakingElectionFailed, + #[codec(index = 10)] + #[doc = "An account has stopped participating as either a validator or nominator."] + Chilled { stash: ::subxt::utils::AccountId32 }, + #[codec(index = 11)] + #[doc = "The stakers' rewards are getting paid."] + PayoutStarted { + era_index: ::core::primitive::u32, + validator_stash: ::subxt::utils::AccountId32, + }, + #[codec(index = 12)] + #[doc = "A validator has set their preferences."] + ValidatorPrefsSet { + stash: ::subxt::utils::AccountId32, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + } } } - pub mod types { + pub mod slashing { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -53290,52 +38987,11 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Curve { - #[codec(index = 0)] - LinearDecreasing { - length: runtime_types::sp_arithmetic::per_things::Perbill, - floor: runtime_types::sp_arithmetic::per_things::Perbill, - ceil: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 1)] - SteppedDecreasing { - begin: runtime_types::sp_arithmetic::per_things::Perbill, - end: runtime_types::sp_arithmetic::per_things::Perbill, - step: runtime_types::sp_arithmetic::per_things::Perbill, - period: runtime_types::sp_arithmetic::per_things::Perbill, - }, - #[codec(index = 2)] - Reciprocal { - factor: runtime_types::sp_arithmetic::fixed_point::FixedI64, - x_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, - y_offset: runtime_types::sp_arithmetic::fixed_point::FixedI64, - }, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DecidingStatus<_0> { - pub since: _0, - pub confirming: ::core::option::Option<_0>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Deposit<_0, _1> { - pub who: _0, - pub amount: _1, + 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, @@ -53346,173 +39002,230 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ReferendumInfo<_0, _1, _2, _3, _4, _5, _6, _7> { - #[codec(index = 0)] - Ongoing( - runtime_types::pallet_referenda::types::ReferendumStatus< - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - >, - ), - #[codec(index = 1)] - Approved( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 2)] - Rejected( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 3)] - Cancelled( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 4)] - TimedOut( - _2, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - ), - #[codec(index = 5)] - Killed(_2), + 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ReferendumStatus<_0, _1, _2, _3, _4, _5, _6, _7> { - pub track: _0, - pub origin: _1, - pub proposal: _3, - pub enactment: - runtime_types::frame_support::traits::schedule::DispatchTime<_2>, - pub submitted: _2, - pub submission_deposit: - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - pub decision_deposit: ::core::option::Option< - runtime_types::pallet_referenda::types::Deposit<_6, _4>, - >, - pub deciding: ::core::option::Option< - runtime_types::pallet_referenda::types::DecidingStatus<_2>, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[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< + runtime_types::pallet_staking::IndividualExposure<_0, _1>, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V1_0_0Ancient, + #[codec(index = 1)] + V2_0_0, + #[codec(index = 2)] + V3_0_0, + #[codec(index = 3)] + V4_0_0, + #[codec(index = 4)] + V5_0_0, + #[codec(index = 5)] + V6_0_0, + #[codec(index = 6)] + V7_0_0, + #[codec(index = 7)] + V8_0_0, + #[codec(index = 8)] + V9_0_0, + #[codec(index = 9)] + V10_0_0, + #[codec(index = 10)] + V11_0_0, + #[codec(index = 11)] + V12_0_0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RewardDestination<_0> { + #[codec(index = 0)] + Staked, + #[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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 tally: _5, - pub in_queue: ::core::primitive::bool, - pub alarm: ::core::option::Option<(_2, _7)>, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TrackInfo<_0, _1> { - pub name: ::std::string::String, - pub max_deciding: _1, - pub decision_deposit: _0, - pub prepare_period: _1, - pub decision_period: _1, - pub confirm_period: _1, - pub min_enactment_period: _1, - pub min_approval: runtime_types::pallet_referenda::types::Curve, - pub min_support: runtime_types::pallet_referenda::types::Curve, - } } - } - pub mod pallet_remark { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "Index and store data off chain."] - store { - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "Attempting to store empty data."] - Empty, - #[codec(index = 1)] - #[doc = "Attempted to call `store` outside of block execution."] - BadContext, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\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 = "Stored data off chain."] - Stored { - sender: ::subxt::utils::AccountId32, - content_hash: ::subxt::utils::H256, - }, - } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct 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, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 pallet_root_testing { + pub mod pallet_timestamp { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -53528,14 +39241,30 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "A dispatch that will fill the block weight up to the given ratio."] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, + #[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_scheduler { + pub mod pallet_tips { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -53551,78 +39280,143 @@ pub mod api { #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, + #[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, ()>, }, #[codec(index = 1)] - #[doc = "Cancel an anonymously scheduled task."] - cancel { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + #[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 = "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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, + #[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, ()>, + #[codec(compact)] + tip_value: ::core::primitive::u128, }, #[codec(index = 3)] - #[doc = "Cancel a named scheduled task."] - cancel_named { - id: [::core::primitive::u8; 32usize], + #[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 = "Anonymously schedule a task after a delay."] + #[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 = "Same as [`schedule`]."] + #[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 = "# "] - 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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, + close_tip { hash: ::subxt::utils::H256 }, #[codec(index = 5)] - #[doc = "Schedule a named task after a delay."] + #[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 = "Same as [`schedule_named`](Self::schedule_named)."] + #[doc = " `T` is charged as upper bound given by `ContainsLengthBound`."] + #[doc = " The actual cost depends on the implementation of `T::Tippers`."] #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, + slash_tip { hash: ::subxt::utils::H256 }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -53636,20 +39430,23 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "Failed to schedule a call"] - FailedToSchedule, + #[doc = "The reason given is just too big."] + ReasonTooBig, #[codec(index = 1)] - #[doc = "Cannot find the scheduled call."] - NotFound, + #[doc = "The tip was already found/started."] + AlreadyKnown, #[codec(index = 2)] - #[doc = "Given target block number is in the past."] - TargetBlockNumberInPast, + #[doc = "The tip hash is unknown."] + UnknownTip, #[codec(index = 3)] - #[doc = "Reschedule failed because it does not change scheduled time."] - RescheduleNoChange, + #[doc = "The account attempting to retract the tip is not the finder of the tip."] + NotFinder, #[codec(index = 4)] - #[doc = "Attempt to use a non-named function on a named task."] - Named, + #[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, @@ -53660,47 +39457,74 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Events type."] + #[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 = "Scheduled some task."] - Scheduled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + #[doc = "A new tip suggestion has been opened."] + NewTip { tip_hash: ::subxt::utils::H256 }, #[codec(index = 1)] - #[doc = "Canceled some task."] - Canceled { - when: ::core::primitive::u32, - index: ::core::primitive::u32, - }, + #[doc = "A tip suggestion has reached threshold and is closing."] + TipClosing { tip_hash: ::subxt::utils::H256 }, #[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, - >, + #[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 = "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]>, - }, + #[doc = "A tip suggestion has been retracted."] + TipRetracted { tip_hash: ::subxt::utils::H256 }, #[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]>, + #[doc = "A tip suggestion has been slashed."] + TipSlashed { + tip_hash: ::subxt::utils::H256, + finder: ::subxt::utils::AccountId32, + deposit: ::core::primitive::u128, }, - #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OpenTip<_0, _1, _2, _3> { + pub reason: _3, + pub who: _0, + pub finder: _0, + pub deposit: _1, + pub closes: ::core::option::Option<_2>, + pub tips: ::std::vec::Vec<(_0, _1)>, + pub finders_fee: ::core::primitive::bool, + } + } + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\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, }, } } @@ -53713,17 +39537,26 @@ pub mod api { )] #[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 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, } } - pub mod pallet_session { + pub mod pallet_treasury { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -53739,42 +39572,85 @@ pub mod api { #[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 = "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)`. 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 = "- Complexity: O(1)"] + #[doc = "- DbReads: `ProposalCount`, `origin account`"] + #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"] #[doc = "# "] - set_keys { - keys: runtime_types::kitchensink_runtime::SessionKeys, - proof: ::std::vec::Vec<::core::primitive::u8>, + propose_spend { + #[codec(compact)] + value: ::core::primitive::u128, + beneficiary: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, }, #[codec(index = 1)] - #[doc = "Removes any session key(s) of the function caller."] + #[doc = "Reject a proposed spend. The original deposit will be slashed."] #[doc = ""] - #[doc = "This doesn't take effect until the next session."] + #[doc = "May only be called from `T::RejectOrigin`."] #[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 = "- 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)` 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 = "- Complexity: O(1)."] + #[doc = "- DbReads: `Proposals`, `Approvals`"] + #[doc = "- DbWrite: `Approvals`"] #[doc = "# "] - purge_keys, + 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, ()>, + }, + #[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, @@ -53785,23 +39661,24 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Error for the session pallet."] + #[doc = "Error for the treasury pallet."] pub enum Error { #[codec(index = 0)] - #[doc = "Invalid ownership proof."] - InvalidProof, + #[doc = "Proposer's balance is too low."] + InsufficientProposersBalance, #[codec(index = 1)] - #[doc = "No associated validator ID for account."] - NoAssociatedValidatorId, + #[doc = "No proposal or bounty at that index."] + InvalidIndex, #[codec(index = 2)] - #[doc = "Registered duplicate key."] - DuplicatedKey, + #[doc = "Too many approvals in the queue."] + TooManyApprovals, #[codec(index = 3)] - #[doc = "No keys are associated with this account."] - NoKeys, + #[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 = "Key setting account is not live, so it's impossible to associate keys."] - NoAccount, + #[doc = "Proposal has not been approved."] + ProposalNotApproved, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -53815,15 +39692,67 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "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 = "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, }, } } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 mod pallet_society { + pub mod pallet_utility { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -53839,346 +39768,106 @@ pub mod api { #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] pub enum Call { #[codec(index = 0)] - #[doc = "A user outside of the society can make a bid for entry."] - #[doc = ""] - #[doc = "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned"] - #[doc = "when the bid becomes a member, or if the bid calls `unbid`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `value`: A one time payment the bid would like to receive when joining the society."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)"] - #[doc = "- Storage Reads:"] - #[doc = "\t- One storage read to check for suspended candidate. O(1)"] - #[doc = "\t- One storage read to check for suspended member. O(1)"] - #[doc = "\t- One storage read to retrieve all current bids. O(B)"] - #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] - #[doc = "\t- One storage read to retrieve all members. O(M)"] - #[doc = "- Storage Writes:"] - #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] - #[doc = " w/ read)"] - #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] - #[doc = "- Notable Computation:"] - #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] - #[doc = "\t- O(log B) search to insert the new bid sorted."] - #[doc = "- External Pallet Operations:"] - #[doc = "\t- One balance reserve operation. O(X)"] - #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] - #[doc = "- Events:"] - #[doc = "\t- One event for new bid."] - #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] - #[doc = ""] - #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] - #[doc = "# "] - bid { value: ::core::primitive::u128 }, - #[codec(index = 1)] - #[doc = "A bidder can remove their bid for entry into society."] - #[doc = "By doing so, they will have their candidate deposit returned or"] - #[doc = "they will unvouch their voucher."] + #[doc = "Send a batch of dispatch calls."] #[doc = ""] - #[doc = "Payment: The bid deposit is unreserved if the user made a bid."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a bidder."] + #[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 = "Parameters:"] - #[doc = "- `pos`: Position in the `Bids` vector of the bid who wants to unbid."] + #[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 = "Key: B (len of bids), X (balance unreserve)"] - #[doc = "- One storage read and write to retrieve and update the bids. O(B)"] - #[doc = "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(B + X)"] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] #[doc = "# "] - unbid { pos: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "As a member, vouch for someone to join society by placing a bid on their behalf."] - #[doc = ""] - #[doc = "There is no deposit required to vouch for a new bid, but a member can only vouch for"] - #[doc = "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by"] - #[doc = "the suspension judgement origin, the member will be banned from vouching again."] - #[doc = ""] - #[doc = "As a vouching member, you can claim a tip if the candidate is accepted. This tip will"] - #[doc = "be paid as a portion of the reward the member will receive for joining the society."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who`: The user who you would like to vouch for."] - #[doc = "- `value`: The total reward to be paid between you and the candidate if they become"] - #[doc = "a member in the society."] - #[doc = "- `tip`: Your cut of the total `value` payout when the candidate is inducted into"] - #[doc = "the society. Tips larger than `value` will be saturated upon payout."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), C (len of candidates), M (len of members)"] - #[doc = "- Storage Reads:"] - #[doc = "\t- One storage read to retrieve all members. O(M)"] - #[doc = "\t- One storage read to check member is not already vouching. O(1)"] - #[doc = "\t- One storage read to check for suspended candidate. O(1)"] - #[doc = "\t- One storage read to check for suspended member. O(1)"] - #[doc = "\t- One storage read to retrieve all current bids. O(B)"] - #[doc = "\t- One storage read to retrieve all current candidates. O(C)"] - #[doc = "- Storage Writes:"] - #[doc = "\t- One storage write to insert vouching status to the member. O(1)"] - #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"] - #[doc = " w/ read)"] - #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"] - #[doc = "- Notable Computation:"] - #[doc = "\t- O(log M) search to check sender is a member."] - #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."] - #[doc = "\t- O(log B) search to insert the new bid sorted."] - #[doc = "- External Pallet Operations:"] - #[doc = "\t- One balance reserve operation. O(X)"] - #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."] - #[doc = "- Events:"] - #[doc = "\t- One event for vouch."] - #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."] - #[doc = ""] - #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"] - #[doc = "# "] - vouch { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - value: ::core::primitive::u128, - tip: ::core::primitive::u128, + #[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 = 3)] - #[doc = "As a vouching member, unvouch a bid. This only works while vouched user is"] - #[doc = "only a bidder (and not a candidate)."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a vouching member."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `pos`: Position in the `Bids` vector of the bid who should be unvouched."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids)"] - #[doc = "- One storage read O(1) to check the signer is a vouching member."] - #[doc = "- One storage mutate to retrieve and update the bids. O(B)"] - #[doc = "- One vouching storage removal. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(B)"] - #[doc = "# "] - unvouch { pos: ::core::primitive::u32 }, - #[codec(index = 4)] - #[doc = "As a member, vote on a candidate."] + #[codec(index = 1)] + #[doc = "Send a call through an indexed pseudonym of the sender."] #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `candidate`: The candidate that the member would like to bid on."] - #[doc = "- `approve`: A boolean which says if the candidate should be approved (`true`) or"] - #[doc = " rejected (`false`)."] + #[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 = "# "] - #[doc = "Key: C (len of candidates), M (len of members)"] - #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] - #[doc = "- One account lookup."] - #[doc = "- One storage read O(C) and O(C) search to check that user is a candidate."] - #[doc = "- One storage write to add vote to votes. O(1)"] - #[doc = "- One event."] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] #[doc = ""] - #[doc = "Total Complexity: O(M + logM + C)"] - #[doc = "# "] - vote { - candidate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + #[doc = "The dispatch origin for this call must be _Signed_."] + as_derivative { + index: ::core::primitive::u16, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, >, - approve: ::core::primitive::bool, }, - #[codec(index = 5)] - #[doc = "As a member, vote on the defender."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `approve`: A boolean which says if the candidate should be"] - #[doc = "approved (`true`) or rejected (`false`)."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Key: M (len of members)"] - #[doc = "- One storage read O(M) and O(log M) search to check user is a member."] - #[doc = "- One storage write to add vote to votes. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM)"] - #[doc = "# "] - defender_vote { approve: ::core::primitive::bool }, - #[codec(index = 6)] - #[doc = "Transfer the first matured payout for the sender and remove it from the records."] - #[doc = ""] - #[doc = "NOTE: This extrinsic needs to be called multiple times to claim multiple matured"] - #[doc = "payouts."] - #[doc = ""] - #[doc = "Payment: The member will receive a payment equal to their first matured"] - #[doc = "payout to their free balance."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and a member with"] - #[doc = "payouts remaining."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: M (len of members), P (number of payouts for a particular member)"] - #[doc = "- One storage read O(M) and O(log M) search to check signer is a member."] - #[doc = "- One storage read O(P) to get all payouts for a member."] - #[doc = "- One storage read O(1) to get the current block number."] - #[doc = "- One currency transfer call. O(X)"] - #[doc = "- One storage write or removal to update the member's payouts. O(P)"] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + P + X)"] - #[doc = "# "] - payout, - #[codec(index = 7)] - #[doc = "Found the society."] + #[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 = "This is done as a discrete action in order to allow for the"] - #[doc = "pallet to be included into a running chain and can only be done once."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _FounderSetOrigin_."] + #[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 = "Parameters:"] - #[doc = "- `founder` - The first member and head of the newly founded society."] - #[doc = "- `max_members` - The initial max number of members for the society."] - #[doc = "- `rules` - The rules of this society concerning membership."] + #[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 = "- Two storage mutates to set `Head` and `Founder`. O(1)"] - #[doc = "- One storage write to add the first member to society. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] #[doc = "# "] - found { - founder: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - max_members: ::core::primitive::u32, - rules: ::std::vec::Vec<::core::primitive::u8>, + batch_all { + calls: + ::std::vec::Vec, }, - #[codec(index = 8)] - #[doc = "Annul the founding of the society."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be Signed, and the signing account must be both"] - #[doc = "the `Founder` and the `Head`. This implies that it may only be done when there is one"] - #[doc = "member."] - #[doc = ""] - #[doc = "# "] - #[doc = "- Two storage reads O(1)."] - #[doc = "- Four storage removals O(1)."] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] - #[doc = "# "] - unfound, - #[codec(index = 9)] - #[doc = "Allow suspension judgement origin to make judgement on a suspended member."] - #[doc = ""] - #[doc = "If a suspended member is forgiven, we simply add them back as a member, not affecting"] - #[doc = "any of the existing storage items for that member."] - #[doc = ""] - #[doc = "If a suspended member is rejected, remove all associated storage items, including"] - #[doc = "their payouts, and remove any vouched bids they currently have."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] + #[codec(index = 3)] + #[doc = "Dispatches a function call with a provided origin."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who` - The suspended member to be judged."] - #[doc = "- `forgive` - A boolean representing whether the suspension judgement origin forgives"] - #[doc = " (`true`) or rejects (`false`) a suspended member."] + #[doc = "The dispatch origin for this call must be _Root_."] #[doc = ""] #[doc = "# "] - #[doc = "Key: B (len of bids), M (len of members)"] - #[doc = "- One storage read to check `who` is a suspended member. O(1)"] - #[doc = "- Up to one storage write O(M) with O(log M) binary search to add a member back to"] - #[doc = " society."] - #[doc = "- Up to 3 storage removals O(1) to clean up a removed member."] - #[doc = "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids."] - #[doc = "- Up to one additional event if unvouch takes place."] - #[doc = "- One storage removal. O(1)"] - #[doc = "- One event for the judgement."] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + B)"] + #[doc = "- O(1)."] + #[doc = "- Limited storage reads."] + #[doc = "- One DB write (event)."] + #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."] #[doc = "# "] - judge_suspended_member { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + dispatch_as { + as_origin: ::std::boxed::Box< + runtime_types::polkadot_runtime::OriginCaller, >, - forgive: ::core::primitive::bool, - }, - #[codec(index = 10)] - #[doc = "Allow suspended judgement origin to make judgement on a suspended candidate."] - #[doc = ""] - #[doc = "If the judgement is `Approve`, we add them to society as a member with the appropriate"] - #[doc = "payment for joining society."] - #[doc = ""] - #[doc = "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back"] - #[doc = "to the society treasury, or we ban the voucher from vouching again."] - #[doc = ""] - #[doc = "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go"] - #[doc = "through the induction process again."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `who` - The suspended candidate to be judged."] - #[doc = "- `judgement` - `Approve`, `Reject`, or `Rebid`."] - #[doc = ""] - #[doc = "# "] - #[doc = "Key: B (len of bids), M (len of members), X (balance action)"] - #[doc = "- One storage read to check `who` is a suspended candidate."] - #[doc = "- One storage removal of the suspended candidate."] - #[doc = "- Approve Logic"] - #[doc = "\t- One storage read to get the available pot to pay users with. O(1)"] - #[doc = "\t- One storage write to update the available pot. O(1)"] - #[doc = "\t- One storage read to get the current block number. O(1)"] - #[doc = "\t- One storage read to get all members. O(M)"] - #[doc = "\t- Up to one unreserve currency action."] - #[doc = "\t- Up to two new storage writes to payouts."] - #[doc = "\t- Up to one storage write with O(log M) binary search to add a member to society."] - #[doc = "- Reject Logic"] - #[doc = "\t- Up to one repatriate reserved currency action. O(X)"] - #[doc = "\t- Up to one storage write to ban the vouching member from vouching again."] - #[doc = "- Rebid Logic"] - #[doc = "\t- Storage mutate with O(log B) binary search to place the user back into bids."] - #[doc = "- Up to one additional event if unvouch takes place."] - #[doc = "- One storage removal."] - #[doc = "- One event for the judgement."] - #[doc = ""] - #[doc = "Total Complexity: O(M + logM + B + X)"] - #[doc = "# "] - judge_suspended_candidate { - who: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, + call: ::std::boxed::Box< + runtime_types::polkadot_runtime::RuntimeCall, >, - judgement: runtime_types::pallet_society::Judgement, }, - #[codec(index = 11)] - #[doc = "Allows root origin to change the maximum number of members in society."] - #[doc = "Max membership count must be greater than 1."] + #[codec(index = 4)] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] #[doc = ""] - #[doc = "The dispatch origin for this call must be from _ROOT_."] + #[doc = "May be called from any origin except `None`."] #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `max` - The maximum number of members for the society."] + #[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 = "- One storage write to update the max. O(1)"] - #[doc = "- One event."] - #[doc = ""] - #[doc = "Total Complexity: O(1)"] + #[doc = "- Complexity: O(C) where C is the number of calls to be batched."] #[doc = "# "] - set_max_members { max: ::core::primitive::u32 }, + force_batch { + calls: + ::std::vec::Vec, + }, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -54192,59 +39881,8 @@ pub mod api { #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] pub enum Error { #[codec(index = 0)] - #[doc = "An incorrect position was provided."] - BadPosition, - #[codec(index = 1)] - #[doc = "User is not a member."] - NotMember, - #[codec(index = 2)] - #[doc = "User is already a member."] - AlreadyMember, - #[codec(index = 3)] - #[doc = "User is suspended."] - Suspended, - #[codec(index = 4)] - #[doc = "User is not suspended."] - NotSuspended, - #[codec(index = 5)] - #[doc = "Nothing to payout."] - NoPayout, - #[codec(index = 6)] - #[doc = "Society already founded."] - AlreadyFounded, - #[codec(index = 7)] - #[doc = "Not enough in pot to accept candidate."] - InsufficientPot, - #[codec(index = 8)] - #[doc = "Member is already vouching or banned from vouching again."] - AlreadyVouching, - #[codec(index = 9)] - #[doc = "Member is not vouching."] - NotVouching, - #[codec(index = 10)] - #[doc = "Cannot remove the head of the chain."] - Head, - #[codec(index = 11)] - #[doc = "Cannot remove the founder."] - Founder, - #[codec(index = 12)] - #[doc = "User has already made a bid."] - AlreadyBid, - #[codec(index = 13)] - #[doc = "User is already a candidate."] - AlreadyCandidate, - #[codec(index = 14)] - #[doc = "User is not a candidate."] - NotCandidate, - #[codec(index = 15)] - #[doc = "Too many members in the society."] - MaxMembers, - #[codec(index = 16)] - #[doc = "The caller is not the founder."] - NotFounder, - #[codec(index = 17)] - #[doc = "The caller is not the head."] - NotHead, + #[doc = "Too many calls batched."] + TooManyCalls, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -54258,853 +39896,445 @@ pub mod api { #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] pub enum Event { #[codec(index = 0)] - #[doc = "The society is founded by the given identity."] - Founded { - founder: ::subxt::utils::AccountId32, + #[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 = "A membership bid just happened. The given account is the candidate's ID and their offer"] - #[doc = "is the second."] - Bid { - candidate_id: ::subxt::utils::AccountId32, - offer: ::core::primitive::u128, - }, + #[doc = "Batch of dispatches completed fully with no error."] + BatchCompleted, #[codec(index = 2)] - #[doc = "A membership bid just happened by vouching. The given account is the candidate's ID and"] - #[doc = "their offer is the second. The vouching party is the third."] - Vouch { - candidate_id: ::subxt::utils::AccountId32, - offer: ::core::primitive::u128, - vouching: ::subxt::utils::AccountId32, - }, + #[doc = "Batch of dispatches completed but has errors."] + BatchCompletedWithErrors, #[codec(index = 3)] - #[doc = "A candidate was dropped (due to an excess of bids in the system)."] - AutoUnbid { - candidate: ::subxt::utils::AccountId32, - }, + #[doc = "A single item within a Batch of dispatches has completed with no error."] + ItemCompleted, #[codec(index = 4)] - #[doc = "A candidate was dropped (by their request)."] - Unbid { - candidate: ::subxt::utils::AccountId32, + #[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 candidate was dropped (by request of who vouched for them)."] - Unvouch { - candidate: ::subxt::utils::AccountId32, - }, - #[codec(index = 6)] - #[doc = "A group of candidates have been inducted. The batch's primary is the first value, the"] - #[doc = "batch in full is the second."] - Inducted { - primary: ::subxt::utils::AccountId32, - candidates: ::std::vec::Vec<::subxt::utils::AccountId32>, - }, - #[codec(index = 7)] - #[doc = "A suspended member has been judged."] - SuspendedMemberJudgement { - who: ::subxt::utils::AccountId32, - judged: ::core::primitive::bool, - }, - #[codec(index = 8)] - #[doc = "A candidate has been suspended"] - CandidateSuspended { - candidate: ::subxt::utils::AccountId32, - }, - #[codec(index = 9)] - #[doc = "A member has been suspended"] - MemberSuspended { member: ::subxt::utils::AccountId32 }, - #[codec(index = 10)] - #[doc = "A member has been challenged"] - Challenged { member: ::subxt::utils::AccountId32 }, - #[codec(index = 11)] - #[doc = "A vote has been placed"] - Vote { - candidate: ::subxt::utils::AccountId32, - voter: ::subxt::utils::AccountId32, - vote: ::core::primitive::bool, - }, - #[codec(index = 12)] - #[doc = "A vote has been placed for a defending member"] - DefenderVote { - voter: ::subxt::utils::AccountId32, - vote: ::core::primitive::bool, - }, - #[codec(index = 13)] - #[doc = "A new \\[max\\] member count has been set"] - NewMaxMembers { max: ::core::primitive::u32 }, - #[codec(index = 14)] - #[doc = "Society is unfounded."] - Unfounded { - founder: ::subxt::utils::AccountId32, - }, - #[codec(index = 15)] - #[doc = "Some funds were deposited into the society account."] - Deposit { value: ::core::primitive::u128 }, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Bid<_0, _1> { - pub who: _0, - pub kind: runtime_types::pallet_society::BidKind<_0, _1>, - pub value: _1, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum BidKind<_0, _1> { - #[codec(index = 0)] - Deposit(_1), - #[codec(index = 1)] - Vouch(_0, _1), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Judgement { - #[codec(index = 0)] - Rebid, - #[codec(index = 1)] - Reject, - #[codec(index = 2)] - Approve, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Vote { - #[codec(index = 0)] - Skeptic, - #[codec(index = 1)] - Reject, - #[codec(index = 2)] - Approve, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum VouchingStatus { - #[codec(index = 0)] - Vouching, - #[codec(index = 1)] - Banned, - } - } - 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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] - pub enum Call { - #[codec(index = 0)] - #[doc = "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, - >, + #[doc = "A call was dispatched."] + DispatchedAs { + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + } + } + } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 2 Reads, 2 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] + #[doc = "# "] + vest, + #[codec(index = 1)] + #[doc = "Unlock any vested funds of a `target` account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] + #[doc = "# "] + vest_other { + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + }, + #[codec(index = 2)] + #[doc = "Create a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 3 Reads, 3 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] + #[doc = "# "] + vested_transfer { + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "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, - Debug, - )] - #[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, - }, - } + }, + #[codec(index = 3)] + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "# "] + #[doc = "- `O(1)`."] + #[doc = "- DbWeight: 4 Reads, 4 Writes"] + #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] + #[doc = "# "] + force_vested_transfer { + source: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + target: + ::subxt::utils::MultiAddress<::subxt::utils::AccountId32, ()>, + schedule: + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Error for the vesting pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The account given is not vesting."] + NotVesting, + #[codec(index = 1)] + #[doc = "The account already has `MaxVestingSchedules` count of schedules and thus"] + #[doc = "cannot add another one. Consider merging existing schedules in order to add another."] + AtMaxVestingSchedules, + #[codec(index = 2)] + #[doc = "Amount being transferred is too low to create a vesting schedule."] + AmountLow, + #[codec(index = 3)] + #[doc = "An index was out of bounds of the vesting schedules."] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + #[doc = "Failed to create a new schedule because some parameter was invalid."] + InvalidScheduleParams, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + VestingUpdated { + account: ::subxt::utils::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "An \\[account\\] has become fully vested."] + VestingCompleted { + account: ::subxt::utils::AccountId32, + }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod pallet_xcm { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + send { + dest: + ::std::boxed::Box, + message: ::std::boxed::Box, + }, + #[codec(index = 1)] + #[doc = "Teleport some assets from the local chain to some destination chain."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] + #[doc = "with all fees taken as needed from the asset."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] + #[doc = " `dest` side. May not be empty."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + teleport_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] + #[doc = "chain and forward a notification XCM."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,"] + #[doc = "with all fees taken as needed from the asset."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] + #[doc = " `dest` side."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + reserve_transfer_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Execute an XCM message from a local, signed, origin."] + #[doc = ""] + #[doc = "An event is deposited indicating whether `msg` could be executed completely or only"] + #[doc = "partially."] + #[doc = ""] + #[doc = "No more than `max_weight` will be used in its attempted execution. If this is less than the"] + #[doc = "maximum amount of weight that the message could take to be executed, then no execution"] + #[doc = "attempt will be made."] + #[doc = ""] + #[doc = "NOTE: A successful return to this does *not* imply that the `msg` was executed successfully"] + #[doc = "to completion; only that *some* of it was executed."] + execute { + message: ::std::boxed::Box, + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + #[doc = "Extoll that a particular destination can be communicated with through a particular"] + #[doc = "version of XCM."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The destination that is being described."] + #[doc = "- `xcm_version`: The latest version of XCM that `location` supports."] + force_xcm_version { + location: ::std::boxed::Box< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + xcm_version: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Set a safe XCM version (the version that XCM should be encoded with if the most recent"] + #[doc = "version a destination can accept is unknown)."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."] + force_default_xcm_version { + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 6)] + #[doc = "Ask a location to notify us regarding their XCM version and any changes to it."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The location to which we should subscribe for XCM version notifications."] + force_subscribe_version_notify { + location: + ::std::boxed::Box, + }, + #[codec(index = 7)] + #[doc = "Require that a particular destination should no longer notify us regarding any XCM"] + #[doc = "version changes."] + #[doc = ""] + #[doc = "- `origin`: Must be Root."] + #[doc = "- `location`: The location to which we are currently subscribed for XCM version"] + #[doc = " notifications which we no longer desire."] + force_unsubscribe_version_notify { + location: + ::std::boxed::Box, + }, + #[codec(index = 8)] + #[doc = "Transfer some assets from the local chain to the sovereign account of a destination"] + #[doc = "chain and forward a notification XCM."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] + #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] + #[doc = "at risk."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the"] + #[doc = " `dest` side."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] + limited_reserve_transfer_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 9)] + #[doc = "Teleport some assets from the local chain to some destination chain."] + #[doc = ""] + #[doc = "Fee payment on the destination side is made from the asset in the `assets` vector of"] + #[doc = "index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight"] + #[doc = "is needed than `weight_limit`, then the operation will fail and the assets send may be"] + #[doc = "at risk."] + #[doc = ""] + #[doc = "- `origin`: Must be capable of withdrawing the `assets` and executing XCM."] + #[doc = "- `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send"] + #[doc = " from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain."] + #[doc = "- `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be"] + #[doc = " an `AccountId32` value."] + #[doc = "- `assets`: The assets to be withdrawn. The first item should be the currency used to to pay the fee on the"] + #[doc = " `dest` side. May not be empty."] + #[doc = "- `fee_asset_item`: The index into `assets` of the item which should be used to pay"] + #[doc = " fees."] + #[doc = "- `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase."] + limited_teleport_assets { + dest: + ::std::boxed::Box, + beneficiary: + ::std::boxed::Box, + assets: + ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, } - } - pub mod slashing { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55114,11 +40344,50 @@ pub mod api { )] #[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>, + #[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 desired destination was unreachable, generally because there is a no way of routing"] + #[doc = "to it."] + Unreachable, + #[codec(index = 1)] + #[doc = "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps"] + #[doc = "a lack of space for buffering the message."] + SendFailure, + #[codec(index = 2)] + #[doc = "The message execution fails the filter."] + Filtered, + #[codec(index = 3)] + #[doc = "The message's weight could not be determined."] + UnweighableMessage, + #[codec(index = 4)] + #[doc = "The destination `MultiLocation` provided cannot be inverted."] + DestinationNotInvertible, + #[codec(index = 5)] + #[doc = "The assets to be sent are empty."] + Empty, + #[codec(index = 6)] + #[doc = "Could not re-anchor the assets to declare the fees for the destination chain."] + CannotReanchor, + #[codec(index = 7)] + #[doc = "Too many assets have been attempted for transfer."] + TooManyAssets, + #[codec(index = 8)] + #[doc = "Origin is invalid for sending."] + InvalidOrigin, + #[codec(index = 9)] + #[doc = "The version of the `Versioned` value used is not able to be interpreted."] + BadVersion, + #[codec(index = 10)] + #[doc = "The given location could not be used (e.g. because it cannot be expressed in the"] + #[doc = "desired version of XCM)."] + BadLocation, + #[codec(index = 11)] + #[doc = "The referenced subscription could not be found."] + NoSubscription, + #[codec(index = 12)] + #[doc = "The location is invalid since it already has a subscription from us."] + AlreadySubscribed, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55129,11 +40398,242 @@ pub mod api { )] #[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, + #[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 = "Execution of an XCM message was attempted."] + #[doc = ""] + #[doc = "\\[ outcome \\]"] + Attempted(runtime_types::xcm::v2::traits::Outcome), + #[codec(index = 1)] + #[doc = "A XCM message was sent."] + #[doc = ""] + #[doc = "\\[ origin, destination, message \\]"] + Sent( + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::v2::Xcm, + ), + #[codec(index = 2)] + #[doc = "Query response received which does not match a registered query. This may be because a"] + #[doc = "matching query was never registered, it may be because it is a duplicate response, or"] + #[doc = "because the query timed out."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + UnexpectedResponse( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 3)] + #[doc = "Query response has been received and is ready for taking with `take_response`. There is"] + #[doc = "no registered notification call."] + #[doc = ""] + #[doc = "\\[ id, response \\]"] + ResponseReady( + ::core::primitive::u64, + runtime_types::xcm::v2::Response, + ), + #[codec(index = 4)] + #[doc = "Query response has been received and query is removed. The registered notification has"] + #[doc = "been dispatched and executed successfully."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + Notified( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 5)] + #[doc = "Query response has been received and query is removed. The registered notification could"] + #[doc = "not be dispatched because the dispatch weight is greater than the maximum weight"] + #[doc = "originally budgeted by this runtime for the query result."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index, actual weight, max budgeted weight \\]"] + NotifyOverweight( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + runtime_types::sp_weights::weight_v2::Weight, + runtime_types::sp_weights::weight_v2::Weight, + ), + #[codec(index = 6)] + #[doc = "Query response has been received and query is removed. There was a general error with"] + #[doc = "dispatching the notification call."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + NotifyDispatchError( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 7)] + #[doc = "Query response has been received and query is removed. The dispatch was unable to be"] + #[doc = "decoded into a `Call`; this might be due to dispatch function having a signature which"] + #[doc = "is not `(origin, QueryId, Response)`."] + #[doc = ""] + #[doc = "\\[ id, pallet index, call index \\]"] + NotifyDecodeFailed( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 8)] + #[doc = "Expected query response has been received but the origin location of the response does"] + #[doc = "not match that expected. The query remains registered for a later, valid, response to"] + #[doc = "be received and acted upon."] + #[doc = ""] + #[doc = "\\[ origin location, id, expected location \\]"] + InvalidResponder( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ::core::option::Option< + runtime_types::xcm::v1::multilocation::MultiLocation, + >, + ), + #[codec(index = 9)] + #[doc = "Expected query response has been received but the expected origin location placed in"] + #[doc = "storage by this runtime previously cannot be decoded. The query remains registered."] + #[doc = ""] + #[doc = "This is unexpected (since a location placed in storage in a previously executing"] + #[doc = "runtime should be readable prior to query timeout) and dangerous since the possibly"] + #[doc = "valid response will be dropped. Manual governance intervention is probably going to be"] + #[doc = "needed."] + #[doc = ""] + #[doc = "\\[ origin location, id \\]"] + InvalidResponderVersion( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 10)] + #[doc = "Received query response has been read and removed."] + #[doc = ""] + #[doc = "\\[ id \\]"] + ResponseTaken(::core::primitive::u64), + #[codec(index = 11)] + #[doc = "Some assets have been placed in an asset trap."] + #[doc = ""] + #[doc = "\\[ hash, origin, assets \\]"] + AssetsTrapped( + ::subxt::utils::H256, + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + #[codec(index = 12)] + #[doc = "An XCM version change notification message has been attempted to be sent."] + #[doc = ""] + #[doc = "\\[ destination, result \\]"] + VersionChangeNotified( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 13)] + #[doc = "The supported version of a location has been changed. This might be through an"] + #[doc = "automatic notification or a manual intervention."] + #[doc = ""] + #[doc = "\\[ location, XCM version \\]"] + SupportedVersionChanged( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 14)] + #[doc = "A given location which had a version change subscription was dropped owing to an error"] + #[doc = "sending the notification to it."] + #[doc = ""] + #[doc = "\\[ location, query ID, error \\]"] + NotifyTargetSendFail( + runtime_types::xcm::v1::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v2::traits::Error, + ), + #[codec(index = 15)] + #[doc = "A given location which had a version change subscription was dropped owing to an error"] + #[doc = "migrating the location to our new XCM format."] + #[doc = ""] + #[doc = "\\[ location, query ID \\]"] + NotifyTargetMigrationFail( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 16)] + #[doc = "Some assets have been claimed from an asset trap"] + #[doc = ""] + #[doc = "\\[ hash, origin, assets \\]"] + AssetsClaimed( + ::subxt::utils::H256, + runtime_types::xcm::v1::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Origin { + #[codec(index = 0)] + Xcm(runtime_types::xcm::v1::multilocation::MultiLocation), + #[codec(index = 1)] + Response(runtime_types::xcm::v1::multilocation::MultiLocation), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum QueryStatus<_0> { + #[codec(index = 0)] + Pending { + responder: runtime_types::xcm::VersionedMultiLocation, + maybe_notify: ::core::option::Option<( + ::core::primitive::u8, + ::core::primitive::u8, + )>, + timeout: _0, + }, + #[codec(index = 1)] + VersionNotifier { + origin: runtime_types::xcm::VersionedMultiLocation, + is_active: ::core::primitive::bool, + }, + #[codec(index = 2)] + Ready { + response: runtime_types::xcm::VersionedResponse, + at: _0, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum VersionMigrationStage { + #[codec(index = 0)] + MigrateSupportedVersion, + #[codec(index = 1)] + MigrateVersionNotifiers, + #[codec(index = 2)] + NotifyCurrentTargets( + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ), + #[codec(index = 3)] + MigrateAndNotifyOldTargets, } } + } + pub mod polkadot_core_primitives { + use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55143,111 +40643,7 @@ pub mod api { )] #[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, - Debug, - )] - #[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, - Debug, - )] - #[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< - runtime_types::pallet_staking::IndividualExposure<_0, _1>, - >, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum 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, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[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, - Debug, - )] - #[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, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum RewardDestination<_0> { - #[codec(index = 0)] - Staked, - #[codec(index = 1)] - Stash, - #[codec(index = 2)] - Controller, - #[codec(index = 3)] - Account(_0), - #[codec(index = 4)] - None, - } + pub struct CandidateHash(pub ::subxt::utils::H256); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55257,19 +40653,9 @@ pub mod api { )] #[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 struct InboundDownwardMessage<_0> { + pub sent_at: _0, + pub msg: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55280,12 +40666,9 @@ pub mod api { )] #[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 struct InboundHrmpMessage<_0> { + pub sent_at: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55296,32 +40679,265 @@ pub mod api { )] #[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 struct OutboundHrmpMessage<_0> { + pub recipient: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ValidatorPrefs { - #[codec(compact)] - pub commission: runtime_types::sp_arithmetic::per_things::Perbill, - pub blocked: ::core::primitive::bool, + } + pub mod polkadot_parachain { + use super::runtime_types; + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct HrmpChannelId { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: subxt :: ext :: codec :: CompactAs, + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Id(pub ::core::primitive::u32); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ValidationCodeHash(pub ::subxt::utils::H256); } } - pub mod pallet_state_trie_migration { + pub mod polkadot_primitives { use super::runtime_types; - pub mod pallet { + pub mod v2 { use super::runtime_types; + pub mod assignment_app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod collator_app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UncheckedSigned < _0 , _1 > { pub payload : _0 , pub validator_index : runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , pub signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _1 > } + } + pub mod validator_app { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct AvailabilityBitfield( + pub ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BackedCandidate<_0> { + pub candidate: + runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt< + _0, + >, + pub validity_votes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidityAttestation, + >, + pub validator_indices: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CandidateCommitments<_0> { + pub upward_messages: + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub horizontal_messages: ::std::vec::Vec< + runtime_types::polkadot_core_primitives::OutboundHrmpMessage< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + pub new_validation_code: ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + pub head_data: + runtime_types::polkadot_parachain::primitives::HeadData, + pub processed_downward_messages: _0, + pub hrmp_watermark: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CandidateDescriptor<_0> { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub relay_parent: _0, + pub collator: + runtime_types::polkadot_primitives::v2::collator_app::Public, + pub persisted_validation_data_hash: _0, + pub pov_hash: _0, + pub erasure_root: _0, + pub signature: + runtime_types::polkadot_primitives::v2::collator_app::Signature, + pub para_head: _0, + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CandidateReceipt<_0> { + pub descriptor: + runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub commitments_hash: _0, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct CommittedCandidateReceipt<_0> { + pub descriptor: + runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub commitments: + runtime_types::polkadot_primitives::v2::CandidateCommitments< + ::core::primitive::u32, + >, + } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -55330,9 +40946,7 @@ pub mod api { )] #[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 = "Control the automatic migration."] # [doc = ""] # [doc = "The dispatch origin of this call must be [`Config::ControlOrigin`]."] control_auto_migration { maybe_config : :: core :: option :: Option < runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits > , } , # [codec (index = 1)] # [doc = "Continue the migration for the given `limits`."] # [doc = ""] # [doc = "The dispatch origin of this call can be any signed account."] # [doc = ""] # [doc = "This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,"] # [doc = "Upon successful execution, the transaction fee is returned."] # [doc = ""] # [doc = "The (potentially over-estimated) of the byte length of all the data read must be"] # [doc = "provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing"] # [doc = "that executing the current `MigrationTask` with the given `limits` will not exceed"] # [doc = "`real_size_upper` bytes of read data."] # [doc = ""] # [doc = "The `witness_task` is merely a helper to prevent the caller from being slashed or"] # [doc = "generally trigger a migration that they do not intend. This parameter is just a message"] # [doc = "from caller, saying that they believed `witness_task` was the last state of the"] # [doc = "migration, and they only wish for their transaction to do anything, if this assumption"] # [doc = "holds. In case `witness_task` does not match, the transaction fails."] # [doc = ""] # [doc = "Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the"] # [doc = "recommended way of doing this is to pass a `limit` that only bounds `count`, as the"] # [doc = "`size` limit can always be overwritten."] continue_migrate { limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits , real_size_upper : :: core :: primitive :: u32 , witness_task : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationTask , } , # [codec (index = 2)] # [doc = "Migrate the list of top keys by iterating each of them one by one."] # [doc = ""] # [doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] # [doc = "should only be used in case any keys are leftover due to a bug."] migrate_custom_top { keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , witness_size : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Migrate the list of child keys by iterating each of them one by one."] # [doc = ""] # [doc = "All of the given child keys must be present under one `child_root`."] # [doc = ""] # [doc = "This does not affect the global migration process tracker ([`MigrationProcess`]), and"] # [doc = "should only be used in case any keys are leftover due to a bug."] migrate_custom_child { root : :: std :: vec :: Vec < :: core :: primitive :: u8 > , child_keys : :: std :: vec :: Vec < :: std :: vec :: Vec < :: core :: primitive :: u8 > > , total_size : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Set the maximum limit of the signed migration."] set_signed_max_limits { limits : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationLimits , } , # [codec (index = 5)] # [doc = "Forcefully set the progress the running migration."] # [doc = ""] # [doc = "This is only useful in one case: the next key to migrate is too big to be migrated with"] # [doc = "a signed account, in a parachain context, and we simply want to skip it. A reasonable"] # [doc = "example of this would be `:code:`, which is both very expensive to migrate, and commonly"] # [doc = "used, so probably it is already migrated."] # [doc = ""] # [doc = "In case you mess things up, you can also, in principle, use this to reset the migration"] # [doc = "process."] force_set_progress { progress_top : runtime_types :: pallet_state_trie_migration :: pallet :: Progress , progress_child : runtime_types :: pallet_state_trie_migration :: pallet :: Progress , } , } + pub struct CoreIndex(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55342,32 +40956,11 @@ pub mod api { )] #[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 { + pub enum CoreOccupied { #[codec(index = 0)] - #[doc = "Max signed limits not respected."] - MaxSignedLimits, + Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), #[codec(index = 1)] - #[doc = "A key was longer than the configured maximum."] - #[doc = ""] - #[doc = "This means that the migration halted at the current [`Progress`] and"] - #[doc = "can be resumed with a larger [`crate::Config::MaxKeyLen`] value."] - #[doc = "Retrying with the same [`crate::Config::MaxKeyLen`] value will not work."] - #[doc = "The value should only be increased to avoid a storage migration for the currently"] - #[doc = "stored [`crate::Progress::LastKey`]."] - KeyTooLong, - #[codec(index = 2)] - #[doc = "submitter does not have enough funds."] - NotEnoughFunds, - #[codec(index = 3)] - #[doc = "Bad witness data provided."] - BadWitness, - #[codec(index = 4)] - #[doc = "Signed migration is not allowed because the maximum limit is not set yet."] - SignedMigrationNotAllowed, - #[codec(index = 5)] - #[doc = "Bad child root provided."] - BadChildRoot, + Parachain, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55378,9 +40971,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Inner events of this pallet."] - pub enum Event { - # [codec (index = 0)] # [doc = "Given number of `(top, child)` keys were migrated respectively, with the given"] # [doc = "`compute`."] Migrated { top : :: core :: primitive :: u32 , child : :: core :: primitive :: u32 , compute : runtime_types :: pallet_state_trie_migration :: pallet :: MigrationCompute , } , # [codec (index = 1)] # [doc = "Some account got slashed by the given amount."] Slashed { who : :: subxt :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 2)] # [doc = "The auto migration task finished."] AutoMigrationFinished , # [codec (index = 3)] # [doc = "Migration got halted due to an error or miss-configuration."] Halted { error : runtime_types :: pallet_state_trie_migration :: pallet :: Error , } , } + pub struct DisputeState<_0> { + pub validators_for: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub validators_against: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub start: _0, + pub concluded_at: ::core::option::Option<_0>, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55390,12 +40992,8 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MigrationCompute { - #[codec(index = 0)] - Signed, - #[codec(index = 1)] - Auto, - } + pub enum DisputeStatement { + # [codec (index = 0)] Valid (runtime_types :: polkadot_primitives :: v2 :: ValidDisputeStatementKind ,) , # [codec (index = 1)] Invalid (runtime_types :: polkadot_primitives :: v2 :: InvalidDisputeStatementKind ,) , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55405,11 +41003,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MigrationLimits { - pub size: ::core::primitive::u32, - pub item: ::core::primitive::u32, + pub struct DisputeStatementSet { + pub candidate_hash: + runtime_types::polkadot_core_primitives::CandidateHash, + pub session: ::core::primitive::u32, + pub statements: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v2::DisputeStatement, + runtime_types::polkadot_primitives::v2::ValidatorIndex, + runtime_types::polkadot_primitives::v2::validator_app::Signature, + )>, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -55418,15 +41023,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MigrationTask { - pub progress_top: - runtime_types::pallet_state_trie_migration::pallet::Progress, - pub progress_child: - runtime_types::pallet_state_trie_migration::pallet::Progress, - pub size: ::core::primitive::u32, - pub top_items: ::core::primitive::u32, - pub child_items: ::core::primitive::u32, - } + pub struct GroupIndex(pub ::core::primitive::u32); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55436,24 +41033,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Progress { - #[codec(index = 0)] - ToStart, - #[codec(index = 1)] - LastKey( - runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - ), - #[codec(index = 2)] - Complete, - } - } - } - pub mod pallet_sudo { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + pub struct IndexedVec<_0, _1>( + pub ::std::vec::Vec<_1>, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55463,79 +41046,22 @@ pub mod api { )] #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - 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, + pub struct InherentData<_0> { + pub bitfields: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + runtime_types::polkadot_primitives::v2::AvailabilityBitfield, >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, + >, + pub backed_candidates: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::BackedCandidate< + ::subxt::utils::H256, >, - }, + >, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::DisputeStatementSet, + >, + pub parent_header: _0, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55546,11 +41072,9 @@ pub mod api { )] #[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 { + pub enum InvalidDisputeStatementKind { #[codec(index = 0)] - #[doc = "Sender must be the Sudo account"] - RequireSudo, + Explicit, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55561,36 +41085,101 @@ pub mod api { )] #[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 struct ParathreadClaim( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_primitives::v2::collator_app::Public, + ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ParathreadEntry { + pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, + pub retries: ::core::primitive::u32, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct PvfCheckStatement { + pub accept: ::core::primitive::bool, + pub subject: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub session_index: ::core::primitive::u32, + pub validator_index: + runtime_types::polkadot_primitives::v2::ValidatorIndex, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ScrapedOnChainVotes<_0> { + pub session: ::core::primitive::u32, + pub backing_validators_per_candidate: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v2::CandidateReceipt<_0>, + ::std::vec::Vec<( + runtime_types::polkadot_primitives::v2::ValidatorIndex, + runtime_types::polkadot_primitives::v2::ValidityAttestation, + )>, + )>, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::DisputeStatementSet, + >, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionInfo { + pub active_validator_indices: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, + pub random_seed: [::core::primitive::u8; 32usize], + pub dispute_period: ::core::primitive::u32, + pub validators: runtime_types::polkadot_primitives::v2::IndexedVec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, + pub discovery_keys: ::std::vec::Vec< + runtime_types::sp_authority_discovery::app::Public, + >, + pub assignment_keys: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::assignment_app::Public, + >, + pub validator_groups: + runtime_types::polkadot_primitives::v2::IndexedVec< + runtime_types::polkadot_primitives::v2::GroupIndex, + ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::ValidatorIndex, + >, >, - }, + pub n_cores: ::core::primitive::u32, + pub zeroth_delay_tranche_width: ::core::primitive::u32, + pub relay_vrf_modulo_samples: ::core::primitive::u32, + pub n_delay_tranches: ::core::primitive::u32, + pub no_show_slots: ::core::primitive::u32, + pub needed_approvals: ::core::primitive::u32, } - } - } - pub mod pallet_timestamp { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55600,36 +41189,12 @@ pub mod api { )] #[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 { + pub enum UpgradeGoAhead { #[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, - }, + Abort, + #[codec(index = 1)] + GoAhead, } - } - } - pub mod pallet_tips { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55639,150 +41204,9 @@ pub mod api { )] #[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 { + pub enum UpgradeRestriction { #[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 }, + Present, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55793,28 +41217,18 @@ pub mod api { )] #[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 { + pub enum ValidDisputeStatementKind { #[codec(index = 0)] - #[doc = "The reason given is just too big."] - ReasonTooBig, + Explicit, #[codec(index = 1)] - #[doc = "The tip was already found/started."] - AlreadyKnown, + BackingSeconded(::subxt::utils::H256), #[codec(index = 2)] - #[doc = "The tip hash is unknown."] - UnknownTip, + BackingValid(::subxt::utils::H256), #[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, + ApprovalChecking, } #[derive( + :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -55823,33 +41237,195 @@ pub mod api { )] #[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 }, + pub struct ValidatorIndex(pub ::core::primitive::u32); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ValidityAttestation { #[codec(index = 1)] - #[doc = "A tip suggestion has reached threshold and is closing."] - TipClosing { tip_hash: ::subxt::utils::H256 }, + Implicit( + runtime_types::polkadot_primitives::v2::validator_app::Signature, + ), #[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, - }, + Explicit( + runtime_types::polkadot_primitives::v2::validator_app::Signature, + ), } } + } + pub mod polkadot_runtime { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct NposCompactSolution16 { + 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>, + )>, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55859,40 +41435,33 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OpenTip<_0, _1, _2, _3> { - pub reason: _3, - pub who: _0, - pub finder: _0, - pub deposit: _1, - pub closes: ::core::option::Option<_2>, - pub tips: ::std::vec::Vec<(_0, _1)>, - pub finders_fee: ::core::primitive::bool, - } - } - pub mod pallet_transaction_payment { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\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, - }, - } + pub enum OriginCaller { + #[codec(index = 0)] + system( + runtime_types::frame_support::dispatch::RawOrigin< + ::subxt::utils::AccountId32, + >, + ), + #[codec(index = 15)] + Council( + runtime_types::pallet_collective::RawOrigin< + ::subxt::utils::AccountId32, + >, + ), + #[codec(index = 16)] + TechnicalCommittee( + runtime_types::pallet_collective::RawOrigin< + ::subxt::utils::AccountId32, + >, + ), + #[codec(index = 50)] + ParachainsOrigin( + runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, + ), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Origin), + #[codec(index = 5)] + Void(runtime_types::sp_core::Void), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -55903,17 +41472,297 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { + pub enum ProxyType { #[codec(index = 0)] - V1Ancient, + Any, #[codec(index = 1)] - V2, + NonTransfer, + #[codec(index = 2)] + Governance, + #[codec(index = 3)] + Staking, + #[codec(index = 5)] + IdentityJudgement, + #[codec(index = 6)] + CancelProxy, + #[codec(index = 7)] + Auction, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[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)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Call ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: 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)] Indices (runtime_types :: pallet_indices :: pallet :: Call ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Call ,) , # [codec (index = 6)] Authorship (runtime_types :: pallet_authorship :: pallet :: Call ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Call ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Call ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Call ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Call ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Call ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Call ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Call ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Call ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Call ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Call ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Call ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Call ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Call ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Call ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Call ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Call ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Call ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Call ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Call ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Call ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Call ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Call ,) , # [codec (index = 51)] Configuration (runtime_types :: polkadot_runtime_parachains :: configuration :: pallet :: Call ,) , # [codec (index = 52)] ParasShared (runtime_types :: polkadot_runtime_parachains :: shared :: pallet :: Call ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Call ,) , # [codec (index = 54)] ParaInherent (runtime_types :: polkadot_runtime_parachains :: paras_inherent :: pallet :: Call ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Call ,) , # [codec (index = 57)] Initializer (runtime_types :: polkadot_runtime_parachains :: initializer :: pallet :: Call ,) , # [codec (index = 58)] Dmp (runtime_types :: polkadot_runtime_parachains :: dmp :: pallet :: Call ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Call ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Call ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Call ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Call ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Call ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Call ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Call ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Call ,) , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum RuntimeEvent { + # [codec (index = 0)] System (runtime_types :: frame_system :: pallet :: Event ,) , # [codec (index = 1)] Scheduler (runtime_types :: pallet_scheduler :: pallet :: Event ,) , # [codec (index = 10)] Preimage (runtime_types :: pallet_preimage :: pallet :: Event ,) , # [codec (index = 4)] Indices (runtime_types :: pallet_indices :: pallet :: Event ,) , # [codec (index = 5)] Balances (runtime_types :: pallet_balances :: pallet :: Event ,) , # [codec (index = 32)] TransactionPayment (runtime_types :: pallet_transaction_payment :: pallet :: Event ,) , # [codec (index = 7)] Staking (runtime_types :: pallet_staking :: pallet :: pallet :: Event ,) , # [codec (index = 8)] Offences (runtime_types :: pallet_offences :: pallet :: Event ,) , # [codec (index = 9)] Session (runtime_types :: pallet_session :: pallet :: Event ,) , # [codec (index = 11)] Grandpa (runtime_types :: pallet_grandpa :: pallet :: Event ,) , # [codec (index = 12)] ImOnline (runtime_types :: pallet_im_online :: pallet :: Event ,) , # [codec (index = 14)] Democracy (runtime_types :: pallet_democracy :: pallet :: Event ,) , # [codec (index = 15)] Council (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 16)] TechnicalCommittee (runtime_types :: pallet_collective :: pallet :: Event ,) , # [codec (index = 17)] PhragmenElection (runtime_types :: pallet_elections_phragmen :: pallet :: Event ,) , # [codec (index = 18)] TechnicalMembership (runtime_types :: pallet_membership :: pallet :: Event ,) , # [codec (index = 19)] Treasury (runtime_types :: pallet_treasury :: pallet :: Event ,) , # [codec (index = 24)] Claims (runtime_types :: polkadot_runtime_common :: claims :: pallet :: Event ,) , # [codec (index = 25)] Vesting (runtime_types :: pallet_vesting :: pallet :: Event ,) , # [codec (index = 26)] Utility (runtime_types :: pallet_utility :: pallet :: Event ,) , # [codec (index = 28)] Identity (runtime_types :: pallet_identity :: pallet :: Event ,) , # [codec (index = 29)] Proxy (runtime_types :: pallet_proxy :: pallet :: Event ,) , # [codec (index = 30)] Multisig (runtime_types :: pallet_multisig :: pallet :: Event ,) , # [codec (index = 34)] Bounties (runtime_types :: pallet_bounties :: pallet :: Event ,) , # [codec (index = 38)] ChildBounties (runtime_types :: pallet_child_bounties :: pallet :: Event ,) , # [codec (index = 35)] Tips (runtime_types :: pallet_tips :: pallet :: Event ,) , # [codec (index = 36)] ElectionProviderMultiPhase (runtime_types :: pallet_election_provider_multi_phase :: pallet :: Event ,) , # [codec (index = 37)] VoterList (runtime_types :: pallet_bags_list :: pallet :: Event ,) , # [codec (index = 39)] NominationPools (runtime_types :: pallet_nomination_pools :: pallet :: Event ,) , # [codec (index = 40)] FastUnstake (runtime_types :: pallet_fast_unstake :: pallet :: Event ,) , # [codec (index = 53)] ParaInclusion (runtime_types :: polkadot_runtime_parachains :: inclusion :: pallet :: Event ,) , # [codec (index = 56)] Paras (runtime_types :: polkadot_runtime_parachains :: paras :: pallet :: Event ,) , # [codec (index = 59)] Ump (runtime_types :: polkadot_runtime_parachains :: ump :: pallet :: Event ,) , # [codec (index = 60)] Hrmp (runtime_types :: polkadot_runtime_parachains :: hrmp :: pallet :: Event ,) , # [codec (index = 62)] ParasDisputes (runtime_types :: polkadot_runtime_parachains :: disputes :: pallet :: Event ,) , # [codec (index = 70)] Registrar (runtime_types :: polkadot_runtime_common :: paras_registrar :: pallet :: Event ,) , # [codec (index = 71)] Slots (runtime_types :: polkadot_runtime_common :: slots :: pallet :: Event ,) , # [codec (index = 72)] Auctions (runtime_types :: polkadot_runtime_common :: auctions :: pallet :: Event ,) , # [codec (index = 73)] Crowdloan (runtime_types :: polkadot_runtime_common :: crowdloan :: pallet :: Event ,) , # [codec (index = 99)] XcmPallet (runtime_types :: pallet_xcm :: pallet :: Event ,) , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct SessionKeys { + pub grandpa: runtime_types::sp_finality_grandpa::app::Public, + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub im_online: + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + pub para_validator: + runtime_types::polkadot_primitives::v2::validator_app::Public, + pub para_assignment: + runtime_types::polkadot_primitives::v2::assignment_app::Public, + pub authority_discovery: + runtime_types::sp_authority_discovery::app::Public, } } - pub mod pallet_transaction_storage { + pub mod polkadot_runtime_common { use super::runtime_types; - pub mod pallet { + pub mod auctions { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Create a new auction."] + #[doc = ""] + #[doc = "This can only happen when there isn't already an auction in progress and may only be"] + #[doc = "called by the root origin. Accepts the `duration` of this auction and the"] + #[doc = "`lease_period_index` of the initial lease period of the four that are to be auctioned."] + new_auction { + #[codec(compact)] + duration: ::core::primitive::u32, + #[codec(compact)] + lease_period_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Make a new bid from an account (including a parachain account) for deploying a new"] + #[doc = "parachain."] + #[doc = ""] + #[doc = "Multiple simultaneous bids from the same bidder are allowed only as long as all active"] + #[doc = "bids overlap each other (i.e. are mutually exclusive). Bids cannot be redacted."] + #[doc = ""] + #[doc = "- `sub` is the sub-bidder ID, allowing for multiple competing bids to be made by (and"] + #[doc = "funded by) the same account."] + #[doc = "- `auction_index` is the index of the auction to bid on. Should just be the present"] + #[doc = "value of `AuctionCounter`."] + #[doc = "- `first_slot` is the first lease period index of the range to bid on. This is the"] + #[doc = "absolute lease period index value, not an auction-specific offset."] + #[doc = "- `last_slot` is the last lease period index of the range to bid on. This is the"] + #[doc = "absolute lease period index value, not an auction-specific offset."] + #[doc = "- `amount` is the amount to bid to be held as deposit for the parachain should the"] + #[doc = "bid win. This amount is held throughout the range."] + bid { + #[codec(compact)] + para: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + auction_index: ::core::primitive::u32, + #[codec(compact)] + first_slot: ::core::primitive::u32, + #[codec(compact)] + last_slot: ::core::primitive::u32, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Cancel an in-progress auction."] + #[doc = ""] + #[doc = "Can only be called by Root origin."] + cancel_auction, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "This auction is already in progress."] + AuctionInProgress, + #[codec(index = 1)] + #[doc = "The lease period is in the past."] + LeasePeriodInPast, + #[codec(index = 2)] + #[doc = "Para is not registered"] + ParaNotRegistered, + #[codec(index = 3)] + #[doc = "Not a current auction."] + NotCurrentAuction, + #[codec(index = 4)] + #[doc = "Not an auction."] + NotAuction, + #[codec(index = 5)] + #[doc = "Auction has already ended."] + AuctionEnded, + #[codec(index = 6)] + #[doc = "The para is already leased out for part of this range."] + AlreadyLeasedOut, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 auction started. Provides its index and the block number where it will begin to"] + #[doc = "close and the first lease period of the quadruplet that is auctioned."] + AuctionStarted { + auction_index: ::core::primitive::u32, + lease_period: ::core::primitive::u32, + ending: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "An auction ended. All funds become unreserved."] + AuctionClosed { + auction_index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Funds were reserved for a winning bid. First balance is the extra amount reserved."] + #[doc = "Second is the total."] + Reserved { + bidder: ::subxt::utils::AccountId32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Funds were unreserved since bidder is no longer active. `[bidder, amount]`"] + Unreserved { + bidder: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve"] + #[doc = "but no parachain slot has been leased."] + ReserveConfiscated { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "A new bid has been accepted as the current winner."] + BidAccepted { + bidder: ::subxt::utils::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "The winning offset was chosen for an auction. This will map into the `Winning` storage map."] + WinningOffset { + auction_index: ::core::primitive::u32, + block_number: ::core::primitive::u32, + }, + } + } + } + pub mod claims { use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Make a claim to collect your DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to claim is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)"] # [doc = ""] # [doc = "and `address` matches the `dest` account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , } , # [codec (index = 1)] # [doc = "Mint a new claim to collect DOTs."] # [doc = ""] # [doc = "The dispatch origin for this call must be _Root_."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `who`: The Ethereum address allowed to collect this claim."] # [doc = "- `value`: The number of DOTs that will be claimed."] # [doc = "- `vesting_schedule`: An optional vesting schedule for these DOTs."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "We assume worst case that both vesting and statement is being inserted."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] mint_claim { who : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , value : :: core :: primitive :: u128 , vesting_schedule : :: core :: option :: Option < (:: core :: primitive :: u128 , :: core :: primitive :: u128 , :: core :: primitive :: u32 ,) > , statement : :: core :: option :: Option < runtime_types :: polkadot_runtime_common :: claims :: StatementKind > , } , # [codec (index = 2)] # [doc = "Make a claim to collect your DOTs by signing a statement."] # [doc = ""] # [doc = "The dispatch origin for this call must be _None_."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] # [doc = "the expected signed message of:"] # [doc = ""] # [doc = "> Ethereum Signed Message:"] # [doc = "> (configured prefix string)(address)(statement)"] # [doc = ""] # [doc = "and `address` matches the `dest` account; the `statement` must match that which is"] # [doc = "expected according to your purchase arrangement."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `dest`: The destination account to payout the claim."] # [doc = "- `ethereum_signature`: The signature of an ethereum signed message"] # [doc = " matching the format described above."] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to validate unsigned `claim_attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] claim_attest { dest : :: subxt :: utils :: AccountId32 , ethereum_signature : runtime_types :: polkadot_runtime_common :: claims :: EcdsaSignature , statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 3)] # [doc = "Attest to a statement, needed to finalize the claims process."] # [doc = ""] # [doc = "WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `SignedExtension`."] # [doc = ""] # [doc = "Unsigned Validation:"] # [doc = "A call to attest is deemed valid if the sender has a `Preclaim` registered"] # [doc = "and provides a `statement` which is expected for the account."] # [doc = ""] # [doc = "Parameters:"] # [doc = "- `statement`: The identity of the statement which is being attested to in the signature."] # [doc = ""] # [doc = ""] # [doc = "The weight of this call is invariant over the input parameters."] # [doc = "Weight includes logic to do pre-validation on `attest` call."] # [doc = ""] # [doc = "Total Complexity: O(1)"] # [doc = ""] attest { statement : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 4)] move_claim { old : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , new : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , maybe_preclaim : :: 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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Invalid Ethereum signature."] + InvalidEthereumSignature, + #[codec(index = 1)] + #[doc = "Ethereum address has no claim."] + SignerHasNoClaim, + #[codec(index = 2)] + #[doc = "Account ID sending transaction has no claim."] + SenderHasNoClaim, + #[codec(index = 3)] + #[doc = "There's not enough in the pot to pay out some unvested amount. Generally implies a logic"] + #[doc = "error."] + PotUnderflow, + #[codec(index = 4)] + #[doc = "A needed statement was not included."] + InvalidStatement, + #[codec(index = 5)] + #[doc = "The account already has a vested balance."] + VestedBalanceExists, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Someone claimed some DOTs."] Claimed { who : :: subxt :: utils :: AccountId32 , ethereum_address : runtime_types :: polkadot_runtime_common :: claims :: EthereumAddress , amount : :: core :: primitive :: u128 , } , } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55923,9 +41772,7 @@ pub mod api { )] #[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 = "Index and store data off chain. Minimum data size is 1 bytes, maximum is"] # [doc = "`MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`"] # [doc = "is called. # "] # [doc = "- n*log(n) of data size, as all data is pushed to an in-memory trie."] # [doc = "Additionally contains a DB write."] # [doc = "# "] store { data : :: std :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 1)] # [doc = "Renew previously stored data. Parameters are the block number that contains"] # [doc = "previous `store` or `renew` call and transaction index within that block."] # [doc = "Transaction index is emitted in the `Stored` or `Renewed` event."] # [doc = "Applies same fees as `store`."] # [doc = "# "] # [doc = "- Constant."] # [doc = "# "] renew { block : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , } , # [codec (index = 2)] # [doc = "Check storage proof for block number `block_number() - StoragePeriod`."] # [doc = "If such block does not exist the proof is expected to be `None`."] # [doc = "# "] # [doc = "- Linear w.r.t the number of indexed transactions in the proved block for random"] # [doc = " probing."] # [doc = "There's a DB read for each transaction."] # [doc = "Here we assume a maximum of 100 probed transactions."] # [doc = "# "] check_proof { proof : runtime_types :: sp_transaction_storage_proof :: TransactionStorageProof , } , } + pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55935,48 +41782,7 @@ pub mod api { )] #[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 = "Insufficient account balance."] - InsufficientFunds, - #[codec(index = 1)] - #[doc = "Invalid configuration."] - NotConfigured, - #[codec(index = 2)] - #[doc = "Renewed extrinsic is not found."] - RenewedNotFound, - #[codec(index = 3)] - #[doc = "Attempting to store empty transaction"] - EmptyTransaction, - #[codec(index = 4)] - #[doc = "Proof was not expected in this block."] - UnexpectedProof, - #[codec(index = 5)] - #[doc = "Proof failed verification."] - InvalidProof, - #[codec(index = 6)] - #[doc = "Missing storage proof."] - MissingProof, - #[codec(index = 7)] - #[doc = "Unable to verify proof becasue state data is missing."] - MissingStateData, - #[codec(index = 8)] - #[doc = "Double proof check in the block."] - DoubleCheck, - #[codec(index = 9)] - #[doc = "Storage proof was not checked in the block."] - ProofNotChecked, - #[codec(index = 10)] - #[doc = "Transaction is too large."] - TransactionTooLarge, - #[codec(index = 11)] - #[doc = "Too many transactions in the block."] - TooManyTransactions, - #[codec(index = 12)] - #[doc = "Attempted to call `store` outside of block execution."] - BadContext, - } + pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -55986,39 +41792,7 @@ pub mod api { )] #[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 = "Stored data under specified index."] - Stored { index: ::core::primitive::u32 }, - #[codec(index = 1)] - #[doc = "Renewed data under specified index."] - Renewed { index: ::core::primitive::u32 }, - #[codec(index = 2)] - #[doc = "Storage proof was successfully checked."] - ProofChecked, - } - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransactionInfo { - pub chunk_root: ::subxt::utils::H256, - pub content_hash: ::subxt::utils::H256, - pub size: ::core::primitive::u32, - pub block_chunks: ::core::primitive::u32, - } - } - pub mod pallet_treasury { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + pub struct PrevalidateAttests; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -56028,92 +41802,298 @@ pub mod api { )] #[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 { + pub enum StatementKind { #[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, - >, - }, + Regular, #[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, - }, + Saft, + } + } + pub mod crowdloan { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Create a new crowdloaning campaign for a parachain slot with the given lease period range."] + #[doc = ""] + #[doc = "This applies a lock to your parachain configuration, ensuring that it cannot be changed"] + #[doc = "by the parachain manager."] + create { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: ::core::option::Option< + runtime_types::sp_runtime::MultiSigner, + >, + }, + #[codec(index = 1)] + #[doc = "Contribute to a crowd sale. This will transfer some balance over to fund a parachain"] + #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] + contribute { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + value: ::core::primitive::u128, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, + >, + }, + #[codec(index = 2)] + #[doc = "Withdraw full balance of a specific contributor."] + #[doc = ""] + #[doc = "Origin must be signed, but can come from anyone."] + #[doc = ""] + #[doc = "The fund must be either in, or ready for, retirement. For a fund to be *in* retirement, then the retirement"] + #[doc = "flag must be set. For a fund to be ready for retirement, then:"] + #[doc = "- it must not already be in retirement;"] + #[doc = "- the amount of raised funds must be bigger than the _free_ balance of the account;"] + #[doc = "- and either:"] + #[doc = " - the block number must be at least `end`; or"] + #[doc = " - the current lease period must be greater than the fund's `last_period`."] + #[doc = ""] + #[doc = "In this case, the fund's retirement flag is set and its `end` is reset to the current block"] + #[doc = "number."] + #[doc = ""] + #[doc = "- `who`: The account whose contribution should be withdrawn."] + #[doc = "- `index`: The parachain to whose crowdloan the contribution was made."] + withdraw { + who: ::subxt::utils::AccountId32, + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 3)] + #[doc = "Automatically refund contributors of an ended crowdloan."] + #[doc = "Due to weight restrictions, this function may need to be called multiple"] + #[doc = "times to fully refund all users. We will refund `RemoveKeysLimit` users at a time."] + #[doc = ""] + #[doc = "Origin must be signed, but can come from anyone."] + refund { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + #[doc = "Remove a fund after the retirement period has ended and all funds have been returned."] + dissolve { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + #[doc = "Edit the configuration for an in-progress crowdloan."] + #[doc = ""] + #[doc = "Can only be called by Root origin."] + edit { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: ::core::option::Option< + runtime_types::sp_runtime::MultiSigner, + >, + }, + #[codec(index = 6)] + #[doc = "Add an optional memo to an existing crowdloan contribution."] + #[doc = ""] + #[doc = "Origin must be Signed, and the user must have contributed to the crowdloan."] + add_memo { + index: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 7)] + #[doc = "Poke the fund into `NewRaise`"] + #[doc = ""] + #[doc = "Origin must be Signed, and the fund has non-zero raise."] + poke { + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 8)] + #[doc = "Contribute your entire balance to a crowd sale. This will transfer the entire balance of a user over to fund a parachain"] + #[doc = "slot. It will be withdrawable when the crowdloan has ended and the funds are unused."] + contribute_all { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + signature: ::core::option::Option< + runtime_types::sp_runtime::MultiSignature, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The current lease period is more than the first lease period."] + FirstPeriodInPast, + #[codec(index = 1)] + #[doc = "The first lease period needs to at least be less than 3 `max_value`."] + FirstPeriodTooFarInFuture, + #[codec(index = 2)] + #[doc = "Last lease period must be greater than first lease period."] + LastPeriodBeforeFirstPeriod, + #[codec(index = 3)] + #[doc = "The last lease period cannot be more than 3 periods after the first period."] + LastPeriodTooFarInFuture, + #[codec(index = 4)] + #[doc = "The campaign ends before the current block number. The end must be in the future."] + CannotEndInPast, + #[codec(index = 5)] + #[doc = "The end date for this crowdloan is not sensible."] + EndTooFarInFuture, + #[codec(index = 6)] + #[doc = "There was an overflow."] + Overflow, + #[codec(index = 7)] + #[doc = "The contribution was below the minimum, `MinContribution`."] + ContributionTooSmall, + #[codec(index = 8)] + #[doc = "Invalid fund index."] + InvalidParaId, + #[codec(index = 9)] + #[doc = "Contributions exceed maximum amount."] + CapExceeded, + #[codec(index = 10)] + #[doc = "The contribution period has already ended."] + ContributionPeriodOver, + #[codec(index = 11)] + #[doc = "The origin of this call is invalid."] + InvalidOrigin, + #[codec(index = 12)] + #[doc = "This crowdloan does not correspond to a parachain."] + NotParachain, + #[codec(index = 13)] + #[doc = "This parachain lease is still active and retirement cannot yet begin."] + LeaseActive, + #[codec(index = 14)] + #[doc = "This parachain's bid or lease is still active and withdraw cannot yet begin."] + BidOrLeaseActive, + #[codec(index = 15)] + #[doc = "The crowdloan has not yet ended."] + FundNotEnded, + #[codec(index = 16)] + #[doc = "There are no contributions stored in this crowdloan."] + NoContributions, + #[codec(index = 17)] + #[doc = "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period."] + NotReadyToDissolve, + #[codec(index = 18)] + #[doc = "Invalid signature."] + InvalidSignature, + #[codec(index = 19)] + #[doc = "The provided memo is too large."] + MemoTooLarge, + #[codec(index = 20)] + #[doc = "The fund is already in `NewRaise`"] + AlreadyInNewRaise, + #[codec(index = 21)] + #[doc = "No contributions allowed during the VRF delay"] + VrfDelayInProgress, + #[codec(index = 22)] + #[doc = "A lease period has not started yet, due to an offset in the starting block."] + NoLeasePeriod, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Create a new crowdloaning campaign."] + Created { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 1)] + #[doc = "Contributed to a crowd sale."] + Contributed { + who: ::subxt::utils::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Withdrew full balance of a contributor."] + Withdrew { + who: ::subxt::utils::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "The loans in a fund have been partially dissolved, i.e. there are some left"] + #[doc = "over child keys that still need to be killed."] + PartiallyRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + #[doc = "All loans in a fund have been refunded."] + AllRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + #[doc = "Fund is dissolved."] + Dissolved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 6)] + #[doc = "The result of trying to submit a new bid to the Slots pallet."] + HandleBidResult { + para_id: runtime_types::polkadot_parachain::primitives::Id, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 7)] + #[doc = "The configuration to a crowdloan has been edited."] + Edited { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 8)] + #[doc = "A memo has been updated."] + MemoUpdated { + who: ::subxt::utils::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + #[doc = "A parachain has been moved to `NewRaise`"] + AddedToNewRaise { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -56124,25 +42104,7 @@ pub mod api { )] #[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, - } + pub struct FundInfo < _0 , _1 , _2 , _3 > { pub depositor : _0 , pub verifier : :: core :: option :: Option < runtime_types :: sp_runtime :: MultiSigner > , pub deposit : _1 , pub raised : _1 , pub end : _2 , pub cap : _1 , pub last_contribution : runtime_types :: polkadot_runtime_common :: crowdloan :: LastContribution < _2 > , pub first_period : _2 , pub last_period : _2 , pub fund_index : _2 , # [codec (skip)] pub __subxt_unused_type_params : :: core :: marker :: PhantomData < _3 > } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -56152,79 +42114,113 @@ pub mod api { )] #[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 { + pub enum LastContribution<_0> { #[codec(index = 0)] - #[doc = "New proposal."] - Proposed { - proposal_index: ::core::primitive::u32, - }, + Never, #[codec(index = 1)] - #[doc = "We have ended a spend period and will now allocate funds."] - Spending { - budget_remaining: ::core::primitive::u128, - }, + PreEnding(_0), #[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, - }, + Ending(_0), } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Proposal<_0, _1> { - pub proposer: _0, - pub value: _1, - pub beneficiary: _0, - pub bond: _1, - } - } - pub mod pallet_uniques { - use super::runtime_types; - pub mod pallet { + pub mod paras_registrar { use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Register head data and validation code for a reserved Para Id."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin."] # [doc = "- `id`: The para ID. Must be owned/managed by the `origin` signing account."] # [doc = "- `genesis_head`: The genesis head data of the parachain/thread."] # [doc = "- `validation_code`: The initial validation code of the parachain/thread."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin signed account must reserve a corresponding deposit for the registration. Anything already"] # [doc = "reserved previously for this para ID is accounted for."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Registered` event is emitted in case of success."] register { id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Force the registration of a Para Id on the relay chain."] # [doc = ""] # [doc = "This function must be called by a Root origin."] # [doc = ""] # [doc = "The deposit taken can be specified for this registration. Any `ParaId`"] # [doc = "can be registered, including sub-1000 IDs which are System Parachains."] force_register { who : :: subxt :: utils :: AccountId32 , deposit : :: core :: primitive :: u128 , id : runtime_types :: polkadot_parachain :: primitives :: Id , genesis_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 2)] # [doc = "Deregister a Para Id, freeing all data and returning any deposit."] # [doc = ""] # [doc = "The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread."] deregister { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 3)] # [doc = "Swap a parachain with another parachain or parathread."] # [doc = ""] # [doc = "The origin must be Root, the `para` owner, or the `para` itself."] # [doc = ""] # [doc = "The swap will happen only if there is already an opposite swap pending. If there is not,"] # [doc = "the swap will be stored in the pending swaps map, ready for a later confirmatory swap."] # [doc = ""] # [doc = "The `ParaId`s remain mapped to the same head data and code so external code can rely on"] # [doc = "`ParaId` to be a long-term identifier of a notional \"parachain\". However, their"] # [doc = "scheduling info (i.e. whether they're a parathread or parachain), auction information"] # [doc = "and the auction deposit are switched."] swap { id : runtime_types :: polkadot_parachain :: primitives :: Id , other : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 4)] # [doc = "Remove a manager lock from a para. This will allow the manager of a"] # [doc = "previously locked para to deregister or swap a para without using governance."] # [doc = ""] # [doc = "Can only be called by the Root origin or the parachain."] remove_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Reserve a Para Id on the relay chain."] # [doc = ""] # [doc = "This function will reserve a new Para Id to be owned/managed by the origin account."] # [doc = "The origin account is able to register head data and validation code using `register` to create"] # [doc = "a parathread. Using the Slots pallet, a parathread can then be upgraded to get a parachain slot."] # [doc = ""] # [doc = "## Arguments"] # [doc = "- `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new para ID."] # [doc = ""] # [doc = "## Deposits/Fees"] # [doc = "The origin must reserve a deposit of `ParaDeposit` for the registration."] # [doc = ""] # [doc = "## Events"] # [doc = "The `Reserved` event is emitted in case of success, which provides the ID reserved for use."] reserve , # [codec (index = 6)] # [doc = "Add a manager lock from a para. This will prevent the manager of a"] # [doc = "para to deregister or swap a para."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] add_lock { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 7)] # [doc = "Schedule a parachain upgrade."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 8)] # [doc = "Set the parachain's current head."] # [doc = ""] # [doc = "Can be called by Root, the parachain, or the parachain manager if the parachain is unlocked."] set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 ID is not registered."] + NotRegistered, + #[codec(index = 1)] + #[doc = "The ID is already registered."] + AlreadyRegistered, + #[codec(index = 2)] + #[doc = "The caller is not the owner of this Id."] + NotOwner, + #[codec(index = 3)] + #[doc = "Invalid para code size."] + CodeTooLarge, + #[codec(index = 4)] + #[doc = "Invalid para head data size."] + HeadDataTooLarge, + #[codec(index = 5)] + #[doc = "Para is not a Parachain."] + NotParachain, + #[codec(index = 6)] + #[doc = "Para is not a Parathread."] + NotParathread, + #[codec(index = 7)] + #[doc = "Cannot deregister para"] + CannotDeregister, + #[codec(index = 8)] + #[doc = "Cannot schedule downgrade of parachain to parathread"] + CannotDowngrade, + #[codec(index = 9)] + #[doc = "Cannot schedule upgrade of parathread to parachain"] + CannotUpgrade, + #[codec(index = 10)] + #[doc = "Para is locked from manipulation by the manager. Must use parachain or relay chain governance."] + ParaLocked, + #[codec(index = 11)] + #[doc = "The ID given for registration has not been reserved."] + NotReserved, + #[codec(index = 12)] + #[doc = "Registering parachain with empty code is not allowed."] + EmptyCode, + #[codec(index = 13)] + #[doc = "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are"] + #[doc = "correct for the swap to work."] + CannotSwap, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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)] + Registered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + manager: ::subxt::utils::AccountId32, + }, + #[codec(index = 1)] + Deregistered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + Reserved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + who: ::subxt::utils::AccountId32, + }, + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -56234,559 +42230,308 @@ pub mod api { )] #[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 = "Issue a new collection of non-fungible items from a public origin."] - #[doc = ""] - #[doc = "This new collection has no items initially and its owner is the origin."] - #[doc = ""] - #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] - #[doc = ""] - #[doc = "`ItemDeposit` funds of sender are reserved."] - #[doc = ""] - #[doc = "Parameters:"] - #[doc = "- `collection`: The identifier of the new collection. This must not be currently in use."] - #[doc = "- `admin`: The admin of this collection. The admin is the initial address of each"] - #[doc = "member of the collection's admin team."] - #[doc = ""] - #[doc = "Emits `Created` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - create { - collection: ::core::primitive::u32, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 1)] - #[doc = "Issue a new collection of non-fungible items from a privileged origin."] - #[doc = ""] - #[doc = "This new collection has no items initially."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin`."] - #[doc = ""] - #[doc = "Unlike `create`, no funds are reserved."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the new item. This must not be currently in use."] - #[doc = "- `owner`: The owner of this collection of items. The owner has full superuser"] - #[doc = " permissions"] - #[doc = "over this item, but may later change and configure the permissions using"] - #[doc = "`transfer_ownership` and `set_team`."] - #[doc = ""] - #[doc = "Emits `ForceCreated` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_create { - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - free_holding: ::core::primitive::bool, - }, - #[codec(index = 2)] - #[doc = "Destroy a collection of fungible items."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the"] - #[doc = "owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to be destroyed."] - #[doc = "- `witness`: Information on the items minted in the collection. This must be"] - #[doc = "correct."] - #[doc = ""] - #[doc = "Emits `Destroyed` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(n + m)` where:"] - #[doc = "- `n = witness.items`"] - #[doc = "- `m = witness.item_metadatas`"] - #[doc = "- `a = witness.attributes`"] - destroy { - collection: ::core::primitive::u32, - witness: runtime_types::pallet_uniques::types::DestroyWitness, - }, - #[codec(index = 3)] - #[doc = "Mint an item of a particular collection."] - #[doc = ""] - #[doc = "The origin must be Signed and the sender must be the Issuer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be minted."] - #[doc = "- `item`: The item value of the item to be minted."] - #[doc = "- `beneficiary`: The initial owner of the minted item."] - #[doc = ""] - #[doc = "Emits `Issued` event when successful."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - mint { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - #[doc = "Destroy a single item."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be burned."] - #[doc = "- `item`: The item of the item to be burned."] - #[doc = "- `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the"] - #[doc = " item is owned by this value."] - #[doc = ""] - #[doc = "Emits `Burned` with the actual amount burned."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - #[doc = "Modes: `check_owner.is_some()`."] - burn { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - check_owner: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - }, - #[codec(index = 5)] - #[doc = "Move an item from the sender account to another."] - #[doc = ""] - #[doc = "This resets the approved account of the item."] - #[doc = ""] - #[doc = "Origin must be Signed and the signing account must be either:"] - #[doc = "- the Admin of the `collection`;"] - #[doc = "- the Owner of the `item`;"] - #[doc = "- the approved delegate for the `item` (in this case, the approval is reset)."] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item to be transferred."] - #[doc = "- `item`: The item of the item to be transferred."] - #[doc = "- `dest`: The account to receive ownership of the item."] - #[doc = ""] - #[doc = "Emits `Transferred`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - dest: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 6)] - #[doc = "Reevaluate the deposits on some items."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be frozen."] - #[doc = "- `items`: The items of the collection whose deposits will be reevaluated."] - #[doc = ""] - #[doc = "NOTE: This exists as a best-effort function. Any items which are unknown or"] - #[doc = "in the case that the owner account does not have reservable funds to pay for a"] - #[doc = "deposit increase are ignored. Generally the owner isn't going to call this on items"] - #[doc = "whose existing deposit is less than the refreshed deposit as it would only cost them,"] - #[doc = "so it's of little consequence."] - #[doc = ""] - #[doc = "It will still return an error in the case that the collection is unknown of the signer"] - #[doc = "is not permitted to call it."] - #[doc = ""] - #[doc = "Weight: `O(items.len())`"] - redeposit { - collection: ::core::primitive::u32, - items: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 7)] - #[doc = "Disallow further unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be frozen."] - #[doc = "- `item`: The item of the item to be frozen."] - #[doc = ""] - #[doc = "Emits `Frozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "Re-allow unprivileged transfer of an item."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be thawed."] - #[doc = "- `item`: The item of the item to be thawed."] - #[doc = ""] - #[doc = "Emits `Thawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 9)] - #[doc = "Disallow further unprivileged transfers for a whole collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Freezer of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be frozen."] - #[doc = ""] - #[doc = "Emits `CollectionFrozen`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - freeze_collection { collection: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "Re-allow unprivileged transfers for a whole collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Admin of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection to be thawed."] - #[doc = ""] - #[doc = "Emits `CollectionThawed`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - thaw_collection { collection: ::core::primitive::u32 }, - #[codec(index = 11)] - #[doc = "Change the Owner of a collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose owner should be changed."] - #[doc = "- `owner`: The new Owner of this collection. They must have called"] - #[doc = " `set_accept_ownership` with `collection` in order for this operation to succeed."] - #[doc = ""] - #[doc = "Emits `OwnerChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - transfer_ownership { - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 12)] - #[doc = "Change the Issuer, Admin and Freezer of a collection."] - #[doc = ""] - #[doc = "Origin must be Signed and the sender should be the Owner of the `collection`."] - #[doc = ""] - #[doc = "- `collection`: The collection whose team should be changed."] - #[doc = "- `issuer`: The new Issuer of this collection."] - #[doc = "- `admin`: The new Admin of this collection."] - #[doc = "- `freezer`: The new Freezer of this collection."] - #[doc = ""] - #[doc = "Emits `TeamChanged`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_team { - collection: ::core::primitive::u32, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 13)] - #[doc = "Approve an item to be transferred by a delegated third-party account."] - #[doc = ""] - #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be"] - #[doc = "either the owner of the `item` or the admin of the collection."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item to be approved for delegated transfer."] - #[doc = "- `item`: The item of the item to be approved for delegated transfer."] - #[doc = "- `delegate`: The account to delegate permission to transfer the item."] - #[doc = ""] - #[doc = "Important NOTE: The `approved` account gets reset after each transfer."] - #[doc = ""] - #[doc = "Emits `ApprovedTransfer` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - approve_transfer { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - delegate: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 14)] - #[doc = "Cancel the prior approval for the transfer of an item by a delegate."] - #[doc = ""] - #[doc = "Origin must be either:"] - #[doc = "- the `Force` origin;"] - #[doc = "- `Signed` with the signer being the Admin of the `collection`;"] - #[doc = "- `Signed` with the signer being the Owner of the `item`;"] - #[doc = ""] - #[doc = "Arguments:"] - #[doc = "- `collection`: The collection of the item of whose approval will be cancelled."] - #[doc = "- `item`: The item of the item of whose approval will be cancelled."] - #[doc = "- `maybe_check_delegate`: If `Some` will ensure that the given account is the one to"] - #[doc = " which permission of transfer is delegated."] - #[doc = ""] - #[doc = "Emits `ApprovalCancelled` on success."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - cancel_approval { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - maybe_check_delegate: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - }, - #[codec(index = 15)] - #[doc = "Alter the attributes of a given item."] - #[doc = ""] - #[doc = "Origin must be `ForceOrigin`."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the item."] - #[doc = "- `owner`: The new Owner of this item."] - #[doc = "- `issuer`: The new Issuer of this item."] - #[doc = "- `admin`: The new Admin of this item."] - #[doc = "- `freezer`: The new Freezer of this item."] - #[doc = "- `free_holding`: Whether a deposit is taken for holding an item of this collection."] - #[doc = "- `is_frozen`: Whether this collection is frozen except for permissioned/admin"] - #[doc = "instructions."] - #[doc = ""] - #[doc = "Emits `ItemStatusChanged` with the identity of the item."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - force_item_status { - collection: ::core::primitive::u32, - owner: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - issuer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - admin: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - freezer: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - free_holding: ::core::primitive::bool, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 16)] - #[doc = "Set an attribute for a collection or item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to set."] - #[doc = "- `key`: The key of the attribute."] - #[doc = "- `value`: The value to which to set the attribute."] - #[doc = ""] - #[doc = "Emits `AttributeSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_attribute { - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 17)] - #[doc = "Clear an attribute for a collection or item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `maybe_item`: The identifier of the item whose metadata to clear."] - #[doc = "- `key`: The key of the attribute."] - #[doc = ""] - #[doc = "Emits `AttributeCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - clear_attribute { - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 18)] - #[doc = "Set the metadata for an item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`collection`."] - #[doc = ""] - #[doc = "If the origin is Signed, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to set."] - #[doc = "- `item`: The identifier of the item whose metadata to set."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] - #[doc = ""] - #[doc = "Emits `MetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_metadata { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 19)] - #[doc = "Clear the metadata for an item."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the"] - #[doc = "`item`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose item's metadata to clear."] - #[doc = "- `item`: The identifier of the item whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `MetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - clear_metadata { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 20)] - #[doc = "Set the metadata for a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "If the origin is `Signed`, then funds of signer are reserved according to the formula:"] - #[doc = "`MetadataDepositBase + DepositPerByte * data.len` taking into"] - #[doc = "account any already reserved funds."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the item whose metadata to update."] - #[doc = "- `data`: The general information of this item. Limited in length by `StringLimit`."] - #[doc = "- `is_frozen`: Whether the metadata should be frozen against further changes."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataSet`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - set_collection_metadata { - collection: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 21)] - #[doc = "Clear the metadata for a collection."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "Any deposit is freed for the collection's owner."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection whose metadata to clear."] - #[doc = ""] - #[doc = "Emits `CollectionMetadataCleared`."] - #[doc = ""] - #[doc = "Weight: `O(1)`"] - clear_collection_metadata { collection: ::core::primitive::u32 }, - #[codec(index = 22)] - #[doc = "Set (or reset) the acceptance of ownership for a particular account."] - #[doc = ""] - #[doc = "Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a"] - #[doc = "provider reference."] - #[doc = ""] - #[doc = "- `maybe_collection`: The identifier of the collection whose ownership the signer is"] - #[doc = " willing to accept, or if `None`, an indication that the signer is willing to accept no"] - #[doc = " ownership transferal."] - #[doc = ""] - #[doc = "Emits `OwnershipAcceptanceChanged`."] - set_accept_ownership { - maybe_collection: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 23)] - #[doc = "Set the maximum amount of items a collection could have."] - #[doc = ""] - #[doc = "Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of"] - #[doc = "the `collection`."] - #[doc = ""] - #[doc = "Note: This function can only succeed once per collection."] - #[doc = ""] - #[doc = "- `collection`: The identifier of the collection to change."] - #[doc = "- `max_supply`: The maximum amount of items a collection could have."] - #[doc = ""] - #[doc = "Emits `CollectionMaxSupplySet` event when successful."] - set_collection_max_supply { - collection: ::core::primitive::u32, - max_supply: ::core::primitive::u32, - }, - #[codec(index = 24)] - #[doc = "Set (or reset) the price for an item."] - #[doc = ""] - #[doc = "Origin must be Signed and must be the owner of the asset `item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item to set the price for."] - #[doc = "- `price`: The price for the item. Pass `None`, to reset the price."] - #[doc = "- `buyer`: Restricts the buy operation to a specific account."] - #[doc = ""] - #[doc = "Emits `ItemPriceSet` on success if the price is not `None`."] - #[doc = "Emits `ItemPriceRemoved` on success if the price is `None`."] - set_price { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - price: ::core::option::Option<::core::primitive::u128>, - whitelisted_buyer: ::core::option::Option< - ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - >, - }, - #[codec(index = 25)] - #[doc = "Allows to buy an item if it's up for sale."] - #[doc = ""] - #[doc = "Origin must be Signed and must not be the owner of the `item`."] - #[doc = ""] - #[doc = "- `collection`: The collection of the item."] - #[doc = "- `item`: The item the sender wants to buy."] - #[doc = "- `bid_price`: The price the sender is willing to pay."] - #[doc = ""] - #[doc = "Emits `ItemBought` on success."] - buy_item { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - bid_price: ::core::primitive::u128, - }, + pub struct ParaInfo<_0, _1> { + pub manager: _0, + pub deposit: _1, + pub locked: ::core::primitive::bool, + } + } + pub mod slots { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Just a connect into the `lease_out` call, in case Root wants to force some lease to happen"] + #[doc = "independently of any other on-chain mechanism to use it."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + force_lease { + para: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::utils::AccountId32, + amount: ::core::primitive::u128, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Clear all leases for a Para Id, refunding any deposits back to the original owners."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + clear_all_leases { + para: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + #[doc = "Try to onboard a parachain that has a lease for the current lease period."] + #[doc = ""] + #[doc = "This function can be useful if there was some state issue with a para that should"] + #[doc = "have onboarded, but was unable to. As long as they have a lease period, we can"] + #[doc = "let them onboard from here."] + #[doc = ""] + #[doc = "Origin must be signed, but can be called by anyone."] + trigger_onboard { + para: runtime_types::polkadot_parachain::primitives::Id, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 parachain ID is not onboarding."] + ParaNotOnboarding, + #[codec(index = 1)] + #[doc = "There was an error with the lease."] + LeaseError, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 `[lease_period]` is beginning."] + NewLeasePeriod { + lease_period: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A para has won the right to a continuous set of lease periods as a parachain."] + #[doc = "First balance is any extra amount reserved on top of the para's existing deposit."] + #[doc = "Second balance is the total amount reserved."] + Leased { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::utils::AccountId32, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + } + } + } + } + pub mod polkadot_runtime_parachains { + use super::runtime_types; + pub mod configuration { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Set the validation upgrade cooldown."] + set_validation_upgrade_cooldown { new: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "Set the validation upgrade delay."] + set_validation_upgrade_delay { new: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Set the acceptance period for an included candidate."] + set_code_retention_period { new: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "Set the max validation code size for incoming upgrades."] + set_max_code_size { new: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Set the max POV block size for incoming upgrades."] + set_max_pov_size { new: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "Set the max head data size for paras."] + set_max_head_data_size { new: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "Set the number of parathread execution cores."] + set_parathread_cores { new: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "Set the number of retries for a particular parathread."] + set_parathread_retries { new: ::core::primitive::u32 }, + #[codec(index = 8)] + #[doc = "Set the parachain validator-group rotation frequency"] + set_group_rotation_frequency { new: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "Set the availability period for parachains."] + set_chain_availability_period { new: ::core::primitive::u32 }, + #[codec(index = 10)] + #[doc = "Set the availability period for parathreads."] + set_thread_availability_period { new: ::core::primitive::u32 }, + #[codec(index = 11)] + #[doc = "Set the scheduling lookahead, in expected number of blocks at peak throughput."] + set_scheduling_lookahead { new: ::core::primitive::u32 }, + #[codec(index = 12)] + #[doc = "Set the maximum number of validators to assign to any core."] + set_max_validators_per_core { + new: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 13)] + #[doc = "Set the maximum number of validators to use in parachain consensus."] + set_max_validators { + new: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 14)] + #[doc = "Set the dispute period, in number of sessions to keep for disputes."] + set_dispute_period { new: ::core::primitive::u32 }, + #[codec(index = 15)] + #[doc = "Set the dispute post conclusion acceptance period."] + set_dispute_post_conclusion_acceptance_period { + new: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Set the maximum number of dispute spam slots."] + set_dispute_max_spam_slots { new: ::core::primitive::u32 }, + #[codec(index = 17)] + #[doc = "Set the dispute conclusion by time out period."] + set_dispute_conclusion_by_time_out_period { + new: ::core::primitive::u32, + }, + #[codec(index = 18)] + #[doc = "Set the no show slots, in number of number of consensus slots."] + #[doc = "Must be at least 1."] + set_no_show_slots { new: ::core::primitive::u32 }, + #[codec(index = 19)] + #[doc = "Set the total number of delay tranches."] + set_n_delay_tranches { new: ::core::primitive::u32 }, + #[codec(index = 20)] + #[doc = "Set the zeroth delay tranche width."] + set_zeroth_delay_tranche_width { new: ::core::primitive::u32 }, + #[codec(index = 21)] + #[doc = "Set the number of validators needed to approve a block."] + set_needed_approvals { new: ::core::primitive::u32 }, + #[codec(index = 22)] + #[doc = "Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion."] + set_relay_vrf_modulo_samples { new: ::core::primitive::u32 }, + #[codec(index = 23)] + #[doc = "Sets the maximum items that can present in a upward dispatch queue at once."] + set_max_upward_queue_count { new: ::core::primitive::u32 }, + #[codec(index = 24)] + #[doc = "Sets the maximum total size of items that can present in a upward dispatch queue at once."] + set_max_upward_queue_size { new: ::core::primitive::u32 }, + #[codec(index = 25)] + #[doc = "Set the critical downward message size."] + set_max_downward_message_size { new: ::core::primitive::u32 }, + #[codec(index = 26)] + #[doc = "Sets the soft limit for the phase of dispatching dispatchable upward messages."] + set_ump_service_total_weight { + new: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 27)] + #[doc = "Sets the maximum size of an upward message that can be sent by a candidate."] + set_max_upward_message_size { new: ::core::primitive::u32 }, + #[codec(index = 28)] + #[doc = "Sets the maximum number of messages that a candidate can contain."] + set_max_upward_message_num_per_candidate { + new: ::core::primitive::u32, + }, + #[codec(index = 29)] + #[doc = "Sets the number of sessions after which an HRMP open channel request expires."] + set_hrmp_open_request_ttl { new: ::core::primitive::u32 }, + #[codec(index = 30)] + #[doc = "Sets the amount of funds that the sender should provide for opening an HRMP channel."] + set_hrmp_sender_deposit { new: ::core::primitive::u128 }, + #[codec(index = 31)] + #[doc = "Sets the amount of funds that the recipient should provide for accepting opening an HRMP"] + #[doc = "channel."] + set_hrmp_recipient_deposit { new: ::core::primitive::u128 }, + #[codec(index = 32)] + #[doc = "Sets the maximum number of messages allowed in an HRMP channel at once."] + set_hrmp_channel_max_capacity { new: ::core::primitive::u32 }, + #[codec(index = 33)] + #[doc = "Sets the maximum total size of messages in bytes allowed in an HRMP channel at once."] + set_hrmp_channel_max_total_size { new: ::core::primitive::u32 }, + #[codec(index = 34)] + #[doc = "Sets the maximum number of inbound HRMP channels a parachain is allowed to accept."] + set_hrmp_max_parachain_inbound_channels { + new: ::core::primitive::u32, + }, + #[codec(index = 35)] + #[doc = "Sets the maximum number of inbound HRMP channels a parathread is allowed to accept."] + set_hrmp_max_parathread_inbound_channels { + new: ::core::primitive::u32, + }, + #[codec(index = 36)] + #[doc = "Sets the maximum size of a message that could ever be put into an HRMP channel."] + set_hrmp_channel_max_message_size { new: ::core::primitive::u32 }, + #[codec(index = 37)] + #[doc = "Sets the maximum number of outbound HRMP channels a parachain is allowed to open."] + set_hrmp_max_parachain_outbound_channels { + new: ::core::primitive::u32, + }, + #[codec(index = 38)] + #[doc = "Sets the maximum number of outbound HRMP channels a parathread is allowed to open."] + set_hrmp_max_parathread_outbound_channels { + new: ::core::primitive::u32, + }, + #[codec(index = 39)] + #[doc = "Sets the maximum number of outbound HRMP messages can be sent by a candidate."] + set_hrmp_max_message_num_per_candidate { + new: ::core::primitive::u32, + }, + #[codec(index = 40)] + #[doc = "Sets the maximum amount of weight any individual upward message may consume."] + set_ump_max_individual_weight { + new: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 41)] + #[doc = "Enable or disable PVF pre-checking. Consult the field documentation prior executing."] + set_pvf_checking_enabled { new: ::core::primitive::bool }, + #[codec(index = 42)] + #[doc = "Set the number of session changes after which a PVF pre-checking voting is rejected."] + set_pvf_voting_ttl { new: ::core::primitive::u32 }, + #[codec(index = 43)] + #[doc = "Sets the minimum delay between announcing the upgrade block for a parachain until the"] + #[doc = "upgrade taking place."] + #[doc = ""] + #[doc = "See the field documentation for information and constraints for the new value."] + set_minimum_validation_upgrade_delay { + new: ::core::primitive::u32, + }, + #[codec(index = 44)] + #[doc = "Setting this to true will disable consistency checks for the configuration setters."] + #[doc = "Use with caution."] + set_bypass_consistency_check { new: ::core::primitive::bool }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The new value for a configuration parameter is invalid."] + InvalidNewValue, + } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -56797,62 +42542,117 @@ pub mod api { )] #[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 signing account has no permission to do the operation."] - NoPermission, - #[codec(index = 1)] - #[doc = "The given item ID is unknown."] - UnknownCollection, - #[codec(index = 2)] - #[doc = "The item ID has already been used for an item."] - AlreadyExists, - #[codec(index = 3)] - #[doc = "The owner turned out to be different to what was expected."] - WrongOwner, - #[codec(index = 4)] - #[doc = "Invalid witness data given."] - BadWitness, - #[codec(index = 5)] - #[doc = "The item ID is already taken."] - InUse, - #[codec(index = 6)] - #[doc = "The item or collection is frozen."] - Frozen, - #[codec(index = 7)] - #[doc = "The delegate turned out to be different to what was expected."] - WrongDelegate, - #[codec(index = 8)] - #[doc = "There is no delegate approved."] - NoDelegate, - #[codec(index = 9)] - #[doc = "No approval exists that would allow the transfer."] - Unapproved, - #[codec(index = 10)] - #[doc = "The named owner has not signed ownership of the collection is acceptable."] - Unaccepted, - #[codec(index = 11)] - #[doc = "The item is locked."] - Locked, - #[codec(index = 12)] - #[doc = "All items have been minted."] - MaxSupplyReached, - #[codec(index = 13)] - #[doc = "The max supply has already been set."] - MaxSupplyAlreadySet, - #[codec(index = 14)] - #[doc = "The provided max supply is less to the amount of items a collection already has."] - MaxSupplyTooSmall, - #[codec(index = 15)] - #[doc = "The given item ID is unknown."] - UnknownItem, - #[codec(index = 16)] - #[doc = "Item is not for sale."] - NotForSale, - #[codec(index = 17)] - #[doc = "The provided bid is too low."] - BidTooLow, + pub struct HostConfiguration<_0> { + pub max_code_size: _0, + pub max_head_data_size: _0, + pub max_upward_queue_count: _0, + pub max_upward_queue_size: _0, + pub max_upward_message_size: _0, + pub max_upward_message_num_per_candidate: _0, + pub hrmp_max_message_num_per_candidate: _0, + pub validation_upgrade_cooldown: _0, + pub validation_upgrade_delay: _0, + pub max_pov_size: _0, + pub max_downward_message_size: _0, + pub ump_service_total_weight: + runtime_types::sp_weights::weight_v2::Weight, + pub hrmp_max_parachain_outbound_channels: _0, + pub hrmp_max_parathread_outbound_channels: _0, + pub hrmp_sender_deposit: ::core::primitive::u128, + pub hrmp_recipient_deposit: ::core::primitive::u128, + pub hrmp_channel_max_capacity: _0, + pub hrmp_channel_max_total_size: _0, + pub hrmp_max_parachain_inbound_channels: _0, + pub hrmp_max_parathread_inbound_channels: _0, + pub hrmp_channel_max_message_size: _0, + pub code_retention_period: _0, + pub parathread_cores: _0, + pub parathread_retries: _0, + pub group_rotation_frequency: _0, + pub chain_availability_period: _0, + pub thread_availability_period: _0, + pub scheduling_lookahead: _0, + pub max_validators_per_core: ::core::option::Option<_0>, + pub max_validators: ::core::option::Option<_0>, + pub dispute_period: _0, + pub dispute_post_conclusion_acceptance_period: _0, + pub dispute_max_spam_slots: _0, + pub dispute_conclusion_by_time_out_period: _0, + pub no_show_slots: _0, + pub n_delay_tranches: _0, + pub zeroth_delay_tranche_width: _0, + pub needed_approvals: _0, + pub relay_vrf_modulo_samples: _0, + pub ump_max_individual_weight: + runtime_types::sp_weights::weight_v2::Weight, + pub pvf_checking_enabled: ::core::primitive::bool, + pub pvf_voting_ttl: _0, + pub minimum_validation_upgrade_delay: _0, + } + } + pub mod disputes { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + force_unfreeze, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Duplicate dispute statement sets provided."] + DuplicateDisputeStatementSets, + #[codec(index = 1)] + #[doc = "Ancient dispute statement provided."] + AncientDisputeStatement, + #[codec(index = 2)] + #[doc = "Validator index on statement is out of bounds for session."] + ValidatorIndexOutOfBounds, + #[codec(index = 3)] + #[doc = "Invalid signature on statement."] + InvalidSignature, + #[codec(index = 4)] + #[doc = "Validator vote submitted more than once to dispute."] + DuplicateStatement, + #[codec(index = 5)] + #[doc = "Too many spam slots used by some specific validator."] + PotentialSpam, + #[codec(index = 6)] + #[doc = "A dispute where there are only votes on one side."] + SingleSidedDispute, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 dispute has been initiated. \\[candidate hash, dispute location\\]"] DisputeInitiated (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeLocation ,) , # [codec (index = 1)] # [doc = "A dispute has concluded for or against a candidate."] # [doc = "`\\[para id, candidate hash, dispute result\\]`"] DisputeConcluded (runtime_types :: polkadot_core_primitives :: CandidateHash , runtime_types :: polkadot_runtime_parachains :: disputes :: DisputeResult ,) , # [codec (index = 2)] # [doc = "A dispute has timed out due to insufficient participation."] # [doc = "`\\[para id, candidate hash\\]`"] DisputeTimedOut (runtime_types :: polkadot_core_primitives :: CandidateHash ,) , # [codec (index = 3)] # [doc = "A dispute has concluded with supermajority against a candidate."] # [doc = "Block authors should no longer build on top of this head and should"] # [doc = "instead revert the block at the given height. This should be the"] # [doc = "number of the child of the last known valid block in the chain."] Revert (:: core :: primitive :: u32 ,) , } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -56863,194 +42663,12 @@ pub mod api { )] #[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 { + pub enum DisputeLocation { #[codec(index = 0)] - #[doc = "A `collection` was created."] - Created { - collection: ::core::primitive::u32, - creator: ::subxt::utils::AccountId32, - owner: ::subxt::utils::AccountId32, - }, + Local, #[codec(index = 1)] - #[doc = "A `collection` was force-created."] - ForceCreated { - collection: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 2)] - #[doc = "A `collection` was destroyed."] - Destroyed { collection: ::core::primitive::u32 }, - #[codec(index = 3)] - #[doc = "An `item` was issued."] - Issued { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 4)] - #[doc = "An `item` was transferred."] - Transferred { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - from: ::subxt::utils::AccountId32, - to: ::subxt::utils::AccountId32, - }, - #[codec(index = 5)] - #[doc = "An `item` was destroyed."] - Burned { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 6)] - #[doc = "Some `item` was frozen."] - Frozen { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 7)] - #[doc = "Some `item` was thawed."] - Thawed { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "Some `collection` was frozen."] - CollectionFrozen { collection: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "Some `collection` was thawed."] - CollectionThawed { collection: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "The owner changed."] - OwnerChanged { - collection: ::core::primitive::u32, - new_owner: ::subxt::utils::AccountId32, - }, - #[codec(index = 11)] - #[doc = "The management team changed."] - TeamChanged { - collection: ::core::primitive::u32, - issuer: ::subxt::utils::AccountId32, - admin: ::subxt::utils::AccountId32, - freezer: ::subxt::utils::AccountId32, - }, - #[codec(index = 12)] - #[doc = "An `item` of a `collection` has been approved by the `owner` for transfer by"] - #[doc = "a `delegate`."] - ApprovedTransfer { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - delegate: ::subxt::utils::AccountId32, - }, - #[codec(index = 13)] - #[doc = "An approval for a `delegate` account to transfer the `item` of an item"] - #[doc = "`collection` was cancelled by its `owner`."] - ApprovalCancelled { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - owner: ::subxt::utils::AccountId32, - delegate: ::subxt::utils::AccountId32, - }, - #[codec(index = 14)] - #[doc = "A `collection` has had its attributes changed by the `Force` origin."] - ItemStatusChanged { collection: ::core::primitive::u32 }, - #[codec(index = 15)] - #[doc = "New metadata has been set for a `collection`."] - CollectionMetadataSet { - collection: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 16)] - #[doc = "Metadata has been cleared for a `collection`."] - CollectionMetadataCleared { collection: ::core::primitive::u32 }, - #[codec(index = 17)] - #[doc = "New metadata has been set for an item."] - MetadataSet { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - is_frozen: ::core::primitive::bool, - }, - #[codec(index = 18)] - #[doc = "Metadata has been cleared for an item."] - MetadataCleared { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 19)] - #[doc = "Metadata has been cleared for an item."] - Redeposited { - collection: ::core::primitive::u32, - successful_items: ::std::vec::Vec<::core::primitive::u32>, - }, - #[codec(index = 20)] - #[doc = "New attribute metadata has been set for a `collection` or `item`."] - AttributeSet { - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - value: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 21)] - #[doc = "Attribute metadata has been cleared for a `collection` or `item`."] - AttributeCleared { - collection: ::core::primitive::u32, - maybe_item: ::core::option::Option<::core::primitive::u32>, - key: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - }, - #[codec(index = 22)] - #[doc = "Ownership acceptance has changed for an account."] - OwnershipAcceptanceChanged { - who: ::subxt::utils::AccountId32, - maybe_collection: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 23)] - #[doc = "Max supply has been set for a collection."] - CollectionMaxSupplySet { - collection: ::core::primitive::u32, - max_supply: ::core::primitive::u32, - }, - #[codec(index = 24)] - #[doc = "The price was set for the instance."] - ItemPriceSet { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - price: ::core::primitive::u128, - whitelisted_buyer: - ::core::option::Option<::subxt::utils::AccountId32>, - }, - #[codec(index = 25)] - #[doc = "The price for the instance was removed."] - ItemPriceRemoved { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - }, - #[codec(index = 26)] - #[doc = "An item was bought."] - ItemBought { - collection: ::core::primitive::u32, - item: ::core::primitive::u32, - price: ::core::primitive::u128, - seller: ::subxt::utils::AccountId32, - buyer: ::subxt::utils::AccountId32, - }, + Remote, } - } - pub mod types { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57060,17 +42678,164 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CollectionDetails<_0, _1> { - pub owner: _0, - pub issuer: _0, - pub admin: _0, - pub freezer: _0, - pub total_deposit: _1, - pub free_holding: ::core::primitive::bool, - pub items: ::core::primitive::u32, - pub item_metadatas: ::core::primitive::u32, - pub attributes: ::core::primitive::u32, - pub is_frozen: ::core::primitive::bool, + pub enum DisputeResult { + #[codec(index = 0)] + Valid, + #[codec(index = 1)] + Invalid, + } + } + pub mod dmp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call {} + } + } + pub mod hrmp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Initiate opening a channel from a parachain to a given recipient with given channel"] # [doc = "parameters."] # [doc = ""] # [doc = "- `proposed_max_capacity` - specifies how many messages can be in the channel at once."] # [doc = "- `proposed_max_message_size` - specifies the maximum size of the messages."] # [doc = ""] # [doc = "These numbers are a subject to the relay-chain configuration limits."] # [doc = ""] # [doc = "The channel can be opened only after the recipient confirms it and only on a session"] # [doc = "change."] hrmp_init_open_channel { recipient : runtime_types :: polkadot_parachain :: primitives :: Id , proposed_max_capacity : :: core :: primitive :: u32 , proposed_max_message_size : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Accept a pending open channel request from the given sender."] # [doc = ""] # [doc = "The channel will be opened only on the next session boundary."] hrmp_accept_open_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 2)] # [doc = "Initiate unilateral closing of a channel. The origin must be either the sender or the"] # [doc = "recipient in the channel being closed."] # [doc = ""] # [doc = "The closure can only happen on a session change."] hrmp_close_channel { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , } , # [codec (index = 3)] # [doc = "This extrinsic triggers the cleanup of all the HRMP storage items that"] # [doc = "a para may have. Normally this happens once per session, but this allows"] # [doc = "you to trigger the cleanup immediately for a specific parachain."] # [doc = ""] # [doc = "Origin must be Root."] # [doc = ""] # [doc = "Number of inbound and outbound channels for `para` must be provided as witness data of weighing."] force_clean_hrmp { para : runtime_types :: polkadot_parachain :: primitives :: Id , inbound : :: core :: primitive :: u32 , outbound : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "Force process HRMP open channel requests."] # [doc = ""] # [doc = "If there are pending HRMP open channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of opening channels must be provided as witness data of weighing."] force_process_hrmp_open { channels : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Force process HRMP close channel requests."] # [doc = ""] # [doc = "If there are pending HRMP close channel requests, you can use this"] # [doc = "function process all of those requests immediately."] # [doc = ""] # [doc = "Total number of closing channels must be provided as witness data of weighing."] force_process_hrmp_close { channels : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "This cancels a pending open channel request. It can be canceled by either of the sender"] # [doc = "or the recipient for that request. The origin must be either of those."] # [doc = ""] # [doc = "The cancellation happens immediately. It is not possible to cancel the request if it is"] # [doc = "already accepted."] # [doc = ""] # [doc = "Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as"] # [doc = "witness data."] hrmp_cancel_open_request { channel_id : runtime_types :: polkadot_parachain :: primitives :: HrmpChannelId , open_requests : :: core :: primitive :: u32 , } , # [codec (index = 7)] # [doc = "Open a channel from a `sender` to a `recipient` `ParaId` using the Root origin. Although"] # [doc = "opened by Root, the `max_capacity` and `max_message_size` are still subject to the Relay"] # [doc = "Chain's configured limits."] # [doc = ""] # [doc = "Expected use is when one of the `ParaId`s involved in the channel is governed by the"] # [doc = "Relay Chain, e.g. a common good parachain."] force_open_hrmp_channel { sender : runtime_types :: polkadot_parachain :: primitives :: Id , recipient : runtime_types :: polkadot_parachain :: primitives :: Id , max_capacity : :: core :: primitive :: u32 , max_message_size : :: core :: primitive :: u32 , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 sender tried to open a channel to themselves."] + OpenHrmpChannelToSelf, + #[codec(index = 1)] + #[doc = "The recipient is not a valid para."] + OpenHrmpChannelInvalidRecipient, + #[codec(index = 2)] + #[doc = "The requested capacity is zero."] + OpenHrmpChannelZeroCapacity, + #[codec(index = 3)] + #[doc = "The requested capacity exceeds the global limit."] + OpenHrmpChannelCapacityExceedsLimit, + #[codec(index = 4)] + #[doc = "The requested maximum message size is 0."] + OpenHrmpChannelZeroMessageSize, + #[codec(index = 5)] + #[doc = "The open request requested the message size that exceeds the global limit."] + OpenHrmpChannelMessageSizeExceedsLimit, + #[codec(index = 6)] + #[doc = "The channel already exists"] + OpenHrmpChannelAlreadyExists, + #[codec(index = 7)] + #[doc = "There is already a request to open the same channel."] + OpenHrmpChannelAlreadyRequested, + #[codec(index = 8)] + #[doc = "The sender already has the maximum number of allowed outbound channels."] + OpenHrmpChannelLimitExceeded, + #[codec(index = 9)] + #[doc = "The channel from the sender to the origin doesn't exist."] + AcceptHrmpChannelDoesntExist, + #[codec(index = 10)] + #[doc = "The channel is already confirmed."] + AcceptHrmpChannelAlreadyConfirmed, + #[codec(index = 11)] + #[doc = "The recipient already has the maximum number of allowed inbound channels."] + AcceptHrmpChannelLimitExceeded, + #[codec(index = 12)] + #[doc = "The origin tries to close a channel where it is neither the sender nor the recipient."] + CloseHrmpChannelUnauthorized, + #[codec(index = 13)] + #[doc = "The channel to be closed doesn't exist."] + CloseHrmpChannelDoesntExist, + #[codec(index = 14)] + #[doc = "The channel close request is already requested."] + CloseHrmpChannelAlreadyUnderway, + #[codec(index = 15)] + #[doc = "Canceling is requested by neither the sender nor recipient of the open channel request."] + CancelHrmpOpenChannelUnauthorized, + #[codec(index = 16)] + #[doc = "The open request doesn't exist."] + OpenHrmpChannelDoesntExist, + #[codec(index = 17)] + #[doc = "Cannot cancel an HRMP open channel request because it is already confirmed."] + OpenHrmpChannelAlreadyConfirmed, + #[codec(index = 18)] + #[doc = "The provided witness data is wrong."] + WrongWitness, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Open HRMP channel requested."] + #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] + OpenChannelRequested( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 1)] + #[doc = "An HRMP channel request sent by the receiver was canceled by either party."] + #[doc = "`[by_parachain, channel_id]`"] + OpenChannelCanceled( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 2)] + #[doc = "Open HRMP channel accepted. `[sender, recipient]`"] + OpenChannelAccepted( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 3)] + #[doc = "HRMP channel closed. `[by_parachain, channel_id]`"] + ChannelClosed( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 4)] + #[doc = "An HRMP channel was opened via Root origin."] + #[doc = "`[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"] + HrmpChannelForceOpened( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57081,12 +42846,15 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct CollectionMetadata<_0> { - pub deposit: _0, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< - ::core::primitive::u8, - >, - pub is_frozen: ::core::primitive::bool, + pub struct HrmpChannel { + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + pub max_message_size: ::core::primitive::u32, + pub msg_count: ::core::primitive::u32, + pub total_size: ::core::primitive::u32, + pub mqc_head: ::core::option::Option<::subxt::utils::H256>, + pub sender_deposit: ::core::primitive::u128, + pub recipient_deposit: ::core::primitive::u128, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57097,13 +42865,173 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DestroyWitness { - #[codec(compact)] - pub items: ::core::primitive::u32, - #[codec(compact)] - pub item_metadatas: ::core::primitive::u32, - #[codec(compact)] - pub attributes: ::core::primitive::u32, + pub struct HrmpOpenChannelRequest { + pub confirmed: ::core::primitive::bool, + pub _age: ::core::primitive::u32, + pub sender_deposit: ::core::primitive::u128, + pub max_message_size: ::core::primitive::u32, + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + } + } + pub mod inclusion { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call {} + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Validator indices are out of order or contains duplicates."] + UnsortedOrDuplicateValidatorIndices, + #[codec(index = 1)] + #[doc = "Dispute statement sets are out of order or contain duplicates."] + UnsortedOrDuplicateDisputeStatementSet, + #[codec(index = 2)] + #[doc = "Backed candidates are out of order (core index) or contain duplicates."] + UnsortedOrDuplicateBackedCandidates, + #[codec(index = 3)] + #[doc = "A different relay parent was provided compared to the on-chain stored one."] + UnexpectedRelayParent, + #[codec(index = 4)] + #[doc = "Availability bitfield has unexpected size."] + WrongBitfieldSize, + #[codec(index = 5)] + #[doc = "Bitfield consists of zeros only."] + BitfieldAllZeros, + #[codec(index = 6)] + #[doc = "Multiple bitfields submitted by same validator or validators out of order by index."] + BitfieldDuplicateOrUnordered, + #[codec(index = 7)] + #[doc = "Validator index out of bounds."] + ValidatorIndexOutOfBounds, + #[codec(index = 8)] + #[doc = "Invalid signature"] + InvalidBitfieldSignature, + #[codec(index = 9)] + #[doc = "Candidate submitted but para not scheduled."] + UnscheduledCandidate, + #[codec(index = 10)] + #[doc = "Candidate scheduled despite pending candidate already existing for the para."] + CandidateScheduledBeforeParaFree, + #[codec(index = 11)] + #[doc = "Candidate included with the wrong collator."] + WrongCollator, + #[codec(index = 12)] + #[doc = "Scheduled cores out of order."] + ScheduledOutOfOrder, + #[codec(index = 13)] + #[doc = "Head data exceeds the configured maximum."] + HeadDataTooLarge, + #[codec(index = 14)] + #[doc = "Code upgrade prematurely."] + PrematureCodeUpgrade, + #[codec(index = 15)] + #[doc = "Output code is too large"] + NewCodeTooLarge, + #[codec(index = 16)] + #[doc = "Candidate not in parent context."] + CandidateNotInParentContext, + #[codec(index = 17)] + #[doc = "Invalid group index in core assignment."] + InvalidGroupIndex, + #[codec(index = 18)] + #[doc = "Insufficient (non-majority) backing."] + InsufficientBacking, + #[codec(index = 19)] + #[doc = "Invalid (bad signature, unknown validator, etc.) backing."] + InvalidBacking, + #[codec(index = 20)] + #[doc = "Collator did not sign PoV."] + NotCollatorSigned, + #[codec(index = 21)] + #[doc = "The validation data hash does not match expected."] + ValidationDataHashMismatch, + #[codec(index = 22)] + #[doc = "The downward message queue is not processed correctly."] + IncorrectDownwardMessageHandling, + #[codec(index = 23)] + #[doc = "At least one upward message sent does not pass the acceptance criteria."] + InvalidUpwardMessages, + #[codec(index = 24)] + #[doc = "The candidate didn't follow the rules of HRMP watermark advancement."] + HrmpWatermarkMishandling, + #[codec(index = 25)] + #[doc = "The HRMP messages sent by the candidate is not valid."] + InvalidOutboundHrmp, + #[codec(index = 26)] + #[doc = "The validation code hash of the candidate is not valid."] + InvalidValidationCodeHash, + #[codec(index = 27)] + #[doc = "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the"] + #[doc = "commitments."] + ParaHeadMismatch, + #[codec(index = 28)] + #[doc = "A bitfield that references a freed core,"] + #[doc = "either intentionally or as part of a concluded"] + #[doc = "invalid dispute."] + BitfieldReferencesFreedCore, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 candidate was backed. `[candidate, head_data]`"] + CandidateBacked( + runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v2::CoreIndex, + runtime_types::polkadot_primitives::v2::GroupIndex, + ), + #[codec(index = 1)] + #[doc = "A candidate was included. `[candidate, head_data]`"] + CandidateIncluded( + runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v2::CoreIndex, + runtime_types::polkadot_primitives::v2::GroupIndex, + ), + #[codec(index = 2)] + #[doc = "A candidate timed out. `[candidate, head_data]`"] + CandidateTimedOut( + runtime_types::polkadot_primitives::v2::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v2::CoreIndex, + ), + } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57114,11 +43042,10 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemDetails<_0, _1> { - pub owner: _0, - pub approved: ::core::option::Option<_0>, - pub is_frozen: ::core::primitive::bool, - pub deposit: _1, + pub struct AvailabilityBitfieldRecord<_0> { + pub bitfield: + runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + pub submitted_at: _0, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57129,147 +43056,164 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ItemMetadata<_0> { - pub deposit: _0, - pub data: runtime_types::sp_core::bounded::bounded_vec::BoundedVec< + pub struct CandidatePendingAvailability<_0, _1> { + pub core: runtime_types::polkadot_primitives::v2::CoreIndex, + pub hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub descriptor: + runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub availability_votes: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub backers: ::subxt::utils::bits::DecodedBits< ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, >, - pub is_frozen: ::core::primitive::bool, + pub relay_parent_number: _1, + pub backed_in_number: _1, + pub backing_group: runtime_types::polkadot_primitives::v2::GroupIndex, } } - } - pub mod pallet_utility { - use super::runtime_types; - pub mod pallet { + pub mod initializer { use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Issue a signal to the consensus engine to forcibly act as though all parachain"] + #[doc = "blocks in all relay chain blocks up to and including the given number in the current"] + #[doc = "chain are valid and should be finalized."] + force_approve { up_to: ::core::primitive::u32 }, + } + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::OriginCaller, - >, - call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, - #[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< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - weight: runtime_types::sp_weights::weight_v2::Weight, - }, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BufferedSessionChange { + pub validators: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, + pub queued: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, + pub session_index: ::core::primitive::u32, + } + } + pub mod origin { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Origin { + #[codec(index = 0)] + Parachain(runtime_types::polkadot_parachain::primitives::Id), + } + } + } + pub mod paras { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + # [codec (index = 0)] # [doc = "Set the storage for the parachain validation code immediately."] force_set_current_code { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 1)] # [doc = "Set the storage for the current parachain head data immediately."] force_set_current_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 2)] # [doc = "Schedule an upgrade as if it was scheduled in the given relay parent block."] force_schedule_code_upgrade { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , relay_parent_number : :: core :: primitive :: u32 , } , # [codec (index = 3)] # [doc = "Note a new block head for para within the context of the current block."] force_note_new_head { para : runtime_types :: polkadot_parachain :: primitives :: Id , new_head : runtime_types :: polkadot_parachain :: primitives :: HeadData , } , # [codec (index = 4)] # [doc = "Put a parachain directly into the next session's action queue."] # [doc = "We can't queue it any sooner than this without going into the"] # [doc = "initializer..."] force_queue_action { para : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 5)] # [doc = "Adds the validation code to the storage."] # [doc = ""] # [doc = "The code will not be added if it is already present. Additionally, if PVF pre-checking"] # [doc = "is running for that code, it will be instantly accepted."] # [doc = ""] # [doc = "Otherwise, the code will be added into the storage. Note that the code will be added"] # [doc = "into storage with reference count 0. This is to account the fact that there are no users"] # [doc = "for this code yet. The caller will have to make sure that this code eventually gets"] # [doc = "used by some parachain or removed from the storage to avoid storage leaks. For the latter"] # [doc = "prefer to use the `poke_unused_validation_code` dispatchable to raw storage manipulation."] # [doc = ""] # [doc = "This function is mainly meant to be used for upgrading parachains that do not follow"] # [doc = "the go-ahead signal while the PVF pre-checking feature is enabled."] add_trusted_validation_code { validation_code : runtime_types :: polkadot_parachain :: primitives :: ValidationCode , } , # [codec (index = 6)] # [doc = "Remove the validation code from the storage iff the reference count is 0."] # [doc = ""] # [doc = "This is better than removing the storage directly, because it will not remove the code"] # [doc = "that was suddenly got used by some parachain while this dispatchable was pending"] # [doc = "dispatching."] poke_unused_validation_code { validation_code_hash : runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , } , # [codec (index = 7)] # [doc = "Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and"] # [doc = "enacts the results if that was the last vote before achieving the supermajority."] include_pvf_check_statement { stmt : runtime_types :: polkadot_primitives :: v2 :: PvfCheckStatement , signature : runtime_types :: polkadot_primitives :: v2 :: validator_app :: Signature , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[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 = "Para is not registered in our system."] + NotRegistered, + #[codec(index = 1)] + #[doc = "Para cannot be onboarded because it is already tracked by our system."] + CannotOnboard, + #[codec(index = 2)] + #[doc = "Para cannot be offboarded at this time."] + CannotOffboard, + #[codec(index = 3)] + #[doc = "Para cannot be upgraded to a parachain."] + CannotUpgrade, + #[codec(index = 4)] + #[doc = "Para cannot be downgraded to a parathread."] + CannotDowngrade, + #[codec(index = 5)] + #[doc = "The statement for PVF pre-checking is stale."] + PvfCheckStatementStale, + #[codec(index = 6)] + #[doc = "The statement for PVF pre-checking is for a future session."] + PvfCheckStatementFuture, + #[codec(index = 7)] + #[doc = "Claimed validator index is out of bounds."] + PvfCheckValidatorIndexOutOfBounds, + #[codec(index = 8)] + #[doc = "The signature for the PVF pre-checking is invalid."] + PvfCheckInvalidSignature, + #[codec(index = 9)] + #[doc = "The given validator already has cast a vote."] + PvfCheckDoubleVote, + #[codec(index = 10)] + #[doc = "The given PVF does not exist at the moment of process a vote."] + PvfCheckSubjectInvalid, + #[codec(index = 11)] + #[doc = "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism"] + #[doc = "is disabled."] + PvfCheckDisabled, + #[codec(index = 12)] + #[doc = "Parachain cannot currently schedule a code upgrade."] + CannotUpgradeCode, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Current code has been updated for a Para. `para_id`"] CurrentCodeUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 1)] # [doc = "Current head has been updated for a Para. `para_id`"] CurrentHeadUpdated (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 2)] # [doc = "A code upgrade has been scheduled for a Para. `para_id`"] CodeUpgradeScheduled (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 3)] # [doc = "A new head has been noted for a Para. `para_id`"] NewHeadNoted (runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 4)] # [doc = "A para has been queued to execute pending actions. `para_id`"] ActionQueued (runtime_types :: polkadot_parachain :: primitives :: Id , :: core :: primitive :: u32 ,) , # [codec (index = 5)] # [doc = "The given para either initiated or subscribed to a PVF check for the given validation"] # [doc = "code. `code_hash` `para_id`"] PvfCheckStarted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 6)] # [doc = "The given validation code was accepted by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckAccepted (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , # [codec (index = 7)] # [doc = "The given validation code was rejected by the PVF pre-checking vote."] # [doc = "`code_hash` `para_id`"] PvfCheckRejected (runtime_types :: polkadot_parachain :: primitives :: ValidationCodeHash , runtime_types :: polkadot_parachain :: primitives :: Id ,) , } } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57280,11 +43224,12 @@ pub mod api { )] #[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, + pub struct ParaGenesisArgs { + pub genesis_head: + runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + pub para_kind: ::core::primitive::bool, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57295,44 +43240,22 @@ pub mod api { )] #[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 { + pub enum ParaLifecycle { #[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, - }, + Onboarding, #[codec(index = 1)] - #[doc = "Batch of dispatches completed fully with no error."] - BatchCompleted, + Parathread, #[codec(index = 2)] - #[doc = "Batch of dispatches completed but has errors."] - BatchCompletedWithErrors, + Parachain, #[codec(index = 3)] - #[doc = "A single item within a Batch of dispatches has completed with no error."] - ItemCompleted, + UpgradingParathread, #[codec(index = 4)] - #[doc = "A single item within a Batch of dispatches has completed with error."] - ItemFailed { - error: runtime_types::sp_runtime::DispatchError, - }, + DowngradingParachain, #[codec(index = 5)] - #[doc = "A call was dispatched."] - DispatchedAs { - result: ::core::result::Result< - (), - runtime_types::sp_runtime::DispatchError, - >, - }, + OffboardingParathread, + #[codec(index = 6)] + OffboardingParachain, } - } - } - pub mod pallet_vesting { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57342,135 +43265,7 @@ pub mod api { )] #[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 = "Unlock any vested funds of the sender account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 2 Reads, 2 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"] - #[doc = "# "] - vest, - #[codec(index = 1)] - #[doc = "Unlock any vested funds of a `target` account."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] - #[doc = "locked under this pallet."] - #[doc = ""] - #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"] - #[doc = "# "] - vest_other { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - }, - #[codec(index = 2)] - #[doc = "Create a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `target`: The account receiving the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 3 Reads, 3 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"] - #[doc = "# "] - vested_transfer { - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - schedule: - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - #[doc = "Force a vested transfer."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Root_."] - #[doc = ""] - #[doc = "- `source`: The account whose funds should be transferred."] - #[doc = "- `target`: The account that should be transferred the vested funds."] - #[doc = "- `schedule`: The vesting schedule attached to the transfer."] - #[doc = ""] - #[doc = "Emits `VestingCreated`."] - #[doc = ""] - #[doc = "NOTE: This will unlock all schedules through the current block."] - #[doc = ""] - #[doc = "# "] - #[doc = "- `O(1)`."] - #[doc = "- DbWeight: 4 Reads, 4 Writes"] - #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"] - #[doc = "# "] - force_vested_transfer { - source: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - target: ::subxt::utils::MultiAddress< - ::subxt::utils::AccountId32, - ::core::primitive::u32, - >, - schedule: - runtime_types::pallet_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] - #[doc = "the highest possible start and end blocks. If both schedules have already started the"] - #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] - #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] - #[doc = "unmodified."] - #[doc = ""] - #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] - #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] - #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] - #[doc = "and both will be removed."] - #[doc = ""] - #[doc = "Merged schedule attributes:"] - #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] - #[doc = " current_block)`."] - #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] - #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] - #[doc = ""] - #[doc = "The dispatch origin for this call must be _Signed_."] - #[doc = ""] - #[doc = "- `schedule1_index`: index of the first schedule to merge."] - #[doc = "- `schedule2_index`: index of the second schedule to merge."] - merge_schedules { - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - }, - } + pub struct ParaPastCodeMeta < _0 > { pub upgrade_times : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: paras :: ReplacementTimes < _0 > > , pub last_pruned : :: core :: option :: Option < _0 > , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57480,24 +43275,22 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "Error for the vesting pallet."] - pub enum Error { - #[codec(index = 0)] - #[doc = "The account given is not vesting."] - NotVesting, - #[codec(index = 1)] - #[doc = "The account already has `MaxVestingSchedules` count of schedules and thus"] - #[doc = "cannot add another one. Consider merging existing schedules in order to add another."] - AtMaxVestingSchedules, - #[codec(index = 2)] - #[doc = "Amount being transferred is too low to create a vesting schedule."] - AmountLow, - #[codec(index = 3)] - #[doc = "An index was out of bounds of the vesting schedules."] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - #[doc = "Failed to create a new schedule because some parameter was invalid."] - InvalidScheduleParams, + pub struct PvfCheckActiveVoteState<_0> { + pub votes_accept: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub votes_reject: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub age: _0, + pub created_at: _0, + pub causes: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause< + _0, + >, + >, } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57508,24 +43301,15 @@ pub mod api { )] #[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 { + pub enum PvfCheckCause<_0> { #[codec(index = 0)] - #[doc = "The amount vested has been updated. This could indicate a change in funds available."] - #[doc = "The balance given is the amount which is left unvested (and thus locked)."] - VestingUpdated { - account: ::subxt::utils::AccountId32, - unvested: ::core::primitive::u128, - }, + Onboarding(runtime_types::polkadot_parachain::primitives::Id), #[codec(index = 1)] - #[doc = "An \\[account\\] has become fully vested."] - VestingCompleted { - account: ::subxt::utils::AccountId32, + Upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + relay_parent_number: _0, }, } - } - pub mod vesting_info { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57535,31 +43319,71 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, + pub struct ReplacementTimes<_0> { + pub expected_at: _0, + pub activated_at: _0, } } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, + pub mod paras_inherent { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Enter the paras inherent. This will process bitfields and backed candidates."] + enter { + data: runtime_types::polkadot_primitives::v2::InherentData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] + pub enum Error { + #[codec(index = 0)] + #[doc = "Inclusion inherent called more than once per block."] + TooManyInclusionInherents, + #[codec(index = 1)] + #[doc = "The hash of the submitted parent header doesn't correspond to the saved block hash of"] + #[doc = "the parent."] + InvalidParentHeader, + #[codec(index = 2)] + #[doc = "Disputed candidate that was concluded invalid."] + CandidateConcludedInvalid, + #[codec(index = 3)] + #[doc = "The data given to the inherent will result in an overweight block."] + InherentOverweight, + #[codec(index = 4)] + #[doc = "The ordering of dispute statements was invalid."] + DisputeStatementsUnsortedOrDuplicates, + #[codec(index = 5)] + #[doc = "A dispute statement was invalid."] + DisputeInvalid, + } + } } - } - pub mod pallet_whitelist { - use super::runtime_types; - pub mod pallet { + pub mod scheduler { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -57570,24 +43394,14 @@ pub mod api { )] #[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 { + pub enum AssignmentKind { #[codec(index = 0)] - whitelist_call { call_hash: ::subxt::utils::H256 }, + Parachain, #[codec(index = 1)] - remove_whitelisted_call { call_hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - dispatch_whitelisted_call { - call_hash: ::subxt::utils::H256, - call_encoded_len: ::core::primitive::u32, - call_weight_witness: runtime_types::sp_weights::weight_v2::Weight, - }, - #[codec(index = 3)] - dispatch_whitelisted_call_with_preimage { - call: ::std::boxed::Box< - runtime_types::kitchensink_runtime::RuntimeCall, - >, - }, + Parathread( + runtime_types::polkadot_primitives::v2::collator_app::Public, + ::core::primitive::u32, + ), } #[derive( :: subxt :: ext :: codec :: Decode, @@ -57598,24 +43412,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/main-docs/build/events-errors/)\n\t\t\tof this pallet.\n\t\t\t"] - pub enum Error { - #[codec(index = 0)] - #[doc = "The preimage of the call hash could not be loaded."] - UnavailablePreImage, - #[codec(index = 1)] - #[doc = "The call could not be decoded."] - UndecodableCall, - #[codec(index = 2)] - #[doc = "The weight of the decoded call was higher than the witness."] - InvalidCallWeightWitness, - #[codec(index = 3)] - #[doc = "The call was not whitelisted."] - CallIsNotWhitelisted, - #[codec(index = 4)] - #[doc = "The call was already whitelisted; No-Op."] - CallAlreadyWhitelisted, - } + pub struct CoreAssignment { pub core : runtime_types :: polkadot_primitives :: v2 :: CoreIndex , pub para_id : runtime_types :: polkadot_parachain :: primitives :: Id , pub kind : runtime_types :: polkadot_runtime_parachains :: scheduler :: AssignmentKind , pub group_idx : runtime_types :: polkadot_primitives :: v2 :: GroupIndex , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57625,29 +43422,7 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] - pub enum Event { - #[codec(index = 0)] - CallWhitelisted { call_hash: ::subxt::utils::H256 }, - #[codec(index = 1)] - WhitelistedCallRemoved { call_hash: ::subxt::utils::H256 }, - #[codec(index = 2)] - WhitelistedCallDispatched { - call_hash: ::subxt::utils::H256, - result: ::core::result::Result< - runtime_types::frame_support::dispatch::PostDispatchInfo, - runtime_types::sp_runtime::DispatchErrorWithPostInfo< - runtime_types::frame_support::dispatch::PostDispatchInfo, - >, - >, - }, - } - } - } - pub mod sp_arithmetic { - use super::runtime_types; - pub mod fixed_point { - use super::runtime_types; + pub struct ParathreadClaimQueue { pub queue : :: std :: vec :: Vec < runtime_types :: polkadot_runtime_parachains :: scheduler :: QueuedParathread > , pub next_core_offset : :: core :: primitive :: u32 , } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -57657,7 +43432,151 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct FixedI64(pub ::core::primitive::i64); + pub struct QueuedParathread { + pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, + pub core_offset: ::core::primitive::u32, + } + } + pub mod shared { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call {} + } + } + pub mod ump { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Service a single overweight upward message."] + #[doc = ""] + #[doc = "- `origin`: Must pass `ExecuteOverweightOrigin`."] + #[doc = "- `index`: The index of the overweight message to service."] + #[doc = "- `weight_limit`: The amount of weight that message execution may take."] + #[doc = ""] + #[doc = "Errors:"] + #[doc = "- `UnknownMessageIndex`: Message of `index` is unknown."] + #[doc = "- `WeightOverLimit`: Message execution may use greater than `weight_limit`."] + #[doc = ""] + #[doc = "Events:"] + #[doc = "- `OverweightServiced`: On success."] + service_overweight { + index: ::core::primitive::u64, + weight_limit: runtime_types::sp_weights::weight_v2::Weight, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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 message index given is unknown."] + UnknownMessageIndex, + #[codec(index = 1)] + #[doc = "The amount of weight given is possibly not enough for executing the message."] + WeightOverLimit, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + #[doc = "\n\t\t\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 = "Upward message is invalid XCM."] + #[doc = "\\[ id \\]"] + InvalidFormat([::core::primitive::u8; 32usize]), + #[codec(index = 1)] + #[doc = "Upward message is unsupported version of XCM."] + #[doc = "\\[ id \\]"] + UnsupportedVersion([::core::primitive::u8; 32usize]), + #[codec(index = 2)] + #[doc = "Upward message executed with the given outcome."] + #[doc = "\\[ id, outcome \\]"] + ExecutedUpward( + [::core::primitive::u8; 32usize], + runtime_types::xcm::v2::traits::Outcome, + ), + #[codec(index = 3)] + #[doc = "The weight limit for handling upward messages was reached."] + #[doc = "\\[ id, remaining, required \\]"] + WeightExhausted( + [::core::primitive::u8; 32usize], + runtime_types::sp_weights::weight_v2::Weight, + runtime_types::sp_weights::weight_v2::Weight, + ), + #[codec(index = 4)] + #[doc = "Some upward messages have been received and will be processed."] + #[doc = "\\[ para, count, size \\]"] + UpwardMessagesReceived( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 5)] + #[doc = "The weight budget was exceeded for an individual upward message."] + #[doc = ""] + #[doc = "This message can be later dispatched manually using `service_overweight` dispatchable"] + #[doc = "using the assigned `overweight_index`."] + #[doc = ""] + #[doc = "\\[ para, id, overweight_index, required \\]"] + OverweightEnqueued( + runtime_types::polkadot_parachain::primitives::Id, + [::core::primitive::u8; 32usize], + ::core::primitive::u64, + runtime_types::sp_weights::weight_v2::Weight, + ), + #[codec(index = 6)] + #[doc = "Upward message from the overweight queue was executed with the given actual weight"] + #[doc = "used."] + #[doc = ""] + #[doc = "\\[ overweight_index, used \\]"] + OverweightServiced( + ::core::primitive::u64, + runtime_types::sp_weights::weight_v2::Weight, + ), + } + } + } + } + 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, @@ -57716,34 +43635,6 @@ pub mod api { #[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 :: CompactAs, - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Perquintill(pub ::core::primitive::u64); - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum ArithmeticError { - #[codec(index = 0)] - Underflow, - #[codec(index = 1)] - Overflow, - #[codec(index = 2)] - DivisionByZero, } } pub mod sp_authority_discovery { @@ -57929,19 +43820,6 @@ pub mod api { pub ::subxt::utils::KeyedVec<_0, _1>, ); } - pub mod bounded_btree_set { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BoundedBTreeSet<_0>(pub ::std::vec::Vec<_0>); - } pub mod bounded_vec { use super::runtime_types; #[derive( @@ -57993,6 +43871,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 33usize]); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] pub struct Signature(pub [::core::primitive::u8; 65usize]); } pub mod ed25519 { @@ -58764,7 +44652,461 @@ pub mod api { Mortal255(::core::primitive::u8), } } - pub mod header { + pub mod header { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Header<_0, _1> { + pub parent_hash: ::subxt::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt::utils::H256, + pub extrinsics_root: ::subxt::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, + ); + } + } + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct BlakeTwo256; + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_runtime::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiSigner { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Public), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Public), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Public), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TokenError { + #[codec(index = 0)] + NoFunds, + #[codec(index = 1)] + WouldDie, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub validator_count: ::core::primitive::u32, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_version { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: ::std::vec::Vec<( + [::core::primitive::u8; 8usize], + ::core::primitive::u32, + )>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod sp_weights { + use super::runtime_types; + pub mod weight_v2 { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[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, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct OldWeight(pub ::core::primitive::u64); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + } + pub mod xcm { + use super::runtime_types; + pub mod double_encoded { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct DoubleEncoded { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v0 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BodyId { + # [codec (index = 0)] Unit , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Index (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 3)] Executive , # [codec (index = 4)] Technical , # [codec (index = 5)] Legislative , # [codec (index = 6)] Judicial , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Junction { + # [codec (index = 0)] Parent , # [codec (index = 1)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 2)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 3)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 4)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 5)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 6)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 7)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 8)] OnlyChild , # [codec (index = 9)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum NetworkId { + # [codec (index = 0)] Any , # [codec (index = 1)] Named (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 2)] Polkadot , # [codec (index = 3)] Kusama , } + } + pub mod multi_asset { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiAsset { + #[codec(index = 0)] + None, + #[codec(index = 1)] + All, + #[codec(index = 2)] + AllFungible, + #[codec(index = 3)] + AllNonFungible, + #[codec(index = 4)] + AllAbstractFungible { + id: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 5)] + AllAbstractNonFungible { + class: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 6)] + AllConcreteFungible { + id: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 7)] + AllConcreteNonFungible { + class: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 8)] + AbstractFungible { + id: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + AbstractNonFungible { + class: ::std::vec::Vec<::core::primitive::u8>, + instance: runtime_types::xcm::v1::multiasset::AssetInstance, + }, + #[codec(index = 10)] + ConcreteFungible { + id: runtime_types::xcm::v0::multi_location::MultiLocation, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + ConcreteNonFungible { + class: runtime_types::xcm::v0::multi_location::MultiLocation, + instance: runtime_types::xcm::v1::multiasset::AssetInstance, + }, + } + } + pub mod multi_location { use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, @@ -58775,19 +45117,738 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Header<_0, _1> { - pub parent_hash: ::subxt::utils::H256, + pub enum MultiLocation { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + X1(runtime_types::xcm::v0::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + runtime_types::xcm::v0::junction::Junction, + ), + } + } + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Order { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + DepositAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 2)] + DepositReserveAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 3)] + ExchangeAsset { + give: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + receive: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + }, + #[codec(index = 4)] + InitiateReserveWithdraw { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + reserve: + runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 5)] + InitiateTeleport { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 6)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + }, + #[codec(index = 7)] + BuyExecution { + fees: runtime_types::xcm::v0::multi_asset::MultiAsset, + weight: ::core::primitive::u64, + debt: ::core::primitive::u64, + halt_on_error: ::core::primitive::bool, + xcm: ::std::vec::Vec, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Response { + #[codec(index = 0)] + Assets( + ::std::vec::Vec, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Xcm { + #[codec(index = 0)] + WithdrawAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 1)] + ReserveAssetDeposit { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 2)] + TeleportAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + effects: ::std::vec::Vec, + }, + #[codec(index = 3)] + QueryResponse { #[codec(compact)] - pub number: _0, - pub state_root: ::subxt::utils::H256, - pub extrinsics_root: ::subxt::utils::H256, - pub digest: runtime_types::sp_runtime::generic::digest::Digest, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v0::Response, + }, + #[codec(index = 4)] + TransferAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: ::std::vec::Vec< + runtime_types::xcm::v0::multi_asset::MultiAsset, + >, + dest: runtime_types::xcm::v0::multi_location::MultiLocation, + effects: ::std::vec::Vec, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + RelayedFrom { + who: runtime_types::xcm::v0::multi_location::MultiLocation, + message: ::std::boxed::Box, + }, + } + } + pub mod v1 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Junction { + # [codec (index = 0)] Parachain (# [codec (compact)] :: core :: primitive :: u32 ,) , # [codec (index = 1)] AccountId32 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , id : [:: core :: primitive :: u8 ; 32usize] , } , # [codec (index = 2)] AccountIndex64 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , # [codec (compact)] index : :: core :: primitive :: u64 , } , # [codec (index = 3)] AccountKey20 { network : runtime_types :: xcm :: v0 :: junction :: NetworkId , key : [:: core :: primitive :: u8 ; 20usize] , } , # [codec (index = 4)] PalletInstance (:: core :: primitive :: u8 ,) , # [codec (index = 5)] GeneralIndex (# [codec (compact)] :: core :: primitive :: u128 ,) , # [codec (index = 6)] GeneralKey (runtime_types :: sp_core :: bounded :: weak_bounded_vec :: WeakBoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 7)] OnlyChild , # [codec (index = 8)] Plurality { id : runtime_types :: xcm :: v0 :: junction :: BodyId , part : runtime_types :: xcm :: v0 :: junction :: BodyPart , } , } + } + pub mod multiasset { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v1::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract(::std::vec::Vec<::core::primitive::u8>), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + #[codec(index = 6)] + Blob(::std::vec::Vec<::core::primitive::u8>), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v1::multiasset::AssetInstance), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiAsset { + pub id: runtime_types::xcm::v1::multiasset::AssetId, + pub fun: runtime_types::xcm::v1::multiasset::Fungibility, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v1::multiasset::WildMultiAsset), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiAssets( + pub ::std::vec::Vec< + runtime_types::xcm::v1::multiasset::MultiAsset, + >, + ); + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v1::multiasset::AssetId, + fun: runtime_types::xcm::v1::multiasset::WildFungibility, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v1::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + runtime_types::xcm::v1::junction::Junction, + ), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v1::multilocation::Junctions, + } + } + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Order { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + DepositAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + max_assets: ::core::primitive::u32, + beneficiary: + runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 2)] + DepositReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 3)] + ExchangeAsset { + give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v1::multiasset::MultiAssets, + }, + #[codec(index = 4)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 5)] + InitiateTeleport { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: + ::std::vec::Vec, + }, + #[codec(index = 6)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + }, + #[codec(index = 7)] + BuyExecution { + fees: runtime_types::xcm::v1::multiasset::MultiAsset, + weight: ::core::primitive::u64, + debt: ::core::primitive::u64, + halt_on_error: ::core::primitive::bool, + instructions: ::std::vec::Vec, + }, + } + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Response { + #[codec(index = 0)] + Assets(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 1)] + Version(::core::primitive::u32), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Xcm { + #[codec(index = 0)] + WithdrawAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, + #[codec(index = 1)] + ReserveAssetDeposited { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, + #[codec(index = 2)] + ReceiveTeleportedAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + effects: ::std::vec::Vec, + }, + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v1::Response, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + effects: ::std::vec::Vec, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + RelayedFrom { + who: runtime_types::xcm::v1::multilocation::Junctions, + message: ::std::boxed::Box, + }, + #[codec(index = 11)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 12)] + UnsubscribeVersion, + } + } + pub mod v2 { + use super::runtime_types; + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + MultiLocationFull, + #[codec(index = 5)] + MultiLocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + UnhandledXcmVersion, + #[codec(index = 23)] + WeightLimitReached(::core::primitive::u64), + #[codec(index = 24)] + Barrier, + #[codec(index = 25)] + WeightNotComputable, } - } - pub mod unchecked_extrinsic { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -58797,14 +45858,18 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub ::std::vec::Vec<::core::primitive::u8>, - #[codec(skip)] pub ::core::marker::PhantomData<(_1, _0, _2, _3)>, - ); + pub enum Outcome { + #[codec(index = 0)] + Complete(::core::primitive::u64), + #[codec(index = 1)] + Incomplete( + ::core::primitive::u64, + runtime_types::xcm::v2::traits::Error, + ), + #[codec(index = 2)] + Error(runtime_types::xcm::v2::traits::Error), + } } - } - pub mod traits { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -58814,150 +45879,149 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct BlakeTwo256; - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum DispatchError { - #[codec(index = 0)] - Other, - #[codec(index = 1)] - CannotLookup, - #[codec(index = 2)] - BadOrigin, - #[codec(index = 3)] - Module(runtime_types::sp_runtime::ModuleError), - #[codec(index = 4)] - ConsumerRemaining, - #[codec(index = 5)] - NoProviders, - #[codec(index = 6)] - TooManyConsumers, - #[codec(index = 7)] - Token(runtime_types::sp_runtime::TokenError), - #[codec(index = 8)] - Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), - #[codec(index = 9)] - Transactional(runtime_types::sp_runtime::TransactionalError), - #[codec(index = 10)] - Exhausted, - #[codec(index = 11)] - Corruption, - #[codec(index = 12)] - Unavailable, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct DispatchErrorWithPostInfo<_0> { - pub post_info: _0, - pub error: runtime_types::sp_runtime::DispatchError, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct ModuleError { - pub index: ::core::primitive::u8, - pub error: [::core::primitive::u8; 4usize], - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum MultiSignature { - #[codec(index = 0)] - Ed25519(runtime_types::sp_core::ed25519::Signature), - #[codec(index = 1)] - Sr25519(runtime_types::sp_core::sr25519::Signature), - #[codec(index = 2)] - Ecdsa(runtime_types::sp_core::ecdsa::Signature), - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TokenError { - #[codec(index = 0)] - NoFunds, - #[codec(index = 1)] - WouldDie, - #[codec(index = 2)] - BelowMinimum, - #[codec(index = 3)] - CannotCreate, - #[codec(index = 4)] - UnknownAsset, - #[codec(index = 5)] - Frozen, - #[codec(index = 6)] - Unsupported, - } - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum TransactionalError { - #[codec(index = 0)] - LimitReached, - #[codec(index = 1)] - NoLayer, - } - } - pub mod sp_session { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct MembershipProof { - pub session: ::core::primitive::u32, - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub validator_count: ::core::primitive::u32, - } - } - pub mod sp_staking { - use super::runtime_types; - pub mod offence { - use super::runtime_types; + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited( + runtime_types::xcm::v1::multiasset::MultiAssets, + ), + #[codec(index = 2)] + ReceiveTeleportedAsset( + runtime_types::xcm::v1::multiasset::MultiAssets, + ), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v2::Response, + #[codec(compact)] + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v0::OriginKind, + #[codec(compact)] + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v1::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v1::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v1::multilocation::MultiLocation, + assets: runtime_types::xcm::v1::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v1::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v2::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v2::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v1::multiasset::MultiAssets, + ticket: runtime_types::xcm::v1::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 27)] + UnsubscribeVersion, + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -58967,14 +46031,47 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct OffenceDetails<_0, _1> { - pub offender: _1, - pub reporters: ::std::vec::Vec<_0>, + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v1::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v2::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(#[codec(compact)] ::core::primitive::u64), } + #[derive( + :: subxt :: ext :: codec :: Decode, + :: subxt :: ext :: codec :: Encode, + :: subxt :: ext :: scale_decode :: DecodeAsType, + :: subxt :: ext :: scale_encode :: EncodeAsType, + Debug, + )] + #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] + pub struct Xcm(pub ::std::vec::Vec); } - } - pub mod sp_transaction_storage_proof { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -58984,13 +46081,12 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct TransactionStorageProof { - pub chunk: ::std::vec::Vec<::core::primitive::u8>, - pub proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub enum VersionedMultiAssets { + #[codec(index = 0)] + V0(::std::vec::Vec), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::multiasset::MultiAssets), } - } - pub mod sp_version { - use super::runtime_types; #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -59000,42 +46096,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeVersion { - pub spec_name: ::std::string::String, - pub impl_name: ::std::string::String, - pub authoring_version: ::core::primitive::u32, - pub spec_version: ::core::primitive::u32, - pub impl_version: ::core::primitive::u32, - pub apis: ::std::vec::Vec<( - [::core::primitive::u8; 8usize], - ::core::primitive::u32, - )>, - pub transaction_version: ::core::primitive::u32, - pub state_version: ::core::primitive::u8, - } - } - pub mod sp_weights { - use super::runtime_types; - pub mod weight_v2 { - use super::runtime_types; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct Weight { - #[codec(compact)] - pub ref_time: ::core::primitive::u64, - #[codec(compact)] - pub proof_size: ::core::primitive::u64, - } + pub enum VersionedMultiLocation { + #[codec(index = 0)] + V0(runtime_types::xcm::v0::multi_location::MultiLocation), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::multilocation::MultiLocation), } #[derive( - :: subxt :: ext :: codec :: CompactAs, :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, :: subxt :: ext :: scale_decode :: DecodeAsType, @@ -59044,7 +46111,14 @@ pub mod api { )] #[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); + pub enum VersionedResponse { + #[codec(index = 0)] + V0(runtime_types::xcm::v0::Response), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::Response), + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Response), + } #[derive( :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, @@ -59054,9 +46128,13 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, + pub enum VersionedXcm { + #[codec(index = 0)] + V0(runtime_types::xcm::v0::Xcm), + #[codec(index = 1)] + V1(runtime_types::xcm::v1::Xcm), + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Xcm), } } } @@ -59077,8 +46155,8 @@ pub mod api { pub fn system(&self) -> system::constants::ConstantsApi { system::constants::ConstantsApi } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi } pub fn babe(&self) -> babe::constants::ConstantsApi { babe::constants::ConstantsApi @@ -59086,9 +46164,6 @@ pub mod api { 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 } @@ -59100,46 +46175,38 @@ pub mod api { ) -> 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 authorship(&self) -> authorship::constants::ConstantsApi { + authorship::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 contracts(&self) -> contracts::constants::ConstantsApi { - contracts::constants::ConstantsApi - } pub fn im_online(&self) -> im_online::constants::ConstantsApi { im_online::constants::ConstantsApi } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi } - pub fn society(&self) -> society::constants::ConstantsApi { - society::constants::ConstantsApi + pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { + phragmen_election::constants::ConstantsApi } - pub fn recovery(&self) -> recovery::constants::ConstantsApi { - recovery::constants::ConstantsApi + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi + } + pub fn claims(&self) -> claims::constants::ConstantsApi { + claims::constants::ConstantsApi } pub fn vesting(&self) -> vesting::constants::ConstantsApi { vesting::constants::ConstantsApi } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi } pub fn proxy(&self) -> proxy::constants::ConstantsApi { proxy::constants::ConstantsApi @@ -59150,55 +46217,37 @@ pub mod api { pub fn bounties(&self) -> bounties::constants::ConstantsApi { bounties::constants::ConstantsApi } + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi + } pub fn tips(&self) -> tips::constants::ConstantsApi { tips::constants::ConstantsApi } - pub fn assets(&self) -> assets::constants::ConstantsApi { - assets::constants::ConstantsApi - } - pub fn lottery(&self) -> lottery::constants::ConstantsApi { - lottery::constants::ConstantsApi - } - pub fn nis(&self) -> nis::constants::ConstantsApi { - nis::constants::ConstantsApi - } - pub fn uniques(&self) -> uniques::constants::ConstantsApi { - uniques::constants::ConstantsApi - } - pub fn nfts(&self) -> nfts::constants::ConstantsApi { - nfts::constants::ConstantsApi + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi } pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { voter_list::constants::ConstantsApi } - pub fn state_trie_migration( - &self, - ) -> state_trie_migration::constants::ConstantsApi { - state_trie_migration::constants::ConstantsApi - } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi - } - pub fn referenda(&self) -> referenda::constants::ConstantsApi { - referenda::constants::ConstantsApi - } - pub fn conviction_voting(&self) -> conviction_voting::constants::ConstantsApi { - conviction_voting::constants::ConstantsApi - } - pub fn alliance(&self) -> alliance::constants::ConstantsApi { - alliance::constants::ConstantsApi - } pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { nomination_pools::constants::ConstantsApi } - pub fn ranked_polls(&self) -> ranked_polls::constants::ConstantsApi { - ranked_polls::constants::ConstantsApi + pub fn paras(&self) -> paras::constants::ConstantsApi { + paras::constants::ConstantsApi + } + pub fn registrar(&self) -> registrar::constants::ConstantsApi { + registrar::constants::ConstantsApi } - pub fn fast_unstake(&self) -> fast_unstake::constants::ConstantsApi { - fast_unstake::constants::ConstantsApi + pub fn slots(&self) -> slots::constants::ConstantsApi { + slots::constants::ConstantsApi } - pub fn message_queue(&self) -> message_queue::constants::ConstantsApi { - message_queue::constants::ConstantsApi + pub fn auctions(&self) -> auctions::constants::ConstantsApi { + auctions::constants::ConstantsApi + } + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { + crowdloan::constants::ConstantsApi } } pub struct StorageApi; @@ -59206,15 +46255,18 @@ pub mod api { pub fn system(&self) -> system::storage::StorageApi { system::storage::StorageApi } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } pub fn babe(&self) -> babe::storage::StorageApi { babe::storage::StorageApi } pub fn timestamp(&self) -> timestamp::storage::StorageApi { timestamp::storage::StorageApi } - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi - } pub fn indices(&self) -> indices::storage::StorageApi { indices::storage::StorageApi } @@ -59224,17 +46276,24 @@ pub mod api { 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 authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi } pub fn staking(&self) -> staking::storage::StorageApi { staking::storage::StorageApi } + pub fn offences(&self) -> offences::storage::StorageApi { + offences::storage::StorageApi + } pub fn session(&self) -> session::storage::StorageApi { session::storage::StorageApi } + pub fn grandpa(&self) -> grandpa::storage::StorageApi { + grandpa::storage::StorageApi + } + pub fn im_online(&self) -> im_online::storage::StorageApi { + im_online::storage::StorageApi + } pub fn democracy(&self) -> democracy::storage::StorageApi { democracy::storage::StorageApi } @@ -59244,55 +46303,23 @@ pub mod api { 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 phragmen_election(&self) -> phragmen_election::storage::StorageApi { + phragmen_election::storage::StorageApi } pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { technical_membership::storage::StorageApi } - pub fn grandpa(&self) -> grandpa::storage::StorageApi { - grandpa::storage::StorageApi - } pub fn treasury(&self) -> treasury::storage::StorageApi { treasury::storage::StorageApi } - pub fn contracts(&self) -> contracts::storage::StorageApi { - contracts::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 randomness_collective_flip( - &self, - ) -> randomness_collective_flip::storage::StorageApi { - randomness_collective_flip::storage::StorageApi - } - pub fn identity(&self) -> identity::storage::StorageApi { - identity::storage::StorageApi - } - pub fn society(&self) -> society::storage::StorageApi { - society::storage::StorageApi - } - pub fn recovery(&self) -> recovery::storage::StorageApi { - recovery::storage::StorageApi + pub fn claims(&self) -> claims::storage::StorageApi { + claims::storage::StorageApi } pub fn vesting(&self) -> vesting::storage::StorageApi { vesting::storage::StorageApi } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi + pub fn identity(&self) -> identity::storage::StorageApi { + identity::storage::StorageApi } pub fn proxy(&self) -> proxy::storage::StorageApi { proxy::storage::StorageApi @@ -59303,68 +46330,76 @@ pub mod api { pub fn bounties(&self) -> bounties::storage::StorageApi { bounties::storage::StorageApi } + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi + } pub fn tips(&self) -> tips::storage::StorageApi { tips::storage::StorageApi } - pub fn assets(&self) -> assets::storage::StorageApi { - assets::storage::StorageApi + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi + } + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi } - pub fn mmr(&self) -> mmr::storage::StorageApi { - mmr::storage::StorageApi + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi } - pub fn lottery(&self) -> lottery::storage::StorageApi { - lottery::storage::StorageApi + pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { + fast_unstake::storage::StorageApi } - pub fn nis(&self) -> nis::storage::StorageApi { - nis::storage::StorageApi + pub fn configuration(&self) -> configuration::storage::StorageApi { + configuration::storage::StorageApi } - pub fn uniques(&self) -> uniques::storage::StorageApi { - uniques::storage::StorageApi + pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { + paras_shared::storage::StorageApi } - pub fn nfts(&self) -> nfts::storage::StorageApi { - nfts::storage::StorageApi + pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { + para_inclusion::storage::StorageApi } - pub fn transaction_storage(&self) -> transaction_storage::storage::StorageApi { - transaction_storage::storage::StorageApi + pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { + para_inherent::storage::StorageApi } - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi + pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { + para_scheduler::storage::StorageApi } - pub fn state_trie_migration(&self) -> state_trie_migration::storage::StorageApi { - state_trie_migration::storage::StorageApi + pub fn paras(&self) -> paras::storage::StorageApi { + paras::storage::StorageApi } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { - child_bounties::storage::StorageApi + pub fn initializer(&self) -> initializer::storage::StorageApi { + initializer::storage::StorageApi } - pub fn referenda(&self) -> referenda::storage::StorageApi { - referenda::storage::StorageApi + pub fn dmp(&self) -> dmp::storage::StorageApi { + dmp::storage::StorageApi } - pub fn conviction_voting(&self) -> conviction_voting::storage::StorageApi { - conviction_voting::storage::StorageApi + pub fn ump(&self) -> ump::storage::StorageApi { + ump::storage::StorageApi } - pub fn whitelist(&self) -> whitelist::storage::StorageApi { - whitelist::storage::StorageApi + pub fn hrmp(&self) -> hrmp::storage::StorageApi { + hrmp::storage::StorageApi } - pub fn alliance_motion(&self) -> alliance_motion::storage::StorageApi { - alliance_motion::storage::StorageApi + pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { + para_session_info::storage::StorageApi } - pub fn alliance(&self) -> alliance::storage::StorageApi { - alliance::storage::StorageApi + pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { + paras_disputes::storage::StorageApi } - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi + pub fn registrar(&self) -> registrar::storage::StorageApi { + registrar::storage::StorageApi } - pub fn ranked_polls(&self) -> ranked_polls::storage::StorageApi { - ranked_polls::storage::StorageApi + pub fn slots(&self) -> slots::storage::StorageApi { + slots::storage::StorageApi } - pub fn ranked_collective(&self) -> ranked_collective::storage::StorageApi { - ranked_collective::storage::StorageApi + pub fn auctions(&self) -> auctions::storage::StorageApi { + auctions::storage::StorageApi } - pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { - fast_unstake::storage::StorageApi + pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { + crowdloan::storage::StorageApi } - pub fn message_queue(&self) -> message_queue::storage::StorageApi { - message_queue::storage::StorageApi + pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { + xcm_pallet::storage::StorageApi } } pub struct TransactionApi; @@ -59372,8 +46407,11 @@ pub mod api { pub fn system(&self) -> system::calls::TransactionApi { system::calls::TransactionApi } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi } pub fn babe(&self) -> babe::calls::TransactionApi { babe::calls::TransactionApi @@ -59381,19 +46419,14 @@ pub mod api { 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 } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi + pub fn authorship(&self) -> authorship::calls::TransactionApi { + authorship::calls::TransactionApi } pub fn staking(&self) -> staking::calls::TransactionApi { staking::calls::TransactionApi @@ -59401,6 +46434,12 @@ pub mod api { pub fn session(&self) -> session::calls::TransactionApi { session::calls::TransactionApi } + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { + grandpa::calls::TransactionApi + } + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi + } pub fn democracy(&self) -> democracy::calls::TransactionApi { democracy::calls::TransactionApi } @@ -59410,46 +46449,28 @@ pub mod api { pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { technical_committee::calls::TransactionApi } - pub fn elections(&self) -> elections::calls::TransactionApi { - elections::calls::TransactionApi + pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { + phragmen_election::calls::TransactionApi } pub fn technical_membership( &self, ) -> technical_membership::calls::TransactionApi { technical_membership::calls::TransactionApi } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { - grandpa::calls::TransactionApi - } pub fn treasury(&self) -> treasury::calls::TransactionApi { treasury::calls::TransactionApi } - pub fn contracts(&self) -> contracts::calls::TransactionApi { - contracts::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 identity(&self) -> identity::calls::TransactionApi { - identity::calls::TransactionApi - } - pub fn society(&self) -> society::calls::TransactionApi { - society::calls::TransactionApi - } - pub fn recovery(&self) -> recovery::calls::TransactionApi { - recovery::calls::TransactionApi + pub fn claims(&self) -> claims::calls::TransactionApi { + claims::calls::TransactionApi } pub fn vesting(&self) -> vesting::calls::TransactionApi { vesting::calls::TransactionApi } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi + pub fn identity(&self) -> identity::calls::TransactionApi { + identity::calls::TransactionApi } pub fn proxy(&self) -> proxy::calls::TransactionApi { proxy::calls::TransactionApi @@ -59460,73 +46481,70 @@ pub mod api { pub fn bounties(&self) -> bounties::calls::TransactionApi { bounties::calls::TransactionApi } + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi + } pub fn tips(&self) -> tips::calls::TransactionApi { tips::calls::TransactionApi } - pub fn assets(&self) -> assets::calls::TransactionApi { - assets::calls::TransactionApi - } - pub fn lottery(&self) -> lottery::calls::TransactionApi { - lottery::calls::TransactionApi - } - pub fn nis(&self) -> nis::calls::TransactionApi { - nis::calls::TransactionApi + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi } - pub fn uniques(&self) -> uniques::calls::TransactionApi { - uniques::calls::TransactionApi + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi } - pub fn nfts(&self) -> nfts::calls::TransactionApi { - nfts::calls::TransactionApi + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi } - pub fn transaction_storage(&self) -> transaction_storage::calls::TransactionApi { - transaction_storage::calls::TransactionApi + pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { + fast_unstake::calls::TransactionApi } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi + pub fn configuration(&self) -> configuration::calls::TransactionApi { + configuration::calls::TransactionApi } - pub fn state_trie_migration( - &self, - ) -> state_trie_migration::calls::TransactionApi { - state_trie_migration::calls::TransactionApi + pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { + paras_shared::calls::TransactionApi } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { - child_bounties::calls::TransactionApi + pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { + para_inclusion::calls::TransactionApi } - pub fn referenda(&self) -> referenda::calls::TransactionApi { - referenda::calls::TransactionApi + pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { + para_inherent::calls::TransactionApi } - pub fn remark(&self) -> remark::calls::TransactionApi { - remark::calls::TransactionApi + pub fn paras(&self) -> paras::calls::TransactionApi { + paras::calls::TransactionApi } - pub fn root_testing(&self) -> root_testing::calls::TransactionApi { - root_testing::calls::TransactionApi + pub fn initializer(&self) -> initializer::calls::TransactionApi { + initializer::calls::TransactionApi } - pub fn conviction_voting(&self) -> conviction_voting::calls::TransactionApi { - conviction_voting::calls::TransactionApi + pub fn dmp(&self) -> dmp::calls::TransactionApi { + dmp::calls::TransactionApi } - pub fn whitelist(&self) -> whitelist::calls::TransactionApi { - whitelist::calls::TransactionApi + pub fn ump(&self) -> ump::calls::TransactionApi { + ump::calls::TransactionApi } - pub fn alliance_motion(&self) -> alliance_motion::calls::TransactionApi { - alliance_motion::calls::TransactionApi + pub fn hrmp(&self) -> hrmp::calls::TransactionApi { + hrmp::calls::TransactionApi } - pub fn alliance(&self) -> alliance::calls::TransactionApi { - alliance::calls::TransactionApi + pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { + paras_disputes::calls::TransactionApi } - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi + pub fn registrar(&self) -> registrar::calls::TransactionApi { + registrar::calls::TransactionApi } - pub fn ranked_polls(&self) -> ranked_polls::calls::TransactionApi { - ranked_polls::calls::TransactionApi + pub fn slots(&self) -> slots::calls::TransactionApi { + slots::calls::TransactionApi } - pub fn ranked_collective(&self) -> ranked_collective::calls::TransactionApi { - ranked_collective::calls::TransactionApi + pub fn auctions(&self) -> auctions::calls::TransactionApi { + auctions::calls::TransactionApi } - pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { - fast_unstake::calls::TransactionApi + pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { + crowdloan::calls::TransactionApi } - pub fn message_queue(&self) -> message_queue::calls::TransactionApi { - message_queue::calls::TransactionApi + pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { + xcm_pallet::calls::TransactionApi } } #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] @@ -59536,9 +46554,9 @@ pub mod api { let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); if runtime_metadata_hash != [ - 193u8, 113u8, 159u8, 161u8, 239u8, 4u8, 102u8, 7u8, 158u8, 5u8, 51u8, - 187u8, 64u8, 226u8, 128u8, 79u8, 3u8, 98u8, 47u8, 32u8, 176u8, 208u8, - 191u8, 20u8, 152u8, 173u8, 239u8, 103u8, 222u8, 135u8, 161u8, 141u8, + 252u8, 179u8, 170u8, 129u8, 159u8, 95u8, 180u8, 114u8, 218u8, 56u8, 91u8, + 93u8, 175u8, 45u8, 57u8, 223u8, 178u8, 209u8, 250u8, 247u8, 243u8, 73u8, + 182u8, 137u8, 176u8, 129u8, 37u8, 196u8, 133u8, 123u8, 93u8, 186u8, ] { Err(::subxt::error::MetadataError::IncompatibleMetadata) diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 97403c3456..bfc9f526a9 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -220,6 +220,8 @@ async fn tx_call() { .contracts() .contract_info_of(&contract); + let info_addr_bytes = cxt.client().storage().address_bytes(&info_addr).unwrap(); + let contract_info = cxt .client() .storage() @@ -236,7 +238,7 @@ async fn tx_call() { .at(None) .await .unwrap() - .fetch_keys(&info_addr.to_bytes(), 10, None) + .fetch_keys(&info_addr_bytes, 10, None) .await .unwrap() .iter() diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index 684057986c..508da662f2 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -70,11 +70,14 @@ async fn storage_n_mapish_key_is_properly_created() -> Result<(), subxt::Error> use codec::Encode; use node_runtime::runtime_types::sp_core::crypto::KeyTypeId; + let ctx = test_context().await; + let api = ctx.client(); + // This is what the generated code hashes a `session().key_owner(..)` key into: - let actual_key_bytes = node_runtime::storage() + let actual_key = node_runtime::storage() .session() - .key_owner(KeyTypeId([1, 2, 3, 4]), [5u8, 6, 7, 8]) - .to_bytes(); + .key_owner(KeyTypeId([1, 2, 3, 4]), [5u8, 6, 7, 8]); + let actual_key_bytes = api.storage().address_bytes(&actual_key)?; // Let's manually hash to what we assume it should be and compare: let expected_key_bytes = { From 9b8f8460445b779aa4e7dda9746694c080c7a1ee Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 09:27:01 +0000 Subject: [PATCH 23/31] Fix storage address byte retrieval --- examples/examples/storage_iterating.rs | 4 +- subxt/src/storage/storage_address.rs | 249 +------------------- subxt/src/storage/storage_client.rs | 16 +- subxt/src/storage/utils.rs | 8 +- testing/integration-tests/src/client/mod.rs | 2 +- 5 files changed, 23 insertions(+), 256 deletions(-) diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index e3d6a1da56..feec429fc2 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -53,7 +53,7 @@ async fn main() -> Result<(), Box> { .storage() .at(None) .await? - .fetch_keys(&key_addr.to_root_bytes(), 10, None) + .fetch_keys(&key_addr.root_bytes(), 10, None) .await?; println!("Example 2. Obtained keys:"); @@ -79,7 +79,7 @@ async fn main() -> Result<(), Box> { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); // Obtain the root bytes (`twox_128("XcmPallet") ++ twox_128("VersionNotifiers")`). - let mut query_key = key_addr.to_root_bytes(); + let mut query_key = key_addr.root_bytes(); // We know that the first key is a u32 (the `XcmVersion`) and is hashed by twox64_concat. // twox64_concat is just the result of running the twox_64 hasher on some value and concatenating diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 3d66d8ded9..6ecbd76a83 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -128,8 +128,9 @@ where } /// Return bytes representing the root of this storage entry (ie a hash of - /// the pallet and entry name). - pub fn to_root_bytes(&self) -> Vec { + /// the pallet and entry name). Use [`crate::storage::StorageClient::address_bytes()`] + /// to obtain the bytes representing the entire address. + pub fn root_bytes(&self) -> Vec { super::utils::storage_address_root_bytes(self) } } @@ -291,247 +292,3 @@ fn hash_bytes(input: &[u8], hasher: &StorageHasher, bytes: &mut Vec) { } } } - -// /// This represents a statically generated storage lookup address. -// pub struct StaticStorageAddress { -// pallet_name: &'static str, -// entry_name: &'static str, -// // How to access the specific value at that storage address. -// storage_entry_keys: Vec, -// // Hash provided from static code for validation. -// validation_hash: Option<[u8; 32]>, -// _marker: std::marker::PhantomData<(ReturnTy, Fetchable, Defaultable, Iterable)>, -// } - -// /// Storage key for a Map. -// #[derive(Clone)] -// pub struct StorageMapKey { -// value: Vec, -// hasher: StorageHasher, -// } - -// impl StorageMapKey { -// /// Create a new [`StorageMapKey`] by pre-encoding static data and pairing it with a hasher. -// pub fn new( -// value: Encodable, -// hasher: StorageHasher, -// ) -> StorageMapKey { -// Self { -// value: value.encode(), -// hasher, -// } -// } - -// /// Convert this [`StorageMapKey`] into bytes and append them to some existing bytes. -// pub fn to_bytes(&self, bytes: &mut Vec) { -// hash_bytes(&self.value, &self.hasher, bytes) -// } -// } - -// impl -// StaticStorageAddress -// where -// ReturnTy: DecodeWithMetadata, -// { -// /// Create a new [`StaticStorageAddress`] that will be validated -// /// against node metadata using the hash given. -// pub fn new( -// pallet_name: &'static str, -// entry_name: &'static str, -// storage_entry_keys: Vec, -// hash: [u8; 32], -// ) -> Self { -// Self { -// pallet_name, -// entry_name, -// storage_entry_keys, -// validation_hash: Some(hash), -// _marker: std::marker::PhantomData, -// } -// } - -// /// Do not validate this storage entry prior to accessing it. -// pub fn unvalidated(self) -> Self { -// Self { -// validation_hash: None, -// ..self -// } -// } - -// /// Return bytes representing this storage entry. -// pub fn to_bytes(&self) -> Vec { -// let mut bytes = Vec::new(); -// super::utils::write_storage_address_root_bytes(self, &mut bytes); -// for entry in &self.storage_entry_keys { -// entry.to_bytes(&mut bytes); -// } -// bytes -// } - -// /// Return bytes representing the root of this storage entry (ie a hash of -// /// the pallet and entry name). -// pub fn to_root_bytes(&self) -> Vec { -// super::utils::storage_address_root_bytes(self) -// } -// } - -// impl StorageAddress -// for StaticStorageAddress -// where -// ReturnTy: DecodeWithMetadata, -// { -// type Target = ReturnTy; -// type IsDefaultable = Defaultable; -// type IsIterable = Iterable; -// type IsFetchable = Fetchable; - -// fn pallet_name(&self) -> &str { -// self.pallet_name -// } - -// fn entry_name(&self) -> &str { -// self.entry_name -// } - -// fn append_entry_bytes( -// &self, -// _metadata: &Metadata, -// bytes: &mut Vec, -// ) -> Result<(), Error> { -// for entry in &self.storage_entry_keys { -// entry.to_bytes(bytes); -// } -// Ok(()) -// } - -// fn validation_hash(&self) -> Option<[u8; 32]> { -// self.validation_hash -// } -// } - -// /// This represents a dynamically generated storage address. -// pub struct DynamicStorageAddress<'a, Encodable> { -// pallet_name: Cow<'a, str>, -// entry_name: Cow<'a, str>, -// storage_entry_keys: Vec, -// } - -// /// Construct a new dynamic storage lookup to the root of some entry. -// pub fn dynamic_root<'a>( -// pallet_name: impl Into>, -// entry_name: impl Into>, -// ) -> DynamicStorageAddress<'a, Value> { -// DynamicStorageAddress { -// pallet_name: pallet_name.into(), -// entry_name: entry_name.into(), -// storage_entry_keys: vec![], -// } -// } - -// /// Construct a new dynamic storage lookup. -// pub fn dynamic<'a, Encodable: EncodeWithMetadata>( -// pallet_name: impl Into>, -// entry_name: impl Into>, -// storage_entry_keys: Vec, -// ) -> DynamicStorageAddress<'a, Encodable> { -// DynamicStorageAddress { -// pallet_name: pallet_name.into(), -// entry_name: entry_name.into(), -// storage_entry_keys, -// } -// } - -// impl<'a, Encodable> StorageAddress for DynamicStorageAddress<'a, Encodable> -// where -// Encodable: EncodeWithMetadata, -// { -// type Target = DecodedValueThunk; - -// // For dynamic types, we have no static guarantees about any of -// // this stuff, so we just allow it and let it fail at runtime: -// type IsFetchable = Yes; -// type IsDefaultable = Yes; -// type IsIterable = Yes; - -// fn pallet_name(&self) -> &str { -// &self.pallet_name -// } - -// fn entry_name(&self) -> &str { -// &self.entry_name -// } - -// fn append_entry_bytes( -// &self, -// metadata: &Metadata, -// bytes: &mut Vec, -// ) -> Result<(), Error> { -// let pallet = metadata.pallet(&self.pallet_name)?; -// let storage = pallet.storage(&self.entry_name)?; - -// match &storage.ty { -// StorageEntryType::Plain(_) => { -// if !self.storage_entry_keys.is_empty() { -// Err(StorageAddressError::WrongNumberOfKeys { -// expected: 0, -// actual: self.storage_entry_keys.len(), -// } -// .into()) -// } else { -// Ok(()) -// } -// } -// StorageEntryType::Map { hashers, key, .. } => { -// let ty = metadata -// .resolve_type(key.id()) -// .ok_or_else(|| StorageAddressError::TypeNotFound(key.id()))?; - -// // If the key is a tuple, we encode each value to the corresponding tuple type. -// // If the key is not a tuple, encode a single value to the key type. -// let type_ids = match ty.type_def() { -// TypeDef::Tuple(tuple) => { -// tuple.fields().iter().map(|f| f.id()).collect() -// } -// _other => { -// vec![key.id()] -// } -// }; - -// if type_ids.len() != self.storage_entry_keys.len() { -// return Err(StorageAddressError::WrongNumberOfKeys { -// expected: type_ids.len(), -// actual: self.storage_entry_keys.len(), -// } -// .into()) -// } - -// if hashers.len() == 1 { -// // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. -// let mut input = Vec::new(); -// for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { -// key.encode_with_metadata(type_id, metadata, &mut input)?; -// } -// hash_bytes(&input, &hashers[0], bytes); -// Ok(()) -// } else if hashers.len() == type_ids.len() { -// // A hasher per field; encode and hash each field independently. -// for ((key, type_id), hasher) in -// self.storage_entry_keys.iter().zip(type_ids).zip(hashers) -// { -// let mut input = Vec::new(); -// key.encode_with_metadata(type_id, metadata, &mut input)?; -// hash_bytes(&input, hasher, bytes); -// } -// Ok(()) -// } else { -// // Mismatch; wrong number of hashers/fields. -// Err(StorageAddressError::WrongNumberOfHashers { -// hashers: hashers.len(), -// fields: type_ids.len(), -// } -// .into()) -// } -// } -// } -// } -// } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index c4de4f2583..c7c5d0c1d9 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -7,6 +7,7 @@ use super::{ validate_storage_address, Storage, }, + utils, StorageAddress, }; @@ -59,14 +60,21 @@ where } /// Convert some storage address into the raw bytes that would be submitted to the node in order - /// to retrieve the associated entry. + /// to retrieve the entries at the root of the associated address. + pub fn address_root_bytes( + &self, + address: &Address, + ) -> Vec { + utils::storage_address_root_bytes(address) + } + + /// Convert some storage address into the raw bytes that would be submitted to the node in order + /// to retrieve an entry. pub fn address_bytes( &self, address: &Address, ) -> Result, Error> { - let mut bytes = Vec::new(); - address.append_entry_bytes(&self.client.metadata(), &mut bytes)?; - Ok(bytes) + utils::storage_address_bytes(address, &self.client.metadata()) } } diff --git a/subxt/src/storage/utils.rs b/subxt/src/storage/utils.rs index 2e3c678a50..a776aa65f4 100644 --- a/subxt/src/storage/utils.rs +++ b/subxt/src/storage/utils.rs @@ -14,7 +14,7 @@ use crate::{ /// Return the root of a given [`StorageAddress`]: hash the pallet name and entry name /// and append those bytes to the output. -pub fn write_storage_address_root_bytes( +pub(crate) fn write_storage_address_root_bytes( addr: &Address, out: &mut Vec, ) { @@ -24,7 +24,7 @@ pub fn write_storage_address_root_bytes( /// Outputs the [`storage_address_root_bytes`] as well as any additional bytes that represent /// a lookup in a storage map at that location. -pub fn storage_address_bytes( +pub(crate) fn storage_address_bytes( addr: &Address, metadata: &Metadata, ) -> Result, Error> { @@ -35,7 +35,9 @@ pub fn storage_address_bytes( } /// Outputs a vector containing the bytes written by [`write_storage_address_root_bytes`]. -pub fn storage_address_root_bytes(addr: &Address) -> Vec { +pub(crate) fn storage_address_root_bytes( + addr: &Address, +) -> Vec { let mut bytes = Vec::new(); write_storage_address_root_bytes(addr, &mut bytes); bytes diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index bae2c1e90a..9853139dad 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -130,7 +130,7 @@ async fn fetch_keys() { .at(None) .await .unwrap() - .fetch_keys(&addr.to_root_bytes(), 4, None) + .fetch_keys(&addr.root_bytes(), 4, None) .await .unwrap(); assert_eq!(keys.len(), 4) From 6c254749a96010e4640b8736947c03c98412e248 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 09:50:12 +0000 Subject: [PATCH 24/31] StaticConstantAddress and DynamicConstantAddress => Address --- codegen/src/api/constants.rs | 4 +- subxt/src/constants/constant_address.rs | 69 +- subxt/src/constants/mod.rs | 4 +- subxt/src/tx/mod.rs | 1 + subxt/src/tx/tx_payload.rs | 5 +- testing/integration-tests/src/codegen/mod.rs | 4 +- .../integration-tests/src/codegen/polkadot.rs | 591 ++++++++---------- 7 files changed, 298 insertions(+), 380 deletions(-) diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index ea08fe2ba9..1704e2dbf4 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -73,8 +73,8 @@ pub fn generate_constants( Ok(quote! { #docs - pub fn #fn_name(&self) -> #crate_path::constants::StaticConstantAddress<#return_ty> { - #crate_path::constants::StaticConstantAddress::new( + pub fn #fn_name(&self) -> #crate_path::constants::Address<#return_ty> { + #crate_path::constants::Address::new_static( #pallet_name, #constant_name, [#(#constant_hash,)*] diff --git a/subxt/src/constants/constant_address.rs b/subxt/src/constants/constant_address.rs index cb3cdbdfa7..18318ba369 100644 --- a/subxt/src/constants/constant_address.rs +++ b/subxt/src/constants/constant_address.rs @@ -28,25 +28,39 @@ pub trait ConstantAddress { } } -/// This represents a statically generated constant lookup address. -pub struct StaticConstantAddress { - pallet_name: &'static str, - constant_name: &'static str, +/// This represents the address of a constant. +pub struct Address { + pallet_name: Cow<'static, str>, + constant_name: Cow<'static, str>, constant_hash: Option<[u8; 32]>, _marker: std::marker::PhantomData, } -impl StaticConstantAddress { - /// Create a new [`StaticConstantAddress`] that will be validated +/// The type of address typically used to return dynamic constant values. +pub type DynamicAddress = Address; + +impl Address { + /// Create a new [`Address`] to use to look up a constant. + pub fn new(pallet_name: impl Into, constant_name: impl Into) -> Self { + Self { + pallet_name: Cow::Owned(pallet_name.into()), + constant_name: Cow::Owned(constant_name.into()), + constant_hash: None, + _marker: std::marker::PhantomData, + } + } + + /// Create a new [`Address`] that will be validated /// against node metadata using the hash given. - pub fn new( + #[doc(hidden)] + pub fn new_static( pallet_name: &'static str, constant_name: &'static str, hash: [u8; 32], ) -> Self { Self { - pallet_name, - constant_name, + pallet_name: Cow::Borrowed(pallet_name), + constant_name: Cow::Borrowed(constant_name), constant_hash: Some(hash), _marker: std::marker::PhantomData, } @@ -63,15 +77,15 @@ impl StaticConstantAddress { } } -impl ConstantAddress for StaticConstantAddress { +impl ConstantAddress for Address { type Target = ReturnTy; fn pallet_name(&self) -> &str { - self.pallet_name + &self.pallet_name } fn constant_name(&self) -> &str { - self.constant_name + &self.constant_name } fn validation_hash(&self) -> Option<[u8; 32]> { @@ -79,31 +93,10 @@ impl ConstantAddress for StaticConstantAddress { - pallet_name: Cow<'a, str>, - constant_name: Cow<'a, str>, -} - /// Construct a new dynamic constant lookup. -pub fn dynamic<'a>( - pallet_name: impl Into>, - constant_name: impl Into>, -) -> DynamicConstantAddress<'a> { - DynamicConstantAddress { - pallet_name: pallet_name.into(), - constant_name: constant_name.into(), - } -} - -impl<'a> ConstantAddress for DynamicConstantAddress<'a> { - type Target = DecodedValueThunk; - - fn pallet_name(&self) -> &str { - &self.pallet_name - } - - fn constant_name(&self) -> &str { - &self.constant_name - } +pub fn dynamic( + pallet_name: impl Into, + constant_name: impl Into, +) -> DynamicAddress { + DynamicAddress::new(pallet_name, constant_name) } diff --git a/subxt/src/constants/mod.rs b/subxt/src/constants/mod.rs index e4b3ec98b3..cbfd3c2c8e 100644 --- a/subxt/src/constants/mod.rs +++ b/subxt/src/constants/mod.rs @@ -9,8 +9,8 @@ mod constants_client; pub use constant_address::{ dynamic, + Address, ConstantAddress, - DynamicConstantAddress, - StaticConstantAddress, + DynamicAddress, }; pub use constants_client::ConstantsClient; diff --git a/subxt/src/tx/mod.rs b/subxt/src/tx/mod.rs index a5b8bbb9ea..6ded187f09 100644 --- a/subxt/src/tx/mod.rs +++ b/subxt/src/tx/mod.rs @@ -28,6 +28,7 @@ pub use self::{ tx_payload::{ dynamic, BoxedPayload, + DynamicPayload, Payload, TxPayload, }, diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index d9c913e629..f0e46a358d 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -71,6 +71,9 @@ pub struct Payload { // Dev Note: Arc used to enable easy cloning (given that we can't have dyn Clone). pub type BoxedPayload = Payload>; +/// The type of a payload typically used for dynamic transaction payloads. +pub type DynamicPayload = Payload>; + impl Payload { /// Create a new [`Payload`]. pub fn new( @@ -184,6 +187,6 @@ pub fn dynamic( pallet_name: impl Into, call_name: impl Into, call_data: impl Into>, -) -> Payload> { +) -> DynamicPayload { Payload::new(pallet_name, call_name, call_data.into()) } diff --git a/testing/integration-tests/src/codegen/mod.rs b/testing/integration-tests/src/codegen/mod.rs index 874c7745b4..dd101a13d4 100644 --- a/testing/integration-tests/src/codegen/mod.rs +++ b/testing/integration-tests/src/codegen/mod.rs @@ -5,10 +5,10 @@ /// Checks that code generated by `subxt-cli codegen` compiles. Allows inspection of compiler errors /// directly, more accurately than via the macro and `cargo expand`. /// -/// Generate by: +/// Generate by running this at the root of the repository: /// /// ``` -/// cargo run --bin subxt -- codegen --file artifacts/polkadot_metadata.scale | rustfmt > testing/integration-tests/src/codegen/polkadot.rs` +/// cargo run --bin subxt -- codegen --file artifacts/polkadot_metadata.scale | rustfmt > testing/integration-tests/src/codegen/polkadot.rs /// ``` #[rustfmt::skip] #[allow(clippy::all)] diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 3cf60fc06e..4c07b71be0 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -1385,10 +1385,10 @@ pub mod api { #[doc = " Block & extrinsics weights: base values and limits."] pub fn block_weights( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::frame_system::limits::BlockWeights, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "System", "BlockWeights", [ @@ -1402,10 +1402,10 @@ pub mod api { #[doc = " The maximum length of a block (in bytes)."] pub fn block_length( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::frame_system::limits::BlockLength, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "System", "BlockLength", [ @@ -1419,9 +1419,8 @@ pub mod api { #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] pub fn block_hash_count( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "System", "BlockHashCount", [ @@ -1435,10 +1434,9 @@ pub mod api { #[doc = " The weight of runtime database operations the runtime can invoke."] pub fn db_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_weights::RuntimeDbWeight, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( "System", "DbWeight", [ @@ -1452,10 +1450,9 @@ pub mod api { #[doc = " Get the chain's current version."] pub fn version( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::sp_version::RuntimeVersion, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( "System", "Version", [ @@ -1473,9 +1470,8 @@ pub mod api { #[doc = " an identifier of the chain."] pub fn ss58_prefix( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u16> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( "System", "SS58Prefix", [ @@ -2032,10 +2028,10 @@ pub mod api { #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] pub fn maximum_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_weights::weight_v2::Weight, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Scheduler", "MaximumWeight", [ @@ -2049,9 +2045,8 @@ pub mod api { #[doc = " The maximum number of scheduled calls in the queue for a single block."] pub fn max_scheduled_per_block( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Scheduler", "MaxScheduledPerBlock", [ @@ -2952,9 +2947,8 @@ pub mod api { #[doc = " the chain has started. Attempting to do so will brick block production."] pub fn epoch_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "Babe", "EpochDuration", [ @@ -2972,9 +2966,8 @@ pub mod api { #[doc = " the probability of a slot being empty)."] pub fn expected_block_time( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "Babe", "ExpectedBlockTime", [ @@ -2988,9 +2981,8 @@ pub mod api { #[doc = " Max number of authorities allowed"] pub fn max_authorities( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Babe", "MaxAuthorities", [ @@ -3121,9 +3113,8 @@ pub mod api { #[doc = " double this period on default settings."] pub fn minimum_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "Timestamp", "MinimumPeriod", [ @@ -3520,9 +3511,9 @@ pub mod api { #[doc = " The deposit needed for reserving an index."] pub fn deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Indices", "Deposit", [ @@ -4268,9 +4259,9 @@ pub mod api { #[doc = " The minimum amount required to keep an account open."] pub fn existential_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Balances", "ExistentialDeposit", [ @@ -4285,9 +4276,8 @@ pub mod api { #[doc = " Not strictly enforced, but used for weight estimation."] pub fn max_locks( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Balances", "MaxLocks", [ @@ -4301,9 +4291,8 @@ pub mod api { #[doc = " The maximum number of named reserves that can exist on an account."] pub fn max_reserves( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Balances", "MaxReserves", [ @@ -4420,9 +4409,8 @@ pub mod api { #[doc = " transactions."] pub fn operational_fee_multiplier( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u8> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( "TransactionPayment", "OperationalFeeMultiplier", [ @@ -4574,9 +4562,8 @@ pub mod api { #[doc = " `UncleGenerations + 1` before `now`."] pub fn uncle_generations( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Authorship", "UncleGenerations", [ @@ -7358,9 +7345,8 @@ pub mod api { #[doc = " Maximum number of nominations per nominator."] pub fn max_nominations( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "MaxNominations", [ @@ -7393,9 +7379,8 @@ pub mod api { #[doc = " The test `reducing_history_depth_abrupt` shows this effect."] pub fn history_depth( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "HistoryDepth", [ @@ -7409,9 +7394,8 @@ pub mod api { #[doc = " Number of sessions per era."] pub fn sessions_per_era( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "SessionsPerEra", [ @@ -7425,9 +7409,8 @@ pub mod api { #[doc = " Number of eras that staked funds must remain bonded for."] pub fn bonding_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "BondingDuration", [ @@ -7444,9 +7427,8 @@ pub mod api { #[doc = " should be applied immediately, without opportunity for intervention."] pub fn slash_defer_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "SlashDeferDuration", [ @@ -7463,9 +7445,8 @@ pub mod api { #[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<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "MaxNominatorRewardedPerValidator", [ @@ -7488,9 +7469,8 @@ pub mod api { #[doc = " this effect."] pub fn max_unlocking_chunks( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Staking", "MaxUnlockingChunks", [ @@ -8443,9 +8423,8 @@ pub mod api { #[doc = " Max Authorities in use"] pub fn max_authorities( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Grandpa", "MaxAuthorities", [ @@ -8764,9 +8743,8 @@ pub mod api { #[doc = " multiple pallets send unsigned transactions."] pub fn unsigned_priority( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "ImOnline", "UnsignedPriority", [ @@ -10257,9 +10235,8 @@ pub mod api { #[doc = " where they are on the losing side of a vote."] pub fn enactment_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "EnactmentPeriod", [ @@ -10273,9 +10250,8 @@ pub mod api { #[doc = " How often (in blocks) new public referenda are launched."] pub fn launch_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "LaunchPeriod", [ @@ -10289,9 +10265,8 @@ pub mod api { #[doc = " How often (in blocks) to check for new votes."] pub fn voting_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "VotingPeriod", [ @@ -10308,9 +10283,8 @@ pub mod api { #[doc = " those successful voters are locked into the consequences that their votes entail."] pub fn vote_locking_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "VoteLockingPeriod", [ @@ -10324,9 +10298,9 @@ pub mod api { #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] pub fn minimum_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Democracy", "MinimumDeposit", [ @@ -10342,9 +10316,9 @@ pub mod api { #[doc = " as an upgrade having happened recently."] pub fn instant_allowed( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::bool> + ) -> ::subxt::constants::Address<::core::primitive::bool> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Democracy", "InstantAllowed", [ @@ -10358,9 +10332,8 @@ pub mod api { #[doc = " Minimum voting period allowed for a fast-track referendum."] pub fn fast_track_voting_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "FastTrackVotingPeriod", [ @@ -10374,9 +10347,8 @@ pub mod api { #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] pub fn cooloff_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "CooloffPeriod", [ @@ -10393,9 +10365,8 @@ pub mod api { #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] pub fn max_votes( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "MaxVotes", [ @@ -10409,9 +10380,8 @@ pub mod api { #[doc = " The maximum number of public proposals that can exist at any time."] pub fn max_proposals( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "MaxProposals", [ @@ -10425,9 +10395,8 @@ pub mod api { #[doc = " The maximum number of deposits a public proposal may have at any time."] pub fn max_deposits( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "MaxDeposits", [ @@ -10441,9 +10410,8 @@ pub mod api { #[doc = " The maximum number of items which can be blacklisted."] pub fn max_blacklisted( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Democracy", "MaxBlacklisted", [ @@ -12591,10 +12559,9 @@ pub mod api { #[doc = " Identifier for the elections-phragmen pallet's lock"] pub fn pallet_id( &self, - ) -> ::subxt::constants::StaticConstantAddress< - [::core::primitive::u8; 8usize], - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<[::core::primitive::u8; 8usize]> + { + ::subxt::constants::Address::new_static( "PhragmenElection", "PalletId", [ @@ -12608,9 +12575,9 @@ pub mod api { #[doc = " How much should be locked up in order to submit one's candidacy."] pub fn candidacy_bond( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "PhragmenElection", "CandidacyBond", [ @@ -12627,9 +12594,9 @@ pub mod api { #[doc = " creating a gigantic number of votes."] pub fn voting_bond_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "PhragmenElection", "VotingBondBase", [ @@ -12643,9 +12610,9 @@ pub mod api { #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] pub fn voting_bond_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "PhragmenElection", "VotingBondFactor", [ @@ -12659,9 +12626,8 @@ pub mod api { #[doc = " Number of members to elect."] pub fn desired_members( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "PhragmenElection", "DesiredMembers", [ @@ -12675,9 +12641,8 @@ pub mod api { #[doc = " Number of runners_up to keep."] pub fn desired_runners_up( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "PhragmenElection", "DesiredRunnersUp", [ @@ -12693,9 +12658,8 @@ pub mod api { #[doc = " be in passive mode."] pub fn term_duration( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "PhragmenElection", "TermDuration", [ @@ -12713,9 +12677,8 @@ pub mod api { #[doc = " candidates are accepted in the election."] pub fn max_candidates( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "PhragmenElection", "MaxCandidates", [ @@ -12732,9 +12695,8 @@ pub mod api { #[doc = " When the limit is reached the new voters are ignored."] pub fn max_voters( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "PhragmenElection", "MaxVoters", [ @@ -13614,10 +13576,10 @@ pub mod api { #[doc = " An accepted proposal gets these back. A rejected proposal does not."] pub fn proposal_bond( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Permill, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Treasury", "ProposalBond", [ @@ -13631,9 +13593,9 @@ pub mod api { #[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<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Treasury", "ProposalBondMinimum", [ @@ -13647,10 +13609,10 @@ pub mod api { #[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::constants::Address< ::core::option::Option<::core::primitive::u128>, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Treasury", "ProposalBondMaximum", [ @@ -13664,9 +13626,8 @@ pub mod api { #[doc = " Period between successive spends."] pub fn spend_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Treasury", "SpendPeriod", [ @@ -13680,10 +13641,10 @@ pub mod api { #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] pub fn burn( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Permill, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Treasury", "Burn", [ @@ -13697,10 +13658,9 @@ pub mod api { #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] pub fn pallet_id( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( "Treasury", "PalletId", [ @@ -13716,9 +13676,8 @@ pub mod api { #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] pub fn max_approvals( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Treasury", "MaxApprovals", [ @@ -14276,10 +14235,9 @@ pub mod api { impl ConstantsApi { pub fn prefix( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::std::vec::Vec<::core::primitive::u8>, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u8>> + { + ::subxt::constants::Address::new_static( "Claims", "Prefix", [ @@ -14686,9 +14644,9 @@ pub mod api { #[doc = " The minimum amount transferred to call `vested_transfer`."] pub fn min_vested_transfer( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Vesting", "MinVestedTransfer", [ @@ -14701,9 +14659,8 @@ pub mod api { } pub fn max_vesting_schedules( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Vesting", "MaxVestingSchedules", [ @@ -15061,9 +15018,8 @@ pub mod api { #[doc = " The limit on the number of batched calls."] pub fn batched_calls_limit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Utility", "batched_calls_limit", [ @@ -16177,9 +16133,9 @@ pub mod api { #[doc = " The amount held on deposit for a registered identity"] pub fn basic_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Identity", "BasicDeposit", [ @@ -16193,9 +16149,9 @@ pub mod api { #[doc = " The amount held on deposit per additional field for a registered identity."] pub fn field_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Identity", "FieldDeposit", [ @@ -16211,9 +16167,9 @@ pub mod api { #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] pub fn sub_account_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Identity", "SubAccountDeposit", [ @@ -16227,9 +16183,8 @@ pub mod api { #[doc = " The maximum number of sub-accounts allowed per identified account."] pub fn max_sub_accounts( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Identity", "MaxSubAccounts", [ @@ -16244,9 +16199,8 @@ pub mod api { #[doc = " required to access an identity, but can be pretty high."] pub fn max_additional_fields( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Identity", "MaxAdditionalFields", [ @@ -16261,9 +16215,8 @@ pub mod api { #[doc = " of, e.g., updating judgements."] pub fn max_registrars( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Identity", "MaxRegistrars", [ @@ -17022,9 +16975,9 @@ pub mod api { #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] pub fn proxy_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Proxy", "ProxyDepositBase", [ @@ -17042,9 +16995,9 @@ pub mod api { #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] pub fn proxy_deposit_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Proxy", "ProxyDepositFactor", [ @@ -17058,9 +17011,8 @@ pub mod api { #[doc = " The maximum amount of proxies allowed for a single account."] pub fn max_proxies( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Proxy", "MaxProxies", [ @@ -17074,9 +17026,8 @@ pub mod api { #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] pub fn max_pending( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Proxy", "MaxPending", [ @@ -17093,9 +17044,9 @@ pub mod api { #[doc = " bytes)."] pub fn announcement_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Proxy", "AnnouncementDepositBase", [ @@ -17112,9 +17063,9 @@ pub mod api { #[doc = " into a pre-existing storage value."] pub fn announcement_deposit_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Proxy", "AnnouncementDepositFactor", [ @@ -17597,9 +17548,9 @@ pub mod api { #[doc = " `32 + sizeof(AccountId)` bytes."] pub fn deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Multisig", "DepositBase", [ @@ -17615,9 +17566,9 @@ pub mod api { #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] pub fn deposit_factor( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Multisig", "DepositFactor", [ @@ -17631,9 +17582,8 @@ pub mod api { #[doc = " The maximum amount of signatories allowed in the multisig."] pub fn max_signatories( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Multisig", "MaxSignatories", [ @@ -18336,9 +18286,9 @@ pub mod api { #[doc = " The amount held on deposit for placing a bounty proposal."] pub fn bounty_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "BountyDepositBase", [ @@ -18352,9 +18302,8 @@ pub mod api { #[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<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Bounties", "BountyDepositPayoutDelay", [ @@ -18368,9 +18317,8 @@ pub mod api { #[doc = " Bounty duration in blocks."] pub fn bounty_update_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Bounties", "BountyUpdatePeriod", [ @@ -18387,10 +18335,10 @@ pub mod api { #[doc = " `CuratorDepositMin`."] pub fn curator_deposit_multiplier( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Permill, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMultiplier", [ @@ -18404,10 +18352,10 @@ pub mod api { #[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::constants::Address< ::core::option::Option<::core::primitive::u128>, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMax", [ @@ -18421,10 +18369,10 @@ pub mod api { #[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::constants::Address< ::core::option::Option<::core::primitive::u128>, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "CuratorDepositMin", [ @@ -18438,9 +18386,9 @@ pub mod api { #[doc = " Minimum value for a bounty."] pub fn bounty_value_minimum( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "BountyValueMinimum", [ @@ -18454,9 +18402,9 @@ pub mod api { #[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::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Bounties", "DataDepositPerByte", [ @@ -18472,9 +18420,8 @@ pub mod api { #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Bounties", "MaximumReasonLength", [ @@ -19231,9 +19178,8 @@ pub mod api { #[doc = " Maximum number of child bounties that can be added to a parent bounty."] pub fn max_active_child_bounty_count( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ChildBounties", "MaxActiveChildBountyCount", [ @@ -19247,9 +19193,9 @@ pub mod api { #[doc = " Minimum value for a child-bounty."] pub fn child_bounty_value_minimum( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ChildBounties", "ChildBountyValueMinimum", [ @@ -19788,9 +19734,8 @@ pub mod api { #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] pub fn maximum_reason_length( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Tips", "MaximumReasonLength", [ @@ -19804,9 +19749,9 @@ pub mod api { #[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::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Tips", "DataDepositPerByte", [ @@ -19820,9 +19765,8 @@ pub mod api { #[doc = " The period for which a tip remains open after is has achieved threshold tippers."] pub fn tip_countdown( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Tips", "TipCountdown", [ @@ -19836,10 +19780,10 @@ pub mod api { #[doc = " The percent of the final tip which goes to the original reporter of the tip."] pub fn tip_finders_fee( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Percent, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Tips", "TipFindersFee", [ @@ -19853,9 +19797,9 @@ pub mod api { #[doc = " The amount held on deposit for placing a tip report."] pub fn tip_report_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Tips", "TipReportDepositBase", [ @@ -20501,9 +20445,8 @@ pub mod api { #[doc = " Duration of the unsigned phase."] pub fn unsigned_phase( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "UnsignedPhase", [ @@ -20517,9 +20460,8 @@ pub mod api { #[doc = " Duration of the signed phase."] pub fn signed_phase( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedPhase", [ @@ -20534,10 +20476,10 @@ pub mod api { #[doc = " \"better\" in the Signed phase."] pub fn better_signed_threshold( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Perbill, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "BetterSignedThreshold", [ @@ -20552,10 +20494,10 @@ pub mod api { #[doc = " \"better\" in the Unsigned phase."] pub fn better_unsigned_threshold( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_arithmetic::per_things::Perbill, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "BetterUnsignedThreshold", [ @@ -20572,9 +20514,8 @@ pub mod api { #[doc = " to submit the worker's solution."] pub fn offchain_repeat( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "OffchainRepeat", [ @@ -20588,9 +20529,8 @@ pub mod api { #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] pub fn miner_tx_priority( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MinerTxPriority", [ @@ -20610,9 +20550,8 @@ pub mod api { #[doc = " attempts to submit new solutions may cause a runtime panic."] pub fn signed_max_submissions( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedMaxSubmissions", [ @@ -20630,10 +20569,10 @@ pub mod api { #[doc = " this value."] pub fn signed_max_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_weights::weight_v2::Weight, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedMaxWeight", [ @@ -20647,9 +20586,8 @@ pub mod api { #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] pub fn signed_max_refunds( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedMaxRefunds", [ @@ -20663,9 +20601,9 @@ pub mod api { #[doc = " Base reward for a signed solution"] pub fn signed_reward_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedRewardBase", [ @@ -20679,9 +20617,9 @@ pub mod api { #[doc = " Base deposit for a signed solution."] pub fn signed_deposit_base( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedDepositBase", [ @@ -20695,9 +20633,9 @@ pub mod api { #[doc = " Per-byte deposit for a signed solution."] pub fn signed_deposit_byte( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedDepositByte", [ @@ -20711,9 +20649,9 @@ pub mod api { #[doc = " Per-weight deposit for a signed solution."] pub fn signed_deposit_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "SignedDepositWeight", [ @@ -20729,9 +20667,8 @@ pub mod api { #[doc = " take place over multiple blocks."] pub fn max_electing_voters( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MaxElectingVoters", [ @@ -20745,9 +20682,8 @@ pub mod api { #[doc = " The maximum number of electable targets to put in the snapshot."] pub fn max_electable_targets( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u16> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u16> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MaxElectableTargets", [ @@ -20764,9 +20700,8 @@ pub mod api { #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] pub fn max_winners( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MaxWinners", [ @@ -20779,9 +20714,8 @@ pub mod api { } pub fn miner_max_length( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MinerMaxLength", [ @@ -20794,10 +20728,10 @@ pub mod api { } pub fn miner_max_weight( &self, - ) -> ::subxt::constants::StaticConstantAddress< + ) -> ::subxt::constants::Address< runtime_types::sp_weights::weight_v2::Weight, > { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MinerMaxWeight", [ @@ -20810,9 +20744,8 @@ pub mod api { } pub fn miner_max_votes_per_voter( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "ElectionProviderMultiPhase", "MinerMaxVotesPerVoter", [ @@ -21141,10 +21074,9 @@ pub mod api { #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] pub fn bag_thresholds( &self, - ) -> ::subxt::constants::StaticConstantAddress< - ::std::vec::Vec<::core::primitive::u64>, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::std::vec::Vec<::core::primitive::u64>> + { + ::subxt::constants::Address::new_static( "VoterList", "BagThresholds", [ @@ -22653,10 +22585,9 @@ pub mod api { #[doc = " The nomination pool's pallet id."] pub fn pallet_id( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( "NominationPools", "PalletId", [ @@ -22681,9 +22612,8 @@ pub mod api { #[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<::core::primitive::u8> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u8> { + ::subxt::constants::Address::new_static( "NominationPools", "MaxPointsToBalance", [ @@ -26369,9 +26299,8 @@ pub mod api { impl ConstantsApi { pub fn unsigned_priority( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u64> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u64> { + ::subxt::constants::Address::new_static( "Paras", "UnsignedPriority", [ @@ -29173,9 +29102,9 @@ pub mod api { #[doc = " This should include the cost for storing the genesis head and validation code."] pub fn para_deposit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Registrar", "ParaDeposit", [ @@ -29189,9 +29118,9 @@ pub mod api { #[doc = " The deposit to be paid per byte stored on chain."] pub fn data_deposit_per_byte( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Registrar", "DataDepositPerByte", [ @@ -29478,9 +29407,8 @@ pub mod api { #[doc = " The number of blocks over which a single period lasts."] pub fn lease_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Slots", "LeasePeriod", [ @@ -29494,9 +29422,8 @@ pub mod api { #[doc = " The number of blocks to offset each lease period by."] pub fn lease_offset( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Slots", "LeaseOffset", [ @@ -29964,9 +29891,8 @@ pub mod api { #[doc = " The number of blocks over which an auction may be retroactively ended."] pub fn ending_period( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Auctions", "EndingPeriod", [ @@ -29982,9 +29908,8 @@ pub mod api { #[doc = " `EndingPeriod` / `SampleLength` = Total # of Samples"] pub fn sample_length( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Auctions", "SampleLength", [ @@ -29997,9 +29922,8 @@ pub mod api { } pub fn slot_range_count( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Auctions", "SlotRangeCount", [ @@ -30012,9 +29936,8 @@ pub mod api { } pub fn lease_periods_per_slot( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Auctions", "LeasePeriodsPerSlot", [ @@ -30731,10 +30654,9 @@ pub mod api { #[doc = " `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b\"py/cfund\")`"] pub fn pallet_id( &self, - ) -> ::subxt::constants::StaticConstantAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address + { + ::subxt::constants::Address::new_static( "Crowdloan", "PalletId", [ @@ -30749,9 +30671,9 @@ pub mod api { #[doc = " least `ExistentialDeposit`."] pub fn min_contribution( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u128> + ) -> ::subxt::constants::Address<::core::primitive::u128> { - ::subxt::constants::StaticConstantAddress::new( + ::subxt::constants::Address::new_static( "Crowdloan", "MinContribution", [ @@ -30765,9 +30687,8 @@ pub mod api { #[doc = " Max number of storage keys to remove per extrinsic call."] pub fn remove_keys_limit( &self, - ) -> ::subxt::constants::StaticConstantAddress<::core::primitive::u32> - { - ::subxt::constants::StaticConstantAddress::new( + ) -> ::subxt::constants::Address<::core::primitive::u32> { + ::subxt::constants::Address::new_static( "Crowdloan", "RemoveKeysLimit", [ From 1b1ab02f1b3cb14243ff8835a87e75866c44eae1 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 11:05:26 +0000 Subject: [PATCH 25/31] Simplify storage codegen to fix test --- Cargo.lock | 1 + codegen/src/api/storage.rs | 41 ++++++---------------------- subxt/Cargo.toml | 1 + subxt/src/storage/storage_address.rs | 18 ++++++------ subxt/src/tx/tx_payload.rs | 4 +-- 5 files changed, 21 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 638f07b87f..fa31ccbd91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3389,6 +3389,7 @@ dependencies = [ "bitvec", "blake2", "derivative", + "either", "frame-metadata", "futures", "getrandom 0.2.8", diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 968c993f15..987593bb45 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -83,13 +83,9 @@ fn generate_storage_entry_fns( crate_path: &CratePath, should_gen_docs: bool, ) -> Result { - let (fields, key_impl) = match storage_entry.ty { + let (fields, key_impl) = match &storage_entry.ty { StorageEntryType::Plain(_) => (vec![], quote!(vec![])), - StorageEntryType::Map { - ref key, - ref hashers, - .. - } => { + StorageEntryType::Map { key, .. } => { let key_ty = type_gen.resolve_type(key.id()); match key_ty.type_def() { TypeDef::Tuple(tuple) => { @@ -104,32 +100,13 @@ fn generate_storage_entry_fns( }) .collect::>(); - let key_impl = if hashers.len() == fields.len() { - // If the number of hashers matches the number of fields, we're dealing with - // something shaped like a StorageNMap, and each field should be hashed separately - // according to the corresponding hasher. - let keys = fields - .iter() - .map(|(field_name, _)| { - quote!( #crate_path::storage::address::StaticStorageMapKey::new(#field_name.borrow()) ) - }); - quote! { - vec![ #( #keys ),* ] - } - } else if hashers.len() == 1 { - // If there is one hasher, then however many fields we have, we want to hash a - // tuple of them using the one hasher we're told about. This corresponds to a - // StorageMap. - let items = - fields.iter().map(|(field_name, _)| quote!( #field_name )); - quote! { - vec![ #crate_path::storage::address::StaticStorageMapKey::new(&(#( #items.borrow() ),*)) ] - } - } else { - return Err(CodegenError::MismatchHashers( - hashers.len(), - fields.len(), - )) + let keys = fields + .iter() + .map(|(field_name, _)| { + quote!( #crate_path::storage::address::StaticStorageMapKey::new(#field_name.borrow()) ) + }); + let key_impl = quote! { + vec![ #( #keys ),* ] }; (fields, key_impl) diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 038f5e00fa..23f8ed17e9 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -51,6 +51,7 @@ tracing = "0.1.34" parking_lot = "0.12.0" frame-metadata = "15.0.0" derivative = "2.2.0" +either = "1.8.1" subxt-macro = { version = "0.27.1", path = "../macro" } subxt-metadata = { version = "0.27.1", path = "../metadata" } diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 6ecbd76a83..037f14784c 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -183,11 +183,9 @@ where // If the key is not a tuple, encode a single value to the key type. let type_ids = match ty.type_def() { TypeDef::Tuple(tuple) => { - tuple.fields().iter().map(|f| f.id()).collect() - } - _other => { - vec![key.id()] + either::Either::Left(tuple.fields().iter().map(|f| f.id())) } + _other => either::Either::Right(std::iter::once(key.id())), }; if type_ids.len() != self.storage_entry_keys.len() { @@ -201,16 +199,16 @@ where if hashers.len() == 1 { // One hasher; hash a tuple of all SCALE encoded bytes with the one hash function. let mut input = Vec::new(); - for (key, type_id) in self.storage_entry_keys.iter().zip(type_ids) { + let iter = self.storage_entry_keys.iter().zip(type_ids); + for (key, type_id) in iter { key.encode_with_metadata(type_id, metadata, &mut input)?; } hash_bytes(&input, &hashers[0], bytes); Ok(()) } else if hashers.len() == type_ids.len() { + let iter = self.storage_entry_keys.iter().zip(type_ids).zip(hashers); // A hasher per field; encode and hash each field independently. - for ((key, type_id), hasher) in - self.storage_entry_keys.iter().zip(type_ids).zip(hashers) - { + for ((key, type_id), hasher) in iter { let mut input = Vec::new(); key.encode_with_metadata(type_id, metadata, &mut input)?; hash_bytes(&input, hasher, bytes); @@ -258,7 +256,7 @@ impl EncodeWithMetadata for StaticStorageMapKey { } /// Construct a new dynamic storage lookup to the root of some entry. -pub fn dynamic_root<'a>( +pub fn dynamic_root( pallet_name: impl Into, entry_name: impl Into, ) -> DynamicAddress { @@ -266,7 +264,7 @@ pub fn dynamic_root<'a>( } /// Construct a new dynamic storage lookup. -pub fn dynamic<'a, StorageKey: EncodeWithMetadata>( +pub fn dynamic( pallet_name: impl Into, entry_name: impl Into, storage_entry_keys: Vec, diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index f0e46a358d..79d4ef83fe 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -173,8 +173,8 @@ impl TxPayload for Payload { fn validation_details(&self) -> Option> { self.validation_hash.map(|hash| { ValidationDetails { - pallet_name: &*self.pallet_name, - call_name: &*self.call_name, + pallet_name: &self.pallet_name, + call_name: &self.call_name, hash, } }) From 756cad213f702e698515f84d0e55b34af3e4b8c0 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 11:06:12 +0000 Subject: [PATCH 26/31] Add comments --- codegen/src/api/storage.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codegen/src/api/storage.rs b/codegen/src/api/storage.rs index 987593bb45..26f5b560b0 100644 --- a/codegen/src/api/storage.rs +++ b/codegen/src/api/storage.rs @@ -88,6 +88,7 @@ fn generate_storage_entry_fns( StorageEntryType::Map { key, .. } => { let key_ty = type_gen.resolve_type(key.id()); match key_ty.type_def() { + // An N-map; return each of the keys separately. TypeDef::Tuple(tuple) => { let fields = tuple .fields() @@ -111,6 +112,7 @@ fn generate_storage_entry_fns( (fields, key_impl) } + // A map with a single key; return the single key. _ => { let ty_path = type_gen.resolve_type_path(key.id()); let fields = vec![(format_ident!("_0"), ty_path)]; From c377ff73715713473d7c4b1c99279594bd1022f8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 13:32:46 +0000 Subject: [PATCH 27/31] Alias to RuntimeEvent rather than making another, and prep for substituting call type --- codegen/src/api/mod.rs | 87 +- codegen/src/types/mod.rs | 5 +- codegen/src/types/substitutes.rs | 97 +- .../integration-tests/src/codegen/polkadot.rs | 1005 ++++++++--------- 4 files changed, 576 insertions(+), 618 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 0f49a0728e..0b30f86523 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -53,6 +53,9 @@ use syn::parse_quote; /// Error returned when the Codegen cannot generate the runtime API. #[derive(Debug, thiserror::Error)] pub enum CodegenError { + /// The given metadata type could not be found. + #[error("Could not find type with ID {0} in the type registry; please raise a support issue.")] + TypeNotFound(u32), /// Cannot fetch the metadata bytes. #[error("Failed to fetch metadata, make sure that you're pointing at a node which is providing V14 metadata: {0}")] Fetch(#[from] FetchMetadataError), @@ -80,12 +83,6 @@ pub enum CodegenError { /// Metadata for storage could not be found. #[error("Metadata for storage entry {0}_{1} could not be found. Make sure you are providing a valid metadata V14")] MissingStorageMetadata(String, String), - /// StorageNMap should have N hashers. - #[error("Number of hashers ({0}) does not equal 1 for StorageMap, or match number of fields ({1}) for StorageNMap. Make sure you are providing a valid metadata V14")] - MismatchHashers(usize, usize), - /// Expected to find one hasher for StorageMap. - #[error("No hasher found for single key. Make sure you are providing a valid metadata V14")] - MissingHasher, /// Metadata for call could not be found. #[error("Metadata for call entry {0}_{1} could not be found. Make sure you are providing a valid metadata V14")] MissingCallMetadata(String, String), @@ -250,7 +247,23 @@ impl RuntimeGenerator { ) -> Result { let item_mod_attrs = item_mod.attrs.clone(); let item_mod_ir = ir::ItemMod::try_from(item_mod)?; - let default_derives = derives.default_derives(); + + // Get the path to the `Runtime` struct. We assume that the same path contains + // RuntimeCall and RuntimeEvent. + let runtime_type_id = self.metadata.ty.id(); + let runtime_path_segments = self + .metadata + .types + .resolve(runtime_type_id) + .ok_or(CodegenError::TypeNotFound(runtime_type_id))? + .path() + .namespace() + .iter() + .map(|part| syn::PathSegment::from(format_ident!("{}", part))); + let runtime_path = syn::Path { + leading_colon: None, + segments: syn::punctuated::Punctuated::from_iter(runtime_path_segments), + }; let type_gen = TypeGenerator::new( &self.metadata.types, @@ -338,21 +351,13 @@ impl RuntimeGenerator { }) .collect::, CodegenError>>()?; - let outer_event_variants_and_match_arms = self.metadata.pallets.iter().filter_map(|p| { + let root_event_if_arms = self.metadata.pallets.iter().filter_map(|p| { let variant_name_str = &p.name; let variant_name = format_ident!("{}", variant_name_str); let mod_name = format_ident!("{}", variant_name_str.to_string().to_snake_case()); - let index = proc_macro2::Literal::u8_unsuffixed(p.index); - p.event.as_ref().map(|_| { - // The variant name to go into the event enum: - let outer_event_variant = quote! { - #[codec(index = #index)] - #variant_name(#mod_name::Event), - }; - // An 'if' arm for the RootEvent impl to match this variant name: - let outer_event_match_arm = quote! { + quote! { if pallet_name == #variant_name_str { return Ok(Event::#variant_name(#mod_name::Event::decode_with_metadata( &mut &*pallet_bytes, @@ -360,31 +365,9 @@ impl RuntimeGenerator { metadata )?)); } - }; - - (outer_event_variant, outer_event_match_arm) - }) - }).collect::>(); - - let outer_event_variants = - outer_event_variants_and_match_arms.iter().map(|v| &v.0); - let outer_event_match_arms = - outer_event_variants_and_match_arms.iter().map(|v| &v.1); - - let outer_event = quote! { - #default_derives - pub enum Event { - #( #outer_event_variants )* - } - - impl #crate_path::events::RootEvent for Event { - fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_ty: u32, metadata: &#crate_path::Metadata) -> Result { - use #crate_path::metadata::DecodeWithMetadata; - #( #outer_event_match_arms )* - Err(#crate_path::ext::scale_decode::Error::custom(format!("Pallet name '{}' not found in root Event enum", pallet_name)).into()) } - } - }; + }) + }); let mod_ident = &item_mod_ir.ident; let pallets_with_constants: Vec<_> = pallets_with_mod_names @@ -423,14 +406,23 @@ impl RuntimeGenerator { // Identify the pallets composing the static metadata by name. pub static PALLETS: [&str; #pallet_names_len] = [ #(#pallet_names,)* ]; - #outer_event - #( #modules )* - #types_mod + /// The statically generated runtime call type. + pub type Call = #types_mod_ident::#runtime_path::RuntimeCall; - /// The default error type returned when there is a runtime issue, - /// exposed here for ease of use. + /// The error type returned when there is a runtime issue. pub type DispatchError = #types_mod_ident::sp_runtime::DispatchError; + // Make the runtime event type easily accessible, and impl RootEvent to help decode into it. + pub type Event = #types_mod_ident::#runtime_path::RuntimeEvent; + + impl #crate_path::events::RootEvent for Event { + fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_ty: u32, metadata: &#crate_path::Metadata) -> Result { + use #crate_path::metadata::DecodeWithMetadata; + #( #root_event_if_arms )* + Err(#crate_path::ext::scale_decode::Error::custom(format!("Pallet name '{}' not found in root Event enum", pallet_name)).into()) + } + } + pub fn constants() -> ConstantsApi { ConstantsApi } @@ -479,6 +471,9 @@ impl RuntimeGenerator { Ok(()) } } + + #( #modules )* + #types_mod } }) } diff --git a/codegen/src/types/mod.rs b/codegen/src/types/mod.rs index d2cea5c173..f7cc79fd36 100644 --- a/codegen/src/types/mod.rs +++ b/codegen/src/types/mod.rs @@ -41,7 +41,10 @@ pub use self::{ Derives, DerivesRegistry, }, - substitutes::TypeSubstitutes, + substitutes::{ + AbsolutePath, + TypeSubstitutes, + }, type_def::TypeDefGen, type_def_params::TypeDefParameters, type_path::{ diff --git a/codegen/src/types/substitutes.rs b/codegen/src/types/substitutes.rs index c05f1e1883..a263d87690 100644 --- a/codegen/src/types/substitutes.rs +++ b/codegen/src/types/substitutes.rs @@ -108,48 +108,77 @@ impl TypeSubstitutes { } } + /// Only insert the given substitution if a substitution at that path doesn't + /// already exist. + pub fn insert_if_not_exists( + &mut self, + source: syn::Path, + target: AbsolutePath, + ) -> Result<(), CodegenError> { + let (key, val) = TypeSubstitutes::parse_path_substitution(source, target.0)?; + self.substitutes.entry(key).or_insert(val); + Ok(()) + } + + /// Add a bunch of source to target type substitutions. pub fn extend( &mut self, elems: impl IntoIterator, ) -> Result<(), CodegenError> { - let to_extend = elems.into_iter().map(|(path, AbsolutePath(mut with))| { - let Some(syn::PathSegment { arguments: src_path_args, ..}) = path.segments.last() else { - return Err(CodegenError::EmptySubstitutePath(path.span())) - }; - let Some(syn::PathSegment { arguments: target_path_args, ..}) = with.segments.last_mut() else { - return Err(CodegenError::EmptySubstitutePath(with.span())) - }; + for (source, target) in elems.into_iter() { + let (key, val) = TypeSubstitutes::parse_path_substitution(source, target.0)?; + self.substitutes.insert(key, val); + } + Ok(()) + } - let source_args: Vec<_> = type_args(src_path_args).collect(); + /// Given a source and target path, parse the type params to work out the mapping from + /// source to target, and output the source => substitution mapping that we work out from this. + fn parse_path_substitution( + src_path: syn::Path, + mut target_path: syn::Path, + ) -> Result<(PathSegments, Substitute), CodegenError> { + let Some(syn::PathSegment { arguments: src_path_args, ..}) = src_path.segments.last() else { + return Err(CodegenError::EmptySubstitutePath(src_path.span())) + }; + let Some(syn::PathSegment { arguments: target_path_args, ..}) = target_path.segments.last_mut() else { + return Err(CodegenError::EmptySubstitutePath(target_path.span())) + }; - let param_mapping = if source_args.is_empty() { - // If the type parameters on the source type are not specified, then this means that - // the type is either not generic or the user wants to pass through all the parameters - TypeParamMapping::None - } else { - // Describe the mapping in terms of "which source param idx is used for each target param". - // So, for each target param, find the matching source param index. - let mapping = type_args(target_path_args) - .filter_map(|arg| - source_args - .iter() - .position(|&src| src == arg) - .map(|src_idx| - u8::try_from(src_idx).expect("type arguments to be fewer than 256; qed"), - ) - ).collect(); - TypeParamMapping::Specified(mapping) - }; + let source_args: Vec<_> = type_args(src_path_args).collect(); - // NOTE: Params are late bound and held separately, so clear them - // here to not mess pretty printing this path and params together - *target_path_args = syn::PathArguments::None; + let param_mapping = if source_args.is_empty() { + // If the type parameters on the source type are not specified, then this means that + // the type is either not generic or the user wants to pass through all the parameters + TypeParamMapping::None + } else { + // Describe the mapping in terms of "which source param idx is used for each target param". + // So, for each target param, find the matching source param index. + let mapping = type_args(target_path_args) + .filter_map(|arg| { + source_args + .iter() + .position(|&src| src == arg) + .map(|src_idx| { + u8::try_from(src_idx) + .expect("type arguments to be fewer than 256; qed") + }) + }) + .collect(); + TypeParamMapping::Specified(mapping) + }; - Ok((PathSegments::from(&path), Substitute { path: with, param_mapping })) - }).collect::, _>>()?; + // Now that we've parsed the type params from our target path, remove said params from + // that path, since we're storing them separately. + *target_path_args = syn::PathArguments::None; - self.substitutes.extend(to_extend); - Ok(()) + Ok(( + PathSegments::from(&src_path), + Substitute { + path: target_path, + param_mapping, + }, + )) } /// Given a source type path, return a substituted type path if a substitution is defined. @@ -249,7 +278,7 @@ fn is_absolute(path: &syn::Path) -> bool { .map_or(false, |segment| segment.ident == "crate") } -pub struct AbsolutePath(syn::Path); +pub struct AbsolutePath(pub syn::Path); impl TryFrom for AbsolutePath { type Error = (syn::Path, String); diff --git a/testing/integration-tests/src/codegen/polkadot.rs b/testing/integration-tests/src/codegen/polkadot.rs index 4c07b71be0..facf63d7e9 100644 --- a/testing/integration-tests/src/codegen/polkadot.rs +++ b/testing/integration-tests/src/codegen/polkadot.rs @@ -57,97 +57,11 @@ pub mod api { "Crowdloan", "XcmPallet", ]; - #[derive( - :: subxt :: ext :: codec :: Decode, - :: subxt :: ext :: codec :: Encode, - :: subxt :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: scale_encode")] - pub enum Event { - #[codec(index = 0)] - System(system::Event), - #[codec(index = 1)] - Scheduler(scheduler::Event), - #[codec(index = 10)] - Preimage(preimage::Event), - #[codec(index = 4)] - Indices(indices::Event), - #[codec(index = 5)] - Balances(balances::Event), - #[codec(index = 32)] - TransactionPayment(transaction_payment::Event), - #[codec(index = 7)] - Staking(staking::Event), - #[codec(index = 8)] - Offences(offences::Event), - #[codec(index = 9)] - Session(session::Event), - #[codec(index = 11)] - Grandpa(grandpa::Event), - #[codec(index = 12)] - ImOnline(im_online::Event), - #[codec(index = 14)] - Democracy(democracy::Event), - #[codec(index = 15)] - Council(council::Event), - #[codec(index = 16)] - TechnicalCommittee(technical_committee::Event), - #[codec(index = 17)] - PhragmenElection(phragmen_election::Event), - #[codec(index = 18)] - TechnicalMembership(technical_membership::Event), - #[codec(index = 19)] - Treasury(treasury::Event), - #[codec(index = 24)] - Claims(claims::Event), - #[codec(index = 25)] - Vesting(vesting::Event), - #[codec(index = 26)] - Utility(utility::Event), - #[codec(index = 28)] - Identity(identity::Event), - #[codec(index = 29)] - Proxy(proxy::Event), - #[codec(index = 30)] - Multisig(multisig::Event), - #[codec(index = 34)] - Bounties(bounties::Event), - #[codec(index = 38)] - ChildBounties(child_bounties::Event), - #[codec(index = 35)] - Tips(tips::Event), - #[codec(index = 36)] - ElectionProviderMultiPhase(election_provider_multi_phase::Event), - #[codec(index = 37)] - VoterList(voter_list::Event), - #[codec(index = 39)] - NominationPools(nomination_pools::Event), - #[codec(index = 40)] - FastUnstake(fast_unstake::Event), - #[codec(index = 53)] - ParaInclusion(para_inclusion::Event), - #[codec(index = 56)] - Paras(paras::Event), - #[codec(index = 59)] - Ump(ump::Event), - #[codec(index = 60)] - Hrmp(hrmp::Event), - #[codec(index = 62)] - ParasDisputes(paras_disputes::Event), - #[codec(index = 70)] - Registrar(registrar::Event), - #[codec(index = 71)] - Slots(slots::Event), - #[codec(index = 72)] - Auctions(auctions::Event), - #[codec(index = 73)] - Crowdloan(crowdloan::Event), - #[codec(index = 99)] - XcmPallet(xcm_pallet::Event), - } + #[doc = r" The statically generated runtime call type."] + pub type Call = runtime_types::polkadot_runtime::RuntimeCall; + #[doc = r" The error type returned when there is a runtime issue."] + pub type DispatchError = runtime_types::sp_runtime::DispatchError; + pub type Event = runtime_types::polkadot_runtime::RuntimeEvent; impl ::subxt::events::RootEvent for Event { fn root_event( pallet_bytes: &[u8], @@ -463,6 +377,429 @@ pub mod api { .into()) } } + 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 scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } + pub fn babe(&self) -> babe::constants::ConstantsApi { + babe::constants::ConstantsApi + } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi + } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } + pub fn transaction_payment( + &self, + ) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi + } + pub fn authorship(&self) -> authorship::constants::ConstantsApi { + authorship::constants::ConstantsApi + } + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi + } + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi + } + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi + } + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi + } + pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { + phragmen_election::constants::ConstantsApi + } + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi + } + pub fn claims(&self) -> claims::constants::ConstantsApi { + claims::constants::ConstantsApi + } + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi + } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi + } + pub fn proxy(&self) -> proxy::constants::ConstantsApi { + proxy::constants::ConstantsApi + } + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi + } + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi + } + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi + } + pub fn tips(&self) -> tips::constants::ConstantsApi { + tips::constants::ConstantsApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi + } + pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { + voter_list::constants::ConstantsApi + } + pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { + nomination_pools::constants::ConstantsApi + } + pub fn paras(&self) -> paras::constants::ConstantsApi { + paras::constants::ConstantsApi + } + pub fn registrar(&self) -> registrar::constants::ConstantsApi { + registrar::constants::ConstantsApi + } + pub fn slots(&self) -> slots::constants::ConstantsApi { + slots::constants::ConstantsApi + } + pub fn auctions(&self) -> auctions::constants::ConstantsApi { + auctions::constants::ConstantsApi + } + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { + crowdloan::constants::ConstantsApi + } + } + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { + system::storage::StorageApi + } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } + pub fn babe(&self) -> babe::storage::StorageApi { + babe::storage::StorageApi + } + pub fn timestamp(&self) -> timestamp::storage::StorageApi { + timestamp::storage::StorageApi + } + pub fn indices(&self) -> indices::storage::StorageApi { + indices::storage::StorageApi + } + pub fn balances(&self) -> balances::storage::StorageApi { + balances::storage::StorageApi + } + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi + } + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi + } + pub fn staking(&self) -> staking::storage::StorageApi { + staking::storage::StorageApi + } + pub fn offences(&self) -> offences::storage::StorageApi { + offences::storage::StorageApi + } + pub fn session(&self) -> session::storage::StorageApi { + session::storage::StorageApi + } + pub fn grandpa(&self) -> grandpa::storage::StorageApi { + grandpa::storage::StorageApi + } + pub fn im_online(&self) -> im_online::storage::StorageApi { + im_online::storage::StorageApi + } + pub fn democracy(&self) -> democracy::storage::StorageApi { + democracy::storage::StorageApi + } + pub fn council(&self) -> council::storage::StorageApi { + council::storage::StorageApi + } + pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { + technical_committee::storage::StorageApi + } + pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { + phragmen_election::storage::StorageApi + } + pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { + technical_membership::storage::StorageApi + } + pub fn treasury(&self) -> treasury::storage::StorageApi { + treasury::storage::StorageApi + } + pub fn claims(&self) -> claims::storage::StorageApi { + claims::storage::StorageApi + } + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi + } + pub fn identity(&self) -> identity::storage::StorageApi { + identity::storage::StorageApi + } + pub fn proxy(&self) -> proxy::storage::StorageApi { + proxy::storage::StorageApi + } + pub fn multisig(&self) -> multisig::storage::StorageApi { + multisig::storage::StorageApi + } + pub fn bounties(&self) -> bounties::storage::StorageApi { + bounties::storage::StorageApi + } + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi + } + pub fn tips(&self) -> tips::storage::StorageApi { + tips::storage::StorageApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi + } + pub fn voter_list(&self) -> voter_list::storage::StorageApi { + voter_list::storage::StorageApi + } + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi + } + pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { + fast_unstake::storage::StorageApi + } + pub fn configuration(&self) -> configuration::storage::StorageApi { + configuration::storage::StorageApi + } + pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { + paras_shared::storage::StorageApi + } + pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { + para_inclusion::storage::StorageApi + } + pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { + para_inherent::storage::StorageApi + } + pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { + para_scheduler::storage::StorageApi + } + pub fn paras(&self) -> paras::storage::StorageApi { + paras::storage::StorageApi + } + pub fn initializer(&self) -> initializer::storage::StorageApi { + initializer::storage::StorageApi + } + pub fn dmp(&self) -> dmp::storage::StorageApi { + dmp::storage::StorageApi + } + pub fn ump(&self) -> ump::storage::StorageApi { + ump::storage::StorageApi + } + pub fn hrmp(&self) -> hrmp::storage::StorageApi { + hrmp::storage::StorageApi + } + pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { + para_session_info::storage::StorageApi + } + pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { + paras_disputes::storage::StorageApi + } + pub fn registrar(&self) -> registrar::storage::StorageApi { + registrar::storage::StorageApi + } + pub fn slots(&self) -> slots::storage::StorageApi { + slots::storage::StorageApi + } + pub fn auctions(&self) -> auctions::storage::StorageApi { + auctions::storage::StorageApi + } + pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { + crowdloan::storage::StorageApi + } + pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { + xcm_pallet::storage::StorageApi + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { + system::calls::TransactionApi + } + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } + pub fn babe(&self) -> babe::calls::TransactionApi { + babe::calls::TransactionApi + } + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi + } + pub fn indices(&self) -> indices::calls::TransactionApi { + indices::calls::TransactionApi + } + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi + } + pub fn authorship(&self) -> authorship::calls::TransactionApi { + authorship::calls::TransactionApi + } + pub fn staking(&self) -> staking::calls::TransactionApi { + staking::calls::TransactionApi + } + pub fn session(&self) -> session::calls::TransactionApi { + session::calls::TransactionApi + } + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { + grandpa::calls::TransactionApi + } + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi + } + pub fn democracy(&self) -> democracy::calls::TransactionApi { + democracy::calls::TransactionApi + } + pub fn council(&self) -> council::calls::TransactionApi { + council::calls::TransactionApi + } + pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { + technical_committee::calls::TransactionApi + } + pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { + phragmen_election::calls::TransactionApi + } + pub fn technical_membership( + &self, + ) -> technical_membership::calls::TransactionApi { + technical_membership::calls::TransactionApi + } + pub fn treasury(&self) -> treasury::calls::TransactionApi { + treasury::calls::TransactionApi + } + pub fn claims(&self) -> claims::calls::TransactionApi { + claims::calls::TransactionApi + } + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi + } + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi + } + pub fn identity(&self) -> identity::calls::TransactionApi { + identity::calls::TransactionApi + } + pub fn proxy(&self) -> proxy::calls::TransactionApi { + proxy::calls::TransactionApi + } + pub fn multisig(&self) -> multisig::calls::TransactionApi { + multisig::calls::TransactionApi + } + pub fn bounties(&self) -> bounties::calls::TransactionApi { + bounties::calls::TransactionApi + } + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi + } + pub fn tips(&self) -> tips::calls::TransactionApi { + tips::calls::TransactionApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi + } + pub fn voter_list(&self) -> voter_list::calls::TransactionApi { + voter_list::calls::TransactionApi + } + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi + } + pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { + fast_unstake::calls::TransactionApi + } + pub fn configuration(&self) -> configuration::calls::TransactionApi { + configuration::calls::TransactionApi + } + pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { + paras_shared::calls::TransactionApi + } + pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { + para_inclusion::calls::TransactionApi + } + pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { + para_inherent::calls::TransactionApi + } + pub fn paras(&self) -> paras::calls::TransactionApi { + paras::calls::TransactionApi + } + pub fn initializer(&self) -> initializer::calls::TransactionApi { + initializer::calls::TransactionApi + } + pub fn dmp(&self) -> dmp::calls::TransactionApi { + dmp::calls::TransactionApi + } + pub fn ump(&self) -> ump::calls::TransactionApi { + ump::calls::TransactionApi + } + pub fn hrmp(&self) -> hrmp::calls::TransactionApi { + hrmp::calls::TransactionApi + } + pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { + paras_disputes::calls::TransactionApi + } + pub fn registrar(&self) -> registrar::calls::TransactionApi { + registrar::calls::TransactionApi + } + pub fn slots(&self) -> slots::calls::TransactionApi { + slots::calls::TransactionApi + } + pub fn auctions(&self) -> auctions::calls::TransactionApi { + auctions::calls::TransactionApi + } + pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { + crowdloan::calls::TransactionApi + } + pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { + xcm_pallet::calls::TransactionApi + } + } + #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] + pub fn validate_codegen>( + client: &C, + ) -> Result<(), ::subxt::error::MetadataError> { + let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); + if runtime_metadata_hash + != [ + 252u8, 179u8, 170u8, 129u8, 159u8, 95u8, 180u8, 114u8, 218u8, 56u8, 91u8, + 93u8, 175u8, 45u8, 57u8, 223u8, 178u8, 209u8, 250u8, 247u8, 243u8, 73u8, + 182u8, 137u8, 176u8, 129u8, 37u8, 196u8, 133u8, 123u8, 93u8, 186u8, + ] + { + Err(::subxt::error::MetadataError::IncompatibleMetadata) + } else { + Ok(()) + } + } pub mod system { use super::root_mod; use super::runtime_types; @@ -2330,10 +2667,14 @@ pub mod api { ::subxt::storage::address::Address::new_static( "Preimage", "PreimageFor", - vec![::subxt::storage::address::StaticStorageMapKey::new(&( - _0.borrow(), - _1.borrow(), - ))], + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8, 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8, @@ -7196,10 +7537,14 @@ pub mod api { ::subxt::storage::address::Address::new_static( "Staking", "SpanSlash", - vec![::subxt::storage::address::StaticStorageMapKey::new(&( - _0.borrow(), - _1.borrow(), - ))], + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8, 59u8, 184u8, 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8, @@ -8002,10 +8347,14 @@ pub mod api { ::subxt::storage::address::Address::new_static( "Session", "KeyOwner", - vec![::subxt::storage::address::StaticStorageMapKey::new(&( - _0.borrow(), - _1.borrow(), - ))], + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8, 58u8, 197u8, 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8, @@ -25670,10 +26019,14 @@ pub mod api { ::subxt::storage::address::Address::new_static( "Paras", "PastCodeHash", - vec![::subxt::storage::address::StaticStorageMapKey::new(&( - _0.borrow(), - _1.borrow(), - ))], + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ 241u8, 112u8, 128u8, 226u8, 163u8, 193u8, 77u8, 78u8, 177u8, 146u8, 31u8, 143u8, 44u8, 140u8, 159u8, 134u8, 221u8, 129u8, @@ -29788,10 +30141,14 @@ pub mod api { ::subxt::storage::address::Address::new_static( "Auctions", "ReservedAmounts", - vec![::subxt::storage::address::StaticStorageMapKey::new(&( - _0.borrow(), - _1.borrow(), - ))], + vec![ + ::subxt::storage::address::StaticStorageMapKey::new( + _0.borrow(), + ), + ::subxt::storage::address::StaticStorageMapKey::new( + _1.borrow(), + ), + ], [ 120u8, 85u8, 180u8, 244u8, 154u8, 135u8, 87u8, 79u8, 75u8, 169u8, 220u8, 117u8, 227u8, 85u8, 198u8, 214u8, 28u8, 126u8, @@ -46059,430 +46416,4 @@ pub mod api { } } } - #[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 scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi - } - pub fn babe(&self) -> babe::constants::ConstantsApi { - babe::constants::ConstantsApi - } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi - } - pub fn indices(&self) -> indices::constants::ConstantsApi { - indices::constants::ConstantsApi - } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi - } - pub fn transaction_payment( - &self, - ) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi - } - pub fn authorship(&self) -> authorship::constants::ConstantsApi { - authorship::constants::ConstantsApi - } - pub fn staking(&self) -> staking::constants::ConstantsApi { - staking::constants::ConstantsApi - } - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { - grandpa::constants::ConstantsApi - } - pub fn im_online(&self) -> im_online::constants::ConstantsApi { - im_online::constants::ConstantsApi - } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi - } - pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { - phragmen_election::constants::ConstantsApi - } - pub fn treasury(&self) -> treasury::constants::ConstantsApi { - treasury::constants::ConstantsApi - } - pub fn claims(&self) -> claims::constants::ConstantsApi { - claims::constants::ConstantsApi - } - pub fn vesting(&self) -> vesting::constants::ConstantsApi { - vesting::constants::ConstantsApi - } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi - } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi - } - pub fn proxy(&self) -> proxy::constants::ConstantsApi { - proxy::constants::ConstantsApi - } - pub fn multisig(&self) -> multisig::constants::ConstantsApi { - multisig::constants::ConstantsApi - } - pub fn bounties(&self) -> bounties::constants::ConstantsApi { - bounties::constants::ConstantsApi - } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi - } - pub fn tips(&self) -> tips::constants::ConstantsApi { - tips::constants::ConstantsApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi - } - pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { - voter_list::constants::ConstantsApi - } - pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { - nomination_pools::constants::ConstantsApi - } - pub fn paras(&self) -> paras::constants::ConstantsApi { - paras::constants::ConstantsApi - } - pub fn registrar(&self) -> registrar::constants::ConstantsApi { - registrar::constants::ConstantsApi - } - pub fn slots(&self) -> slots::constants::ConstantsApi { - slots::constants::ConstantsApi - } - pub fn auctions(&self) -> auctions::constants::ConstantsApi { - auctions::constants::ConstantsApi - } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { - crowdloan::constants::ConstantsApi - } - } - pub struct StorageApi; - impl StorageApi { - pub fn system(&self) -> system::storage::StorageApi { - system::storage::StorageApi - } - pub fn scheduler(&self) -> scheduler::storage::StorageApi { - scheduler::storage::StorageApi - } - pub fn preimage(&self) -> preimage::storage::StorageApi { - preimage::storage::StorageApi - } - pub fn babe(&self) -> babe::storage::StorageApi { - babe::storage::StorageApi - } - pub fn timestamp(&self) -> timestamp::storage::StorageApi { - timestamp::storage::StorageApi - } - pub fn indices(&self) -> indices::storage::StorageApi { - indices::storage::StorageApi - } - pub fn balances(&self) -> balances::storage::StorageApi { - balances::storage::StorageApi - } - pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { - transaction_payment::storage::StorageApi - } - pub fn authorship(&self) -> authorship::storage::StorageApi { - authorship::storage::StorageApi - } - pub fn staking(&self) -> staking::storage::StorageApi { - staking::storage::StorageApi - } - pub fn offences(&self) -> offences::storage::StorageApi { - offences::storage::StorageApi - } - pub fn session(&self) -> session::storage::StorageApi { - session::storage::StorageApi - } - pub fn grandpa(&self) -> grandpa::storage::StorageApi { - grandpa::storage::StorageApi - } - pub fn im_online(&self) -> im_online::storage::StorageApi { - im_online::storage::StorageApi - } - pub fn democracy(&self) -> democracy::storage::StorageApi { - democracy::storage::StorageApi - } - pub fn council(&self) -> council::storage::StorageApi { - council::storage::StorageApi - } - pub fn technical_committee(&self) -> technical_committee::storage::StorageApi { - technical_committee::storage::StorageApi - } - pub fn phragmen_election(&self) -> phragmen_election::storage::StorageApi { - phragmen_election::storage::StorageApi - } - pub fn technical_membership(&self) -> technical_membership::storage::StorageApi { - technical_membership::storage::StorageApi - } - pub fn treasury(&self) -> treasury::storage::StorageApi { - treasury::storage::StorageApi - } - pub fn claims(&self) -> claims::storage::StorageApi { - claims::storage::StorageApi - } - pub fn vesting(&self) -> vesting::storage::StorageApi { - vesting::storage::StorageApi - } - pub fn identity(&self) -> identity::storage::StorageApi { - identity::storage::StorageApi - } - pub fn proxy(&self) -> proxy::storage::StorageApi { - proxy::storage::StorageApi - } - pub fn multisig(&self) -> multisig::storage::StorageApi { - multisig::storage::StorageApi - } - pub fn bounties(&self) -> bounties::storage::StorageApi { - bounties::storage::StorageApi - } - pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { - child_bounties::storage::StorageApi - } - pub fn tips(&self) -> tips::storage::StorageApi { - tips::storage::StorageApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::storage::StorageApi { - election_provider_multi_phase::storage::StorageApi - } - pub fn voter_list(&self) -> voter_list::storage::StorageApi { - voter_list::storage::StorageApi - } - pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { - nomination_pools::storage::StorageApi - } - pub fn fast_unstake(&self) -> fast_unstake::storage::StorageApi { - fast_unstake::storage::StorageApi - } - pub fn configuration(&self) -> configuration::storage::StorageApi { - configuration::storage::StorageApi - } - pub fn paras_shared(&self) -> paras_shared::storage::StorageApi { - paras_shared::storage::StorageApi - } - pub fn para_inclusion(&self) -> para_inclusion::storage::StorageApi { - para_inclusion::storage::StorageApi - } - pub fn para_inherent(&self) -> para_inherent::storage::StorageApi { - para_inherent::storage::StorageApi - } - pub fn para_scheduler(&self) -> para_scheduler::storage::StorageApi { - para_scheduler::storage::StorageApi - } - pub fn paras(&self) -> paras::storage::StorageApi { - paras::storage::StorageApi - } - pub fn initializer(&self) -> initializer::storage::StorageApi { - initializer::storage::StorageApi - } - pub fn dmp(&self) -> dmp::storage::StorageApi { - dmp::storage::StorageApi - } - pub fn ump(&self) -> ump::storage::StorageApi { - ump::storage::StorageApi - } - pub fn hrmp(&self) -> hrmp::storage::StorageApi { - hrmp::storage::StorageApi - } - pub fn para_session_info(&self) -> para_session_info::storage::StorageApi { - para_session_info::storage::StorageApi - } - pub fn paras_disputes(&self) -> paras_disputes::storage::StorageApi { - paras_disputes::storage::StorageApi - } - pub fn registrar(&self) -> registrar::storage::StorageApi { - registrar::storage::StorageApi - } - pub fn slots(&self) -> slots::storage::StorageApi { - slots::storage::StorageApi - } - pub fn auctions(&self) -> auctions::storage::StorageApi { - auctions::storage::StorageApi - } - pub fn crowdloan(&self) -> crowdloan::storage::StorageApi { - crowdloan::storage::StorageApi - } - pub fn xcm_pallet(&self) -> xcm_pallet::storage::StorageApi { - xcm_pallet::storage::StorageApi - } - } - pub struct TransactionApi; - impl TransactionApi { - pub fn system(&self) -> system::calls::TransactionApi { - system::calls::TransactionApi - } - pub fn scheduler(&self) -> scheduler::calls::TransactionApi { - scheduler::calls::TransactionApi - } - pub fn preimage(&self) -> preimage::calls::TransactionApi { - preimage::calls::TransactionApi - } - pub fn babe(&self) -> babe::calls::TransactionApi { - babe::calls::TransactionApi - } - pub fn timestamp(&self) -> timestamp::calls::TransactionApi { - timestamp::calls::TransactionApi - } - pub fn indices(&self) -> indices::calls::TransactionApi { - indices::calls::TransactionApi - } - pub fn balances(&self) -> balances::calls::TransactionApi { - balances::calls::TransactionApi - } - pub fn authorship(&self) -> authorship::calls::TransactionApi { - authorship::calls::TransactionApi - } - pub fn staking(&self) -> staking::calls::TransactionApi { - staking::calls::TransactionApi - } - pub fn session(&self) -> session::calls::TransactionApi { - session::calls::TransactionApi - } - pub fn grandpa(&self) -> grandpa::calls::TransactionApi { - grandpa::calls::TransactionApi - } - pub fn im_online(&self) -> im_online::calls::TransactionApi { - im_online::calls::TransactionApi - } - pub fn democracy(&self) -> democracy::calls::TransactionApi { - democracy::calls::TransactionApi - } - pub fn council(&self) -> council::calls::TransactionApi { - council::calls::TransactionApi - } - pub fn technical_committee(&self) -> technical_committee::calls::TransactionApi { - technical_committee::calls::TransactionApi - } - pub fn phragmen_election(&self) -> phragmen_election::calls::TransactionApi { - phragmen_election::calls::TransactionApi - } - pub fn technical_membership( - &self, - ) -> technical_membership::calls::TransactionApi { - technical_membership::calls::TransactionApi - } - pub fn treasury(&self) -> treasury::calls::TransactionApi { - treasury::calls::TransactionApi - } - pub fn claims(&self) -> claims::calls::TransactionApi { - claims::calls::TransactionApi - } - pub fn vesting(&self) -> vesting::calls::TransactionApi { - vesting::calls::TransactionApi - } - pub fn utility(&self) -> utility::calls::TransactionApi { - utility::calls::TransactionApi - } - pub fn identity(&self) -> identity::calls::TransactionApi { - identity::calls::TransactionApi - } - pub fn proxy(&self) -> proxy::calls::TransactionApi { - proxy::calls::TransactionApi - } - pub fn multisig(&self) -> multisig::calls::TransactionApi { - multisig::calls::TransactionApi - } - pub fn bounties(&self) -> bounties::calls::TransactionApi { - bounties::calls::TransactionApi - } - pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { - child_bounties::calls::TransactionApi - } - pub fn tips(&self) -> tips::calls::TransactionApi { - tips::calls::TransactionApi - } - pub fn election_provider_multi_phase( - &self, - ) -> election_provider_multi_phase::calls::TransactionApi { - election_provider_multi_phase::calls::TransactionApi - } - pub fn voter_list(&self) -> voter_list::calls::TransactionApi { - voter_list::calls::TransactionApi - } - pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { - nomination_pools::calls::TransactionApi - } - pub fn fast_unstake(&self) -> fast_unstake::calls::TransactionApi { - fast_unstake::calls::TransactionApi - } - pub fn configuration(&self) -> configuration::calls::TransactionApi { - configuration::calls::TransactionApi - } - pub fn paras_shared(&self) -> paras_shared::calls::TransactionApi { - paras_shared::calls::TransactionApi - } - pub fn para_inclusion(&self) -> para_inclusion::calls::TransactionApi { - para_inclusion::calls::TransactionApi - } - pub fn para_inherent(&self) -> para_inherent::calls::TransactionApi { - para_inherent::calls::TransactionApi - } - pub fn paras(&self) -> paras::calls::TransactionApi { - paras::calls::TransactionApi - } - pub fn initializer(&self) -> initializer::calls::TransactionApi { - initializer::calls::TransactionApi - } - pub fn dmp(&self) -> dmp::calls::TransactionApi { - dmp::calls::TransactionApi - } - pub fn ump(&self) -> ump::calls::TransactionApi { - ump::calls::TransactionApi - } - pub fn hrmp(&self) -> hrmp::calls::TransactionApi { - hrmp::calls::TransactionApi - } - pub fn paras_disputes(&self) -> paras_disputes::calls::TransactionApi { - paras_disputes::calls::TransactionApi - } - pub fn registrar(&self) -> registrar::calls::TransactionApi { - registrar::calls::TransactionApi - } - pub fn slots(&self) -> slots::calls::TransactionApi { - slots::calls::TransactionApi - } - pub fn auctions(&self) -> auctions::calls::TransactionApi { - auctions::calls::TransactionApi - } - pub fn crowdloan(&self) -> crowdloan::calls::TransactionApi { - crowdloan::calls::TransactionApi - } - pub fn xcm_pallet(&self) -> xcm_pallet::calls::TransactionApi { - xcm_pallet::calls::TransactionApi - } - } - #[doc = r" check whether the Client you are using is aligned with the statically generated codegen."] - pub fn validate_codegen>( - client: &C, - ) -> Result<(), ::subxt::error::MetadataError> { - let runtime_metadata_hash = client.metadata().metadata_hash(&PALLETS); - if runtime_metadata_hash - != [ - 252u8, 179u8, 170u8, 129u8, 159u8, 95u8, 180u8, 114u8, 218u8, 56u8, 91u8, - 93u8, 175u8, 45u8, 57u8, 223u8, 178u8, 209u8, 250u8, 247u8, 243u8, 73u8, - 182u8, 137u8, 176u8, 129u8, 37u8, 196u8, 133u8, 123u8, 93u8, 186u8, - ] - { - Err(::subxt::error::MetadataError::IncompatibleMetadata) - } else { - Ok(()) - } - } } From 02e4b9339389454f3704300973a1ff670aec33a2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Mar 2023 13:49:38 +0000 Subject: [PATCH 28/31] remove unnecessary clone --- codegen/src/api/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 0b30f86523..afb0acc047 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -269,7 +269,7 @@ impl RuntimeGenerator { &self.metadata.types, "runtime_types", type_substitutes, - derives.clone(), + derives, crate_path.clone(), should_gen_docs, ); From 7e4ea8d33df4521fe7657b86a8948fb962cf70a9 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Sat, 18 Mar 2023 09:31:57 +0000 Subject: [PATCH 29/31] Fix docs and failing UI test --- codegen/src/api/mod.rs | 54 ++++++++++++++++++------------- subxt/src/rpc/mod.rs | 18 +++-------- subxt/src/rpc/rpc.rs | 20 ++++-------- testing/ui-tests/src/utils/mod.rs | 12 ++++++- 4 files changed, 54 insertions(+), 50 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index afb0acc047..18a3435b3d 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -248,23 +248,6 @@ impl RuntimeGenerator { let item_mod_attrs = item_mod.attrs.clone(); let item_mod_ir = ir::ItemMod::try_from(item_mod)?; - // Get the path to the `Runtime` struct. We assume that the same path contains - // RuntimeCall and RuntimeEvent. - let runtime_type_id = self.metadata.ty.id(); - let runtime_path_segments = self - .metadata - .types - .resolve(runtime_type_id) - .ok_or(CodegenError::TypeNotFound(runtime_type_id))? - .path() - .namespace() - .iter() - .map(|part| syn::PathSegment::from(format_ident!("{}", part))); - let runtime_path = syn::Path { - leading_colon: None, - segments: syn::punctuated::Punctuated::from_iter(runtime_path_segments), - }; - let type_gen = TypeGenerator::new( &self.metadata.types, "runtime_types", @@ -287,6 +270,28 @@ impl RuntimeGenerator { }) .collect::>(); + // Get the path to the `Runtime` struct. We assume that the same path contains + // RuntimeCall and RuntimeEvent. + let runtime_type_id = self.metadata.ty.id(); + let runtime_path_segments = self + .metadata + .types + .resolve(runtime_type_id) + .ok_or(CodegenError::TypeNotFound(runtime_type_id))? + .path() + .namespace() + .iter() + .map(|part| syn::PathSegment::from(format_ident!("{}", part))); + let runtime_path_suffix = syn::Path { + leading_colon: None, + segments: syn::punctuated::Punctuated::from_iter(runtime_path_segments), + }; + let runtime_path = if runtime_path_suffix.segments.is_empty() { + quote!(#types_mod_ident) + } else { + quote!(#types_mod_ident::#runtime_path_suffix) + }; + // Pallet names and their length are used to create PALLETS array. // The array is used to identify the pallets composing the metadata for // validation of just those pallets. @@ -398,22 +403,27 @@ impl RuntimeGenerator { #[allow(dead_code, unused_imports, non_camel_case_types)] #[allow(clippy::all)] pub mod #mod_ident { - // Preserve any Rust items that were previously defined in the adorned module + // Preserve any Rust items that were previously defined in the adorned module. #( #rust_items ) * - // Make it easy to access the root via `root_mod` at different levels: - use super::#mod_ident as root_mod; + // Make it easy to access the root items via `root_mod` at different levels + // without reaching out of this module. + #[allow(unused_imports)] + mod root_mod { + pub use super::*; + } + // Identify the pallets composing the static metadata by name. pub static PALLETS: [&str; #pallet_names_len] = [ #(#pallet_names,)* ]; /// The statically generated runtime call type. - pub type Call = #types_mod_ident::#runtime_path::RuntimeCall; + pub type Call = #runtime_path::RuntimeCall; /// The error type returned when there is a runtime issue. pub type DispatchError = #types_mod_ident::sp_runtime::DispatchError; // Make the runtime event type easily accessible, and impl RootEvent to help decode into it. - pub type Event = #types_mod_ident::#runtime_path::RuntimeEvent; + pub type Event = #runtime_path::RuntimeEvent; impl #crate_path::events::RootEvent for Event { fn root_event(pallet_bytes: &[u8], pallet_name: &str, pallet_ty: u32, metadata: &#crate_path::Metadata) -> Result { diff --git a/subxt/src/rpc/mod.rs b/subxt/src/rpc/mod.rs index 8be955b6c5..843c99e3ba 100644 --- a/subxt/src/rpc/mod.rs +++ b/subxt/src/rpc/mod.rs @@ -21,30 +21,22 @@ //! Fetching storage keys //! //! ```no_run +//! # #[tokio::main] +//! # async fn main() { //! use subxt::{ PolkadotConfig, OnlineClient, storage::StorageKey }; //! //! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] //! pub mod polkadot {} //! -//! # #[tokio::main] -//! # async fn main() { //! let api = OnlineClient::::new().await.unwrap(); //! -//! let key = polkadot::storage() -//! .xcm_pallet() -//! .version_notifiers_root() -//! .to_bytes(); -//! -//! // Fetch up to 10 keys. -//! let keys = api +//! let genesis_hash = api //! .rpc() -//! .storage_keys_paged(&key, 10, None, None) +//! .genesis_hash() //! .await //! .unwrap(); //! -//! for key in keys.iter() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! } +//! println!("{genesis_hash}"); //! # } //! ``` diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index ff8c714513..09ee3a125c 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -9,33 +9,25 @@ //! //! # Example //! -//! Fetching storage keys +//! Fetching the chain genesis hash. //! //! ```no_run +//! # #[tokio::main] +//! # async fn main() { //! use subxt::{ PolkadotConfig, OnlineClient, storage::StorageKey }; //! //! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] //! pub mod polkadot {} //! -//! # #[tokio::main] -//! # async fn main() { //! let api = OnlineClient::::new().await.unwrap(); //! -//! let key = polkadot::storage() -//! .xcm_pallet() -//! .version_notifiers_root() -//! .to_bytes(); -//! -//! // Fetch up to 10 keys. -//! let keys = api +//! let genesis_hash = api //! .rpc() -//! .storage_keys_paged(&key, 10, None, None) +//! .genesis_hash() //! .await //! .unwrap(); //! -//! for key in keys.iter() { -//! println!("Key: 0x{}", hex::encode(&key)); -//! } +//! println!("{genesis_hash}"); //! # } //! ``` diff --git a/testing/ui-tests/src/utils/mod.rs b/testing/ui-tests/src/utils/mod.rs index 698e001589..79d42c647b 100644 --- a/testing/ui-tests/src/utils/mod.rs +++ b/testing/ui-tests/src/utils/mod.rs @@ -41,7 +41,17 @@ pub fn generate_metadata_from_pallets_custom_dispatch_error< let mut registry = scale_info::Registry::new(); let pallets = registry.map_into_portable(pallets); let extrinsic = extrinsic.into_portable(&mut registry); - let ty = registry.register_type(&meta_type::<()>()); + + #[derive(TypeInfo)] + struct Runtime; + #[derive(TypeInfo)] + enum RuntimeCall {} + #[derive(TypeInfo)] + enum RuntimeEvent {} + + let ty = registry.register_type(&meta_type::()); + registry.register_type(&meta_type::()); + registry.register_type(&meta_type::()); // Metadata needs to contain this DispatchError, since codegen looks for it. registry.register_type(&meta_type::()); From bf6a01cc7cbc821bcdf2aa82caa4686a9e1c5de4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 20 Mar 2023 15:59:57 +0000 Subject: [PATCH 30/31] root_bytes -> to_root_bytes --- examples/examples/storage_iterating.rs | 4 ++-- subxt/src/storage/storage_address.rs | 2 +- testing/integration-tests/src/client/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index feec429fc2..e3d6a1da56 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -53,7 +53,7 @@ async fn main() -> Result<(), Box> { .storage() .at(None) .await? - .fetch_keys(&key_addr.root_bytes(), 10, None) + .fetch_keys(&key_addr.to_root_bytes(), 10, None) .await?; println!("Example 2. Obtained keys:"); @@ -79,7 +79,7 @@ async fn main() -> Result<(), Box> { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); // Obtain the root bytes (`twox_128("XcmPallet") ++ twox_128("VersionNotifiers")`). - let mut query_key = key_addr.root_bytes(); + let mut query_key = key_addr.to_root_bytes(); // We know that the first key is a u32 (the `XcmVersion`) and is hashed by twox64_concat. // twox64_concat is just the result of running the twox_64 hasher on some value and concatenating diff --git a/subxt/src/storage/storage_address.rs b/subxt/src/storage/storage_address.rs index 037f14784c..3d69464832 100644 --- a/subxt/src/storage/storage_address.rs +++ b/subxt/src/storage/storage_address.rs @@ -130,7 +130,7 @@ where /// Return bytes representing the root of this storage entry (ie a hash of /// the pallet and entry name). Use [`crate::storage::StorageClient::address_bytes()`] /// to obtain the bytes representing the entire address. - pub fn root_bytes(&self) -> Vec { + pub fn to_root_bytes(&self) -> Vec { super::utils::storage_address_root_bytes(self) } } diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index db557a4585..925f909674 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -124,7 +124,7 @@ async fn fetch_keys() { .at(None) .await .unwrap() - .fetch_keys(&addr.root_bytes(), 4, None) + .fetch_keys(&addr.to_root_bytes(), 4, None) .await .unwrap(); assert_eq!(keys.len(), 4) From e94c0b7e8f90f2cd02d09d5c8127e89520169909 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 21 Mar 2023 12:18:50 +0000 Subject: [PATCH 31/31] document error case in StorageClient::address_bytes() --- subxt/src/storage/storage_client.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index c7c5d0c1d9..8a7b82185f 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -69,7 +69,10 @@ where } /// Convert some storage address into the raw bytes that would be submitted to the node in order - /// to retrieve an entry. + /// to retrieve an entry. This fails if [`StorageAddress::append_entry_bytes`] does; in the built-in + /// implementation this would be if the pallet and storage entry being asked for is not available on the + /// node you're communicating with, or if the metadata is missing some type information (which should not + /// happen). pub fn address_bytes( &self, address: &Address,